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