original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Add a ON MATCH clause
  
  @param string $cypher
  
  @throws NonMergeClause
  
  @return self
docstring_tokens: Add a ON MATCH clause