| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class DatabaseException extends Exception |
||
| 16 | { |
||
| 17 | private ?string $query; |
||
| 18 | private ?array $parameters; |
||
| 19 | |||
| 20 | public function __construct( |
||
| 21 | string $message, |
||
| 22 | int $code = 0, |
||
| 23 | ?Throwable $previous = null, |
||
| 24 | ?string $query = null, |
||
| 25 | ?array $parameters = null |
||
| 26 | ) { |
||
| 27 | parent::__construct($message, $code, $previous); |
||
| 28 | $this->query = $query; |
||
| 29 | $this->parameters = $parameters; |
||
| 30 | } |
||
| 31 | |||
| 32 | public function getQuery(): ?string |
||
| 33 | { |
||
| 34 | return $this->query; |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getParameters(): ?array |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getContextInfo(): array |
||
| 50 | ]; |
||
| 51 | } |
||
| 52 | } |