src/Node/Node.php
public function removeNode(NodeInterface $node): NodeInterface
    {
        unset($this->_nodes[$node->getId()]);

        if ($this->getParent()) {
            $this->getParent()->removeNode($node);
        }

        return $this;
    }
public function removeNode(NodeInterface $node): NodeInterface
    {
        unset($this->_nodes[$node->getId()]);

        if ($this->getParent()) {
            $this->getParent()->removeNode($node);
        }

        return $this;
    }
public function removeNode ( NodeInterface $ node ) : NodeInterface { unset ( $ this -> _nodes [ $ node -> getId ( ) ] ) ; if ( $ this -> getParent ( ) ) { $ this -> getParent ( ) -> removeNode ( $ node ) ; } return $ this ; }
Removes a node.

@param NodeInterface $node - Node.

@return NodeInterface
Removes a node .