public function getSingleNode($label = null)
    {
        $nodes = (null === $label) ? $this->getNodes() : $this->getNodesByLabel($label);
        $single = current($nodes);

        return $single;
    }
public function getSingleNode($label = null)
    {
        $nodes = (null === $label) ? $this->getNodes() : $this->getNodesByLabel($label);
        $single = current($nodes);

        return $single;
    }
public function getSingleNode ( $ label = null ) { $ nodes = ( null === $ label ) ? $ this -> getNodes ( ) : $ this -> getNodesByLabel ( $ label ) ; $ single = current ( $ nodes ) ; return $ single ; }
Returns a single node from the nodes collection
Use when you do cypher queries returning only one node.

@param string|null $label Return a node for this label only.

@return Node|null
Returns a single node from the nodes collection Use when you do cypher queries returning only one node .