Conditions | 3 |
Paths | 1 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function after() |
||
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 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.