| Total Complexity | 5 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class RestException extends \RuntimeException |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $path; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | private $params; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var ResponseInterface|null |
||
| 29 | */ |
||
| 30 | private $response; |
||
| 31 | |||
| 32 | public function __construct( |
||
| 33 | string $message, |
||
| 34 | string $path, |
||
| 35 | array $params = [], |
||
| 36 | int $code = 0, |
||
| 37 | ?Throwable $previous = null |
||
| 38 | ) { |
||
| 39 | parent::__construct($message, $code, $previous); |
||
| 40 | $this->path = $path; |
||
| 41 | $this->params = $params; |
||
| 42 | } |
||
| 43 | |||
| 44 | public function getPath(): string |
||
| 45 | { |
||
| 46 | return $this->path; |
||
| 47 | } |
||
| 48 | |||
| 49 | public function getParams(): array |
||
| 50 | { |
||
| 51 | return $this->params; |
||
| 52 | } |
||
| 53 | |||
| 54 | public function getResponse(): ?ResponseInterface |
||
| 57 | } |
||
| 58 | |||
| 59 | public function setResponse(ResponseInterface $response): void |
||
| 62 | } |
||
| 63 | } |
||
| 64 |