src/Tree/AbstractTreeNode.php
public function addChild(TreeNodeInterface $node): void
    {
        $this->children[] = $node;
        $this->isLeaf = false;
    }
public function addChild(TreeNodeInterface $node): void
    {
        $this->children[] = $node;
        $this->isLeaf = false;
    }
public function addChild ( TreeNodeInterface $ node ) : void { $ this -> children [ ] = $ node ; $ this -> isLeaf = false ; }
Adds the given tree node to this nodes child list.

@param TreeNodeInterface $node The node to be inserted
@return void
Adds the given tree node to this nodes child list .