Conditions | 4 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.074 |
Changes | 0 |
1 | <?php |
||
41 | 204 | protected function initConnection(): void |
|
42 | { |
||
43 | 204 | $pdo = $this->getPDO(); |
|
44 | |||
45 | 204 | if ($pdo !== null) { |
|
46 | 204 | $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
|
47 | |||
48 | 204 | if ($this->getEmulatePrepare() !== null && constant('PDO::ATTR_EMULATE_PREPARES')) { |
|
49 | $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, $this->getEmulatePrepare()); |
||
50 | } |
||
64 |