public function getFirstItem()
    {
        $results = $this->getItems();

        if (empty($results)) {
            return null;
        }

        $firstItem = reset($results);

        return $firstItem;
    }
public function getFirstItem()
    {
        $results = $this->getItems();

        if (empty($results)) {
            return null;
        }

        $firstItem = reset($results);

        return $firstItem;
    }
public function getFirstItem ( ) { $ results = $ this -> getItems ( ) ; if ( empty ( $ results ) ) { return null ; } $ firstItem = reset ( $ results ) ; return $ firstItem ; }
Get first result.

@return Item|null
Get first result .