public function first()
    {
        if (empty($this->data)) {
            throw new OutOfBoundsException('Can\'t determine first item. Collection is empty');
        }

        \reset($this->data);

        return \current($this->data);
    }
public function first()
    {
        if (empty($this->data)) {
            throw new OutOfBoundsException('Can\'t determine first item. Collection is empty');
        }

        \reset($this->data);

        return \current($this->data);
    }
public function first ( ) { if ( empty ( $ this -> data ) ) { throw new OutOfBoundsException ( 'Can\'t determine first item. Collection is empty' ) ; } \ reset ( $ this -> data ) ; return \ current ( $ this -> data ) ; }
Returns the first item of the collection.

@return mixed

@throws OutOfBoundsException when the collection is empty.
Returns the first item of the collection .