Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | class UnexpectedResponse extends RuntimeException |
||
18 | { |
||
19 | /** |
||
20 | * @var Type |
||
21 | */ |
||
22 | private $type; |
||
23 | |||
24 | /** |
||
25 | * @var ResponseInterface |
||
26 | */ |
||
27 | private $response; |
||
28 | |||
29 | public static function forType(Type $type, ResponseInterface $response): self |
||
30 | { |
||
31 | $self = new self('Unexpected response data.'); |
||
32 | $self->type = $type; |
||
33 | $self->response = $response; |
||
34 | |||
35 | return $self; |
||
36 | } |
||
37 | |||
38 | public function getType(): Type |
||
41 | } |
||
42 | |||
43 | public function getResponse(): ResponseInterface |
||
46 | } |
||
47 | } |
||
48 |