| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 33 | public function __construct(Container $container, $config = null) { |
|
| 15 | 33 | if ($config) { |
|
| 16 | 33 | Config::set('ntentan:db', $config); |
|
| 17 | 33 | $container->bind(Driver::class) |
|
| 18 | 33 | ->to(self::getDriverClassName(Config::get('ntentan:db.driver'))); |
|
| 19 | } |
||
| 20 | 33 | $this->driver = $container->resolve(Driver::class); |
|
| 21 | 31 | $this->container = $container; |
|
| 22 | 31 | } |
|
| 23 | |||
| 46 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.