Skip to content

Commit 60ed368

Browse files
committed
Add interfaces to provide problem information
1 parent 84aeb55 commit 60ed368

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

src/Problem/Detailed.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace Lcobucci\ErrorHandling\Problem;
5+
6+
use Throwable;
7+
8+
interface Detailed extends Throwable
9+
{
10+
/**
11+
* @return array<string, mixed>
12+
*/
13+
public function getExtraDetails(): array;
14+
}

src/Problem/Titled.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace Lcobucci\ErrorHandling\Problem;
5+
6+
use Throwable;
7+
8+
interface Titled extends Throwable
9+
{
10+
public function getTitle(): string;
11+
}

src/Problem/Typed.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace Lcobucci\ErrorHandling\Problem;
5+
6+
use Throwable;
7+
8+
interface Typed extends Throwable
9+
{
10+
public function getTypeUri(): string;
11+
}

0 commit comments

Comments
 (0)