Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | 33 | public function __construct(Container $container, $config = null) { |
|
14 | 33 | if ($config) { |
|
15 | 33 | Config::set('ntentan:db', $config); |
|
16 | 33 | $container->bind(Driver::class) |
|
17 | 33 | ->to(self::getDriverClassName(Config::get('ntentan:db.driver'))); |
|
18 | } |
||
19 | 33 | $this->container = $container; |
|
20 | 33 | } |
|
21 | |||
44 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: