/** * Validate Offer model when it is used to create a Bol offer * @param Offer $offer */ public function validateCreateOffer(Offer $offer) { Assert::id($offer->getId()); Assert::ean($offer->getEan()); Assert::condition($offer->getCondition()); Assert::price($offer->getPrice()); Assert::deliveryCode($offer->getDeliveryCode()); Assert::quantityInStock($offer->getQuantityInStock()); Assert::publish($offer->getPublish()); Assert::referenceCode($offer->getReferenceCode()); Assert::description($offer->getDescription()); }