public static function startWithNode(
        string $variable = null,
        array $labels = []
    ): self {
        $path = new self;
        $path->elements = $path->elements->add(
            new Node($variable, $labels)
        );
        $path->lastOperation = Node::class;

        return $path;
    }
public static function startWithNode(
        string $variable = null,
        array $labels = []
    ): self {
        $path = new self;
        $path->elements = $path->elements->add(
            new Node($variable, $labels)
        );
        $path->lastOperation = Node::class;

        return $path;
    }
public static function startWithNode ( string $ variable = null , array $ labels = [ ] ) : self { $ path = new self ; $ path -> elements = $ path -> elements -> add ( new Node ( $ variable , $ labels ) ) ; $ path -> lastOperation = Node :: class ; return $ path ; }
Start the path with the given node

@param string $variable
@param array $labels

@return self
Start the path with the given node