@@ -44,7 +44,7 @@ |
||
| 44 | 44 | public static function applyCallback(callable $callback, NodeInterface $root, $targetClass = ChildNodeInterface::class) |
| 45 | 45 | { |
| 46 | 46 | $processed = []; |
| 47 | - $f = function (ChildNodeInterface $targetNode) use ($callback, $targetClass, &$f, &$processed) { |
|
| 47 | + $f = function(ChildNodeInterface $targetNode) use ($callback, $targetClass, &$f, &$processed) { |
|
| 48 | 48 | if (in_array($targetNode, $processed, true)) { |
| 49 | 49 | return; |
| 50 | 50 | } |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | * |
| 288 | 288 | * @param array $tree |
| 289 | 289 | * @param string $parent node name or null for inserting into root node |
| 290 | - * @param $node |
|
| 290 | + * @param string $node |
|
| 291 | 291 | * |
| 292 | 292 | * @throws \Exception |
| 293 | 293 | * |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | |
| 323 | 323 | /** |
| 324 | 324 | * @param array $config |
| 325 | - * @param $node |
|
| 325 | + * @param string $node |
|
| 326 | 326 | * |
| 327 | 327 | * @return false|array children of deleted node |
| 328 | 328 | */ |
@@ -345,6 +345,9 @@ discard block |
||
| 345 | 345 | return false; |
| 346 | 346 | } |
| 347 | 347 | |
| 348 | + /** |
|
| 349 | + * @param string $nodeName |
|
| 350 | + */ |
|
| 348 | 351 | protected function removeNodeFromList($nodeName) |
| 349 | 352 | { |
| 350 | 353 | if ($this->nodes->hasKey($nodeName)) { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | /** |
| 52 | 52 | * Returns collection of child nodes. |
| 53 | 53 | * |
| 54 | - * @return \Nayjest\Collection\CollectionInterface|ChildNodeInterface[] |
|
| 54 | + * @return \Nayjest\Collection\Decorator\ReadonlyObjectCollection |
|
| 55 | 55 | */ |
| 56 | 56 | public function children() |
| 57 | 57 | { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | /** |
| 76 | 76 | * Returns collection containing all descendant nodes. |
| 77 | 77 | * |
| 78 | - * @return CollectionInterface|ObjectCollection|ChildNodeInterface[] |
|
| 78 | + * @return ObjectCollection |
|
| 79 | 79 | */ |
| 80 | 80 | public function getChildrenRecursive() |
| 81 | 81 | { |