original_string: public function one()
      {
          $currentLimit = $this->limit;
          $results = $this->limit(1)->all();
          $this->limit = $currentLimit;
  
          return $results ? array_shift($results) : null;
      }
code: public function one()
      {
          $currentLimit = $this->limit;
          $results = $this->limit(1)->all();
          $this->limit = $currentLimit;
  
          return $results ? array_shift($results) : null;
      }
code_tokens: public function one ( ) { $ currentLimit = $ this -> limit ; $ results = $ this -> limit ( 1 ) -> all ( ) ; $ this -> limit = $ currentLimit ; return $ results ? array_shift ( $ results ) : null ; }
docstring: Returns one result.
  
  @return \Mandango\Document\Document|null A document or null if there is no any result.
  
  @api
docstring_tokens: Returns one result .