| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4.0312 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | 27 | protected function createConnection($driver, $connection, $database, $prefix = '', array $config = []) |
|
| 21 | { |
||
| 22 | 27 | if ($this->container->bound($key = "db.connection.{$driver}")) { |
|
| 23 | return $this->container->make($key, [$connection, $database, $prefix, $config]); |
||
| 24 | } |
||
| 25 | |||
| 26 | 27 | if ($driver === 'mysql') { |
|
| 27 | 13 | return new MysqlConnection($connection, $database, $prefix, $config); |
|
| 28 | } |
||
| 29 | |||
| 30 | 14 | if ($driver === 'pgsql') { |
|
| 31 | 13 | return new PostgresConnection($connection, $database, $prefix, $config); |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | return parent::createConnection($driver, $connection, $database, $prefix, $config); |
|
| 35 | } |
||
| 37 |