| Total Complexity | 3 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class PDODriver extends AbstractPDODriver |
||
| 11 | { |
||
| 12 | public function createConnection(): PDO |
||
| 13 | { |
||
| 14 | $this->attributes += [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]; |
||
|
|
|||
| 15 | $pdo = parent::createConnection(); |
||
| 16 | |||
| 17 | if ($this->charset !== null) { |
||
| 18 | $pdo->exec('SET NAMES ' . $pdo->quote($this->charset)); |
||
| 19 | } |
||
| 20 | |||
| 21 | return $pdo; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function getDriverName(): string |
||
| 27 | } |
||
| 28 | } |
||
| 29 |