| 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 |
||
| 26 | 27 | protected function createConnection($driver, $connection, $database, $prefix = '', array $config = []) |
|
| 27 | { |
||
| 28 | 27 | if ($this->container->bound($key = "db.connection.{$driver}")) { |
|
| 29 | return $this->container->make($key, [$connection, $database, $prefix, $config]); |
||
| 30 | } |
||
| 31 | |||
| 32 | 27 | if ($driver === 'mysql') { |
|
| 33 | 13 | return new MysqlConnection($connection, $database, $prefix, $config); |
|
| 34 | } |
||
| 35 | |||
| 36 | 14 | if ($driver === 'pgsql') { |
|
| 37 | 13 | return new PostgresConnection($connection, $database, $prefix, $config); |
|
| 38 | } |
||
| 39 | |||
| 40 | 1 | return parent::createConnection($driver, $connection, $database, $prefix, $config); |
|
| 41 | } |
||
| 43 |