src/Query/Query.php
public function onMatch(string $cypher): self
    {
        $clause = $this->clauses->last();

        if (
            !$clause instanceof Clause\MergeClause &&
            !$clause instanceof Clause\OnCreateClause
        ) {
            throw new NonMergeClause;
        }

        $query = new self;
        $query->clauses = $this->clauses->add(
            new Clause\OnMatchClause($cypher)
        );

        return $query;
    }
public function onMatch(string $cypher): self
    {
        $clause = $this->clauses->last();

        if (
            !$clause instanceof Clause\MergeClause &&
            !$clause instanceof Clause\OnCreateClause
        ) {
            throw new NonMergeClause;
        }

        $query = new self;
        $query->clauses = $this->clauses->add(
            new Clause\OnMatchClause($cypher)
        );

        return $query;
    }
public function onMatch ( string $ cypher ) : self { $ clause = $ this -> clauses -> last ( ) ; if ( ! $ clause instanceof Clause \ MergeClause && ! $ clause instanceof Clause \ OnCreateClause ) { throw new NonMergeClause ; } $ query = new self ; $ query -> clauses = $ this -> clauses -> add ( new Clause \ OnMatchClause ( $ cypher ) ) ; return $ query ; }
Add a ON MATCH clause

@param string $cypher

@throws NonMergeClause

@return self
Add a ON MATCH clause