| Total Complexity | 3 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Exception extends \RuntimeException |
||
| 6 | { |
||
| 7 | /** @var string */ |
||
| 8 | protected $sentence; |
||
| 9 | /** @var string */ |
||
| 10 | protected $code; |
||
| 11 | /** @var array */ |
||
| 12 | protected $errorInfo = []; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Exception constructor. |
||
| 16 | * |
||
| 17 | * @param string $message |
||
| 18 | * @param mixed $code |
||
| 19 | * @param array $error_info |
||
| 20 | * @param string|null $sentence |
||
| 21 | */ |
||
| 22 | public function __construct(string $message = '', $code = null, array $error_info = [], string $sentence = '') |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Gets the SQL sentence |
||
| 33 | * @return string the SQL sentence as a string. |
||
| 34 | */ |
||
| 35 | public function getSentence(): string |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Gets detailed information of error |
||
| 42 | * @return array the PDO error information as an array. |
||
| 43 | */ |
||
| 44 | public function getErrorInfo(): array |
||
| 49 |