Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | private static function isUnder43() |
||
39 | { |
||
40 | static $result = null; |
||
41 | |||
42 | if (null === $result) { |
||
43 | $reflectionMethod = new \ReflectionMethod(EventDispatcherInterface::class, 'dispatch'); |
||
44 | $result = 'event' === ($reflectionMethod)->getParameters()[1]->getName(); |
||
45 | } |
||
46 | |||
47 | return $result; |
||
48 | } |
||
49 | } |
||
50 |
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: