| Total Complexity | 5 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class BaseException extends Exception implements JsonSerializable |
||
| 11 | { |
||
| 12 | /** @param array $details */ |
||
| 13 | protected array $details; |
||
| 14 | |||
| 15 | public function __construct(string $message = "", int $code = 0, ?Exception $previous = null, array $details = []) |
||
| 16 | { |
||
| 17 | parent::__construct($message, $code, $previous); |
||
| 18 | $this->details = $details; |
||
| 19 | } |
||
| 20 | |||
| 21 | /** @return array */ |
||
| 22 | public function getDetails() |
||
| 23 | { |
||
| 24 | return $this->details; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** @return void */ |
||
| 28 | public function setDetails(array $details) |
||
| 29 | { |
||
| 30 | $this->details = $details; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** @return array */ |
||
| 34 | public function jsonSerialize(): array |
||
| 43 | ]; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function __toString(): string |
||
| 55 | ); |
||
| 56 | } |
||
| 58 |