public function findNode(string $name)
    {
        if (isset($this->nodes[$name])) {
            return $this->nodes[$name];
        }

        foreach ($this->graphs as $graph) {
            $node = $graph->findNode($name);
            if ($node) {
                return $node;
            }
        }

        return null;
    }
public function findNode(string $name)
    {
        if (isset($this->nodes[$name])) {
            return $this->nodes[$name];
        }

        foreach ($this->graphs as $graph) {
            $node = $graph->findNode($name);
            if ($node) {
                return $node;
            }
        }

        return null;
    }
public function findNode ( string $ name ) { if ( isset ( $ this -> nodes [ $ name ] ) ) { return $ this -> nodes [ $ name ] ; } foreach ( $ this -> graphs as $ graph ) { $ node = $ graph -> findNode ( $ name ) ; if ( $ node ) { return $ node ; } } return null ; }
Finds a node in this graph or any of its subgraphs.

@param string $name Name of the node to find.

@return Node|null
Finds a node in this graph or any of its subgraphs .