| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 4 | public function __construct(\PDOException $e, $sql = '', array $dbParameters = []) |
|
| 32 | { |
||
| 33 | 4 | $this->sql = $sql; |
|
| 34 | 4 | $this->dbParameters = $dbParameters; |
|
| 35 | |||
| 36 | 4 | $extraMessage = ''; |
|
| 37 | 4 | if (!empty($this->sql)) { |
|
| 38 | 4 | $extraMessage .= " [SQL: {$this->sql}]"; |
|
| 39 | } |
||
| 40 | 4 | if (!empty($this->dbParameters)) { |
|
| 41 | 3 | $extraMessage .= " [Parameters: " . implode(', ', $this->dbParameters) . "]"; |
|
| 42 | } |
||
| 43 | |||
| 44 | 4 | parent::__construct($e, $extraMessage); |
|
| 45 | 4 | } |
|
| 46 | |||
| 63 |