Conditions | 3 |
Paths | 1 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function __invoke() |
||
18 | { |
||
19 | return function ($currentItem, $fallback = null) { |
||
20 | $currentKey = $this->search($currentItem, true); |
||
|
|||
21 | |||
22 | if ($currentKey === false) { |
||
23 | return $fallback; |
||
24 | } |
||
25 | |||
26 | $currentOffset = $this->keys()->search($currentKey, true); |
||
27 | |||
28 | $next = $this->slice($currentOffset, 2); |
||
29 | |||
30 | if ($next->count() < 2) { |
||
31 | return $fallback; |
||
32 | } |
||
33 | |||
34 | return $next->last(); |
||
35 | }; |
||
36 | } |
||
37 | } |
||
38 |
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.