Total Complexity | 5 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
5 | final class Situations |
||
6 | { |
||
7 | private static $aliases = []; |
||
8 | |||
9 | private static $methods = []; |
||
10 | |||
11 | 121 | public static function add($listenerClass, $situation, $methods) |
|
15 | } |
||
16 | 121 | } |
|
17 | |||
18 | 117 | public static function call($method, $args) |
|
19 | { |
||
20 | 117 | $method = self::$aliases[$method] ?? $method; |
|
21 | 117 | $args = is_array($args[0] ?? null) ? $args[0] : $args; |
|
22 | 117 | [$listenerClass, $situation] = self::$methods[$method]; |
|
23 | |||
24 | 117 | resolve('heyman.chains')->init( |
|
|
|||
25 | 117 | $listenerClass, ...resolve($situation)->normalize($method, $args) |
|
26 | ); |
||
27 | |||
28 | 116 | return resolve(Condition::class); |
|
29 | } |
||
30 | |||
31 | 121 | public static function aliasMethod($currentName, $newName) |
|
34 | 121 | } |
|
35 | } |
||
36 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.