Model/ResourceModel/Wishlist/Collection.php
public function getWishlistById($wishListId)
    {
        $collection = $this->addFieldToFilter('wishlist_id', $wishListId)
            ->setPageSize(1);

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

        return false;
    }
public function getWishlistById($wishListId)
    {
        $collection = $this->addFieldToFilter('wishlist_id', $wishListId)
            ->setPageSize(1);

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

        return false;
    }
public function getWishlistById ( $ wishListId ) { $ collection = $ this -> addFieldToFilter ( 'wishlist_id' , $ wishListId ) -> setPageSize ( 1 ) ; if ( $ collection -> getSize ( ) ) { return $ collection -> getFirstItem ( ) ; } return false ; }
Get the collection first item.

@param int $wishListId

@return bool|\Magento\Framework\DataObject
Get the collection first item .