| Total Complexity | 3 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Exception extends \Exception |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @param int $code |
||
| 11 | * @param string $message |
||
| 12 | */ |
||
| 13 | public function __construct(int $code, string $message = '') |
||
| 14 | { |
||
| 15 | $this->code = $code; |
||
| 16 | $this->message = $message ?: Response::getErrorMessage($code); |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * {@inheritdoc} |
||
| 21 | */ |
||
| 22 | public function __toString() |
||
| 28 | } |
||
| 29 | } |
||
| 30 |