Get the collection first item.

@param int $wishListId

@return bool|\Magento\Framework\DataObject
192897
public function getWishlistById($wishListId)
    {
        $collection = $this->addFieldToFilter('wishlist_id', $wishListId)
            ->setPageSize(1);

        if ($collection->getSize()) {
            return $collection->getFirstItem();
        }

        return false;
    }
691540
public function first($callback = null, $default = null)
        {
            if (is_null($callback)) {
                return count($this->_items) > 0 ? Arrays::first($this->_items) : $default;
            } else {
                foreach ($this->_items as $key => $value) {
                    if (call_user_func($callback, $key, $value)) {
                        return $value;
                    }
                }

                return value($default);
            }
        }
733805
public static function firstOrNew($id)
    {
        if ($entity = self::getDataMapperInstance()->first($id)) {
            return $entity;
        }

        $entity = new static();
        $entity->_id = $id;

        return $entity;
    }
119913
public function first()
    {
        $item = reset($this->items);
        if (is_numeric($item)) {
            $item = DataObject::get_by_id($this->dataClass, $item);
        }
        if (!empty($this->extraFields[key($this->items)])) {
            $item->update($this->extraFields[key($this->items)]);
        }
        return $item;
    }
1210090
public function getFirstItem(...$types)
    {
        $items = $this->getItems(...$types);

        // If there are no matching items
        if (!count($items)) {
            throw new OutOfBoundsException(
                OutOfBoundsException::NO_MATCHING_ITEMS_STR,
                OutOfBoundsException::NO_MATCHING_ITEMS
            );
        }

        return $items[0];
    }
717720
protected function getListCollectionItem()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;
        $conditions['collection_id'] = $this->data_collection['collection_id'];

        return $this->collection_item->getItems($conditions);
    }
677907
public function getWishList()
    {
        if ($this->_oWishList === null) {
            $this->_oWishList = false;

            // passing wishlist information
            if ($oUser = $this->getWishUser()) {
                $oWishlistBasket = $oUser->getBasket('wishlist');
                $this->_oWishList = $oWishlistBasket->getArticles();

                if (!$oWishlistBasket->isVisible()) {
                    $this->_oWishList = false;
                }
            }
        }

        return $this->_oWishList;
    }
1279197
public function getArticleId()
    {
        if ($this->_sArticleId === null) {
            // passing wishlist information
            if ($articleId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid')) {
                $this->_sArticleId = $articleId;
            }
        }

        return $this->_sArticleId;
    }
740227
public function getList($listId)
    {
        foreach ($this->lists as $id => $listParameters) 
        {
            if($id == $listId)
            {
                return $this->createList($id, $listParameters);
            }
        }
    }
401800
private function first(int $id = null)
    {
        $this->firstIsSelected = true;  // utile pour active record

        if ($id) {
            $this->where('id', '=', $id);
        }

        $this->query->setStartSelect();

        $this->limit(1);

        $this->query->prepare()->bindWhere()->bindLimit()->execute();

        return $this->query->fetch();
    }
977787
public function getItem($itemId)
	{
		if (isset($this->info['data'][$itemId]))
		{
			return $this->info['data'][$itemId];
		}

		return null;
	}
1016388
def get_first_category(app_uid):
        '''
        
        '''
        recs = MPost2Catalog.query_by_entity_uid(app_uid).objects()
        if recs.count() > 0:
            return recs.get()

        return None
630000
public function select($first = false)
	{
		if($this->isSelectBefore)
		{
			$this->__selectBefore();
		}
		$option = $this->getOption();
		$this->db->operationOption = $option;
		if($first)
		{
			$data = $this->db->getOne();
		}
		else
		{
			$data = $this->db->query();
			$this->__selectAfter($data,$option);
		}
		return $data;
	}
441755
private function fetchFirstVisit()
    {
        $response = Request::processRequest('Live.getFirstVisitForVisitorId', [
            'idSite' => $this->getIdSite(),
            'visitorId' => $this->getVisitorId(),
        ]);

        return $response->getFirstRow();
    }
190290
public function get($key)
    {
        $items = Arr::get($this->items, $key);

        return $this->firstOrAll($items);
    }
792704
public function getMostRevelantItemForNode($nodeId)
    {
        if (isset($this->perNode[$nodeId])) {
            return reset($this->perNode[$nodeId]);
        }
    }
1256383
public function getWishList(int $userId)
    {
        $response = $this->handler->handle('GET', false, 'wishlist/' . $userId);

        return $this->make($response, true);
    }