@@ -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 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | /** |
| 45 | 45 | * Returns child components. |
| 46 | 46 | * |
| 47 | - * @return \Nayjest\Collection\CollectionInterface |
|
| 47 | + * @return \Nayjest\Collection\Decorator\ReadonlyObjectCollection |
|
| 48 | 48 | */ |
| 49 | 49 | public function children() |
| 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)) { |