| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function connect(array $params, $username = null, $password = null, array $driverOptions = []) |
||
| 27 | { |
||
| 28 | if (! empty($params['persistent'])) { |
||
| 29 | $driverOptions[PDO::ATTR_PERSISTENT] = true; |
||
| 30 | } |
||
| 31 | |||
| 32 | try { |
||
| 33 | return new PDOConnection( |
||
| 34 | $this->constructPdoDsn($params), |
||
| 35 | $username, |
||
| 36 | $password, |
||
| 37 | $driverOptions |
||
| 38 | ); |
||
| 39 | } catch (PDOException $e) { |
||
| 40 | throw DBALException::driverException($this, $e); |
||
| 41 | } |
||
| 70 |