1 | <?php |
||
8 | class Copy |
||
9 | { |
||
10 | /** |
||
11 | * Keep in mind that Node::copy() utilises the Copy class when used with the depth parameter. |
||
12 | * So here the Node::copy() must never be passed a param to avoid infinite call loop. |
||
13 | * |
||
14 | * @param Node $node |
||
15 | * @param null $depth (null is infinite) |
||
16 | * @return Node |
||
17 | */ |
||
18 | 30 | public function __invoke(Node $node, $depth = null): Node |
|
24 | |||
25 | /** |
||
26 | * @param Node $node |
||
|
|||
27 | * @param NodeCollection $children |
||
28 | * @param $depth |
||
29 | * @param null|int $currentDepth |
||
30 | * @return bool|Node |
||
31 | */ |
||
32 | 30 | private function recursiveDepth(NodeCollection $nodeCollection, $depth = null, $currentDepth = 0) |
|
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.