Total Complexity | 3 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | final class UnexpectedStatusException extends InvalidArgumentException implements ExceptionInterface |
||
12 | { |
||
13 | /** @var string */ |
||
14 | private $actualStatus; |
||
15 | |||
16 | /** @var string */ |
||
17 | private $expectedStatus; |
||
18 | |||
19 | /** |
||
20 | * @throws StringsException |
||
21 | */ |
||
22 | public function __construct(string $actualStatus, string $expectedStatus) |
||
23 | { |
||
24 | $this->actualStatus = $actualStatus; |
||
25 | $this->expectedStatus = $expectedStatus; |
||
26 | |||
27 | $message = sprintf( |
||
28 | 'Unexpected status. Status was "%s". Expected status was "%s"', |
||
29 | $this->actualStatus, |
||
30 | $this->expectedStatus |
||
31 | ); |
||
32 | |||
33 | parent::__construct($message); |
||
34 | } |
||
35 | |||
36 | public function getActualStatus(): string |
||
39 | } |
||
40 | |||
41 | public function getExpectedStatus(): string |
||
46 |