Conditions | 3 |
Paths | 1 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function after() |
||
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 PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.