From 6553c6ad10124661f93747d685662d1230c89335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Chans=C3=A9aume?= Date: Mon, 28 Apr 2014 12:15:08 +0200 Subject: [PATCH] unnecessary code removed --- core/lib/Thelia/Action/Cart.php | 2 +- core/lib/Thelia/Model/ProductPriceQuery.php | 14 -------------- .../lib/Thelia/Model/Tools/ProductPriceTools.php | 16 ---------------- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/core/lib/Thelia/Action/Cart.php b/core/lib/Thelia/Action/Cart.php index 0ade18a77..a9cdb66dc 100644 --- a/core/lib/Thelia/Action/Cart.php +++ b/core/lib/Thelia/Action/Cart.php @@ -231,7 +231,7 @@ class Cart extends BaseAction implements EventSubscriberInterface * * @return CartItem */ - protected function doAddItem(EventDispatcherInterface $dispatcher, \Thelia\Model\Cart $cart, $productId, \Thelia\Model\ProductSaleElements $productSaleElements, $quantity, $productPrices) + protected function doAddItem(EventDispatcherInterface $dispatcher, \Thelia\Model\Cart $cart, $productId, \Thelia\Model\ProductSaleElements $productSaleElements, $quantity, ProductPriceTools $productPrices) { $cartItem = new CartItem(); $cartItem->setDisptacher($dispatcher); diff --git a/core/lib/Thelia/Model/ProductPriceQuery.php b/core/lib/Thelia/Model/ProductPriceQuery.php index e3c9df496..82c30b1db 100644 --- a/core/lib/Thelia/Model/ProductPriceQuery.php +++ b/core/lib/Thelia/Model/ProductPriceQuery.php @@ -17,18 +17,4 @@ use Thelia\Model\Base\ProductPriceQuery as BaseProductPriceQuery; class ProductPriceQuery extends BaseProductPriceQuery { - public function findByCurrencyAndProductSaleElements($currencyId, $productSaleElementsId) - { - ArticleQuery::create()->select(array('Id', 'Name'))->find(); - - $currencyId = $this->getCurrency(); - if (null !== $currencyId) { - $currency = CurrencyQuery::create()->findOneById($currencyId); - if (null === $currency) { - throw new \InvalidArgumentException('Cannot found currency id: `' . $currency . '` in product_sale_elements loop'); - } - } - - } - } // ProductPriceQuery diff --git a/core/lib/Thelia/Model/Tools/ProductPriceTools.php b/core/lib/Thelia/Model/Tools/ProductPriceTools.php index 04cc28a74..d51a27982 100644 --- a/core/lib/Thelia/Model/Tools/ProductPriceTools.php +++ b/core/lib/Thelia/Model/Tools/ProductPriceTools.php @@ -41,14 +41,6 @@ class ProductPriceTools $this->promoPrice = $promoPrice; } - /** - * @param float $price - */ - public function setPrice($price) - { - $this->price = $price; - } - /** * @return float */ @@ -57,14 +49,6 @@ class ProductPriceTools return $this->price; } - /** - * @param float $promoPrice - */ - public function setPromoPrice($promoPrice) - { - $this->promoPrice = $promoPrice; - } - /** * @return float */