Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
12 | public static function create(Application $application): Kernel |
||
13 | { |
||
14 | // Load service providers |
||
15 | $application->register(DriverServiceProvider::class); |
||
16 | |||
17 | // Boot kernel |
||
18 | $kernel = Kernel::createInstance($application); |
||
19 | |||
20 | $application->singleton(Kernel::class, $kernel); |
||
|
|||
21 | |||
22 | return $kernel; |
||
23 | } |
||
24 | } |
||
25 |
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: