Total Complexity | 3 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | final class FailedApiResponse implements ResponseInterface |
||
14 | { |
||
15 | private int $status; |
||
16 | private ErrorDto $error; |
||
17 | |||
18 | public function __construct(ErrorDto $error, int $status = HttpStatusCode::HTTP_ERROR) |
||
19 | { |
||
20 | $this->status = $status; |
||
21 | $this->error = $error; |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @psalm-suppress ImpureMethodCall |
||
26 | */ |
||
27 | public function body(): array |
||
32 | ]; |
||
33 | } |
||
34 | |||
35 | public function status(): int |
||
40 |