Conditions | 4 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
32 | 30 | private function recursiveDepth(NodeCollection $nodeCollection, $depth = null, $currentDepth = 0) |
|
33 | { |
||
34 | 30 | if(!is_null($depth) && $depth <= $currentDepth) return new NodeCollection(); |
|
35 | |||
36 | 30 | $copyCollection = new NodeCollection(); |
|
37 | 30 | $currentDepth++; |
|
38 | |||
39 | 30 | foreach($nodeCollection as $node) |
|
40 | { |
||
41 | 30 | $copyCollection->add($subNode = $node->isolatedCopy()); |
|
42 | |||
43 | 30 | $subNode->addChildren($this->recursiveDepth($node->children(), $depth, $currentDepth)); |
|
44 | } |
||
45 | |||
46 | 30 | return $copyCollection; |
|
47 | } |
||
48 | } |
||
49 |
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.