public function __isset($name)
    {
        if ($this->count() > 1) {
            throw new LogicException(
                'Collection has more then one element, you cannot get entity property directly'
            );
        }
        $current = $this->first();
        if (!$current) {
            return false;
        }
        return isset($current->$name);
    }
public function __isset($name)
    {
        if ($this->count() > 1) {
            throw new LogicException(
                'Collection has more then one element, you cannot get entity property directly'
            );
        }
        $current = $this->first();
        if (!$current) {
            return false;
        }
        return isset($current->$name);
    }
public function __isset ( $ name ) { if ( $ this -> count ( ) > 1 ) { throw new LogicException ( 'Collection has more then one element, you cannot get entity property directly' ) ; } $ current = $ this -> first ( ) ; if ( ! $ current ) { return false ; } return isset ( $ current -> $ name ) ; }
Returns isset on entity property when collection has only one element

@param string $name property name

@throws LogicException when collection has more then one element

@return mixed
Returns isset on entity property when collection has only one element