original_string: public function through(
          string $type,
          string $variable = null,
          string $direction = 'BOTH'
      ): self {
          $clause = $this->clauses->last();
  
          if (!$clause instanceof Clause\PathAware) {
              throw new NonPathAwareClause;
          }
  
          $clause = $clause->through($variable, $type, $direction);
          $query = new self;
          $query->clauses = $this
              ->clauses
              ->dropEnd(1)
              ->add($clause);
  
          return $query;
      }
code: public function through(
          string $type,
          string $variable = null,
          string $direction = 'BOTH'
      ): self {
          $clause = $this->clauses->last();
  
          if (!$clause instanceof Clause\PathAware) {
              throw new NonPathAwareClause;
          }
  
          $clause = $clause->through($variable, $type, $direction);
          $query = new self;
          $query->clauses = $this
              ->clauses
              ->dropEnd(1)
              ->add($clause);
  
          return $query;
      }
code_tokens: public function through ( string $ type , string $ variable = null , string $ direction = 'BOTH' ) : self { $ clause = $ this -> clauses -> last ( ) ; if ( ! $ clause instanceof Clause \ PathAware ) { throw new NonPathAwareClause ; } $ clause = $ clause -> through ( $ variable , $ type , $ direction ) ; $ query = new self ; $ query -> clauses = $ this -> clauses -> dropEnd ( 1 ) -> add ( $ clause ) ; return $ query ; }
docstring: Specify the type of relationship for the last match clause
  
  @param string $type
  @param string $variable
  @param string $direction
  
  @throws NonPathAwareClause
  
  @return self
docstring_tokens: Specify the type of relationship for the last match clause