public function hasChild(string $name): bool
    {
        foreach ($this->children as $node) {
            if (strcasecmp($node->getName(), $name) == 0) {
                return true;
            }
        }

        return false;
    }
public function hasChild(string $name): bool
    {
        foreach ($this->children as $node) {
            if (strcasecmp($node->getName(), $name) == 0) {
                return true;
            }
        }

        return false;
    }
public function hasChild ( string $ name ) : bool { foreach ( $ this -> children as $ node ) { if ( strcasecmp ( $ node -> getName ( ) , $ name ) == 0 ) { return true ; } } return false ; }
Check if child exists
Check if child exists