Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
49 | public function connect(): DriverInterface |
||
50 | { |
||
51 | $connection = null; |
||
|
|||
52 | try { |
||
53 | $connection = new \PDO( |
||
54 | $this->getDsn(), |
||
55 | $this->getParam('username'), |
||
56 | $this->getParam('password'), |
||
57 | $this->getOptions() |
||
58 | ); |
||
59 | } catch (SQLException $e) { |
||
60 | // __construct |
||
61 | } |
||
62 | |||
63 | $this->setConnection($connection); |
||
64 | return $this; |
||
65 | } |
||
80 |