public function getFirst()
    {
        if (0 === count($this->data)) {
            return null;
        }
        reset($this->data);

        return current($this->data);
    }
public function getFirst()
    {
        if (0 === count($this->data)) {
            return null;
        }
        reset($this->data);

        return current($this->data);
    }
public function getFirst ( ) { if ( 0 === count ( $ this -> data ) ) { return null ; } reset ( $ this -> data ) ; return current ( $ this -> data ) ; }
Get the first element in the collection

@return mixed
Get the first element in the collection