public function one()
    {
        $currentLimit = $this->limit;
        $results = $this->limit(1)->all();
        $this->limit = $currentLimit;

        return $results ? array_shift($results) : null;
    }
public function one()
    {
        $currentLimit = $this->limit;
        $results = $this->limit(1)->all();
        $this->limit = $currentLimit;

        return $results ? array_shift($results) : null;
    }
public function one ( ) { $ currentLimit = $ this -> limit ; $ results = $ this -> limit ( 1 ) -> all ( ) ; $ this -> limit = $ currentLimit ; return $ results ? array_shift ( $ results ) : null ; }
Returns one result.

@return \Mandango\Document\Document|null A document or null if there is no any result.

@api
Returns one result .