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