Refactor removing Manager notion

This commit is contained in:
gmorel
2013-11-23 20:18:04 +01:00
parent 8ce1030178
commit 90b5fbde05
34 changed files with 442 additions and 411 deletions

View File

@@ -25,7 +25,7 @@ namespace Thelia\Action;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Condition\ConditionFactory;
use Thelia\Condition\ConditionManagerInterface;
use Thelia\Condition\ConditionInterface;
use Thelia\Core\Event\Coupon\CouponConsumeEvent;
use Thelia\Core\Event\Coupon\CouponCreateOrUpdateEvent;
use Thelia\Core\Event\TheliaEvents;
@@ -102,7 +102,7 @@ class Coupon extends BaseAction implements EventSubscriberInterface
$couponManager = $this->container->get('thelia.coupon.manager');
/** @var CouponInterface $coupon */
$coupon = $couponFactory->buildCouponFromCode($event->getCode());
$coupon = $couponFactory->buildCouponManagerFromCode($event->getCode());
$isValid = $coupon->isMatching();
@@ -154,7 +154,7 @@ class Coupon extends BaseAction implements EventSubscriberInterface
$coupon->setDispatcher($this->getDispatcher());
// Set default condition if none found
/** @var ConditionManagerInterface $noConditionRule */
/** @var ConditionInterface $noConditionRule */
$noConditionRule = $this->container->get('thelia.condition.match_for_everyone');
/** @var ConditionFactory $conditionFactory */
$conditionFactory = $this->container->get('thelia.condition.factory');