original_string: public function withADistanceOf(int $distance): self
      {
          $clause = $this->clauses->last();
  
          if (!$clause instanceof Clause\PathAware) {
              throw new NonPathAwareClause;
          }
  
          $clause = $clause->withADistanceOf($distance);
          $query = new self;
          $query->clauses = $this
              ->clauses
              ->dropEnd(1)
              ->add($clause);
  
          return $query;
      }
code: public function withADistanceOf(int $distance): self
      {
          $clause = $this->clauses->last();
  
          if (!$clause instanceof Clause\PathAware) {
              throw new NonPathAwareClause;
          }
  
          $clause = $clause->withADistanceOf($distance);
          $query = new self;
          $query->clauses = $this
              ->clauses
              ->dropEnd(1)
              ->add($clause);
  
          return $query;
      }
code_tokens: public function withADistanceOf ( int $ distance ) : self { $ clause = $ this -> clauses -> last ( ) ; if ( ! $ clause instanceof Clause \ PathAware ) { throw new NonPathAwareClause ; } $ clause = $ clause -> withADistanceOf ( $ distance ) ; $ query = new self ; $ query -> clauses = $ this -> clauses -> dropEnd ( 1 ) -> add ( $ clause ) ; return $ query ; }
docstring: Define the deepness of the relationship
  
  @param int $distance
  
  @throws LogicException If no relationship in the path
  
  @return self
docstring_tokens: Define the deepness of the relationship