src/Node/Node.php
public function getChild(string $id): NodeInterface
    {
        if (!$this->hasChild($id)) {
            throw ChildDoesNotExistException::create($this->getId(), $id);
        }

        return $this->_children[$id];
    }
public function getChild(string $id): NodeInterface
    {
        if (!$this->hasChild($id)) {
            throw ChildDoesNotExistException::create($this->getId(), $id);
        }

        return $this->_children[$id];
    }
public function getChild ( string $ id ) : NodeInterface { if ( ! $ this -> hasChild ( $ id ) ) { throw ChildDoesNotExistException :: create ( $ this -> getId ( ) , $ id ) ; } return $ this -> _children [ $ id ] ; }
Returns a child by ID.

@param string $id - Node ID.

@throws ChildDoesNotExistException

@return NodeInterface
Returns a child by ID .