Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function resolveDependencies(string $dependentClass, string $dependentMethod): array |
||
19 | { |
||
20 | $dependenciesKey = $this->getDependenciesKey($dependentClass, $dependentMethod); |
||
21 | |||
22 | try { |
||
23 | $dependencies = $this->cache->fetch($dependenciesKey); |
||
24 | } catch (CacheItemNotFoundException $e) { |
||
25 | $dependencies = ClassHelper::getParameters($dependentClass, $dependentMethod); |
||
26 | $this->cache->save($dependenciesKey, $dependencies); |
||
|
|||
27 | } |
||
28 | |||
29 | return $dependencies; |
||
30 | } |
||
31 | |||
37 |
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: