Working : Refactor adapter into facade
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
namespace Thelia\Condition;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Thelia\Coupon\AdapterInterface;
|
||||
use Thelia\Coupon\FacadeInterface;
|
||||
use Thelia\Coupon\ConditionCollection;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class ConditionFactory
|
||||
/** @var ContainerInterface Service Container */
|
||||
protected $container = null;
|
||||
|
||||
/** @var AdapterInterface Provide necessary value from Thelia */
|
||||
/** @var FacadeInterface Provide necessary value from Thelia */
|
||||
protected $adapter;
|
||||
|
||||
/** @var array ConditionCollection to process*/
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Thelia\Condition;
|
||||
|
||||
use Symfony\Component\Intl\Exception\NotImplementedException;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Coupon\AdapterInterface;
|
||||
use Thelia\Coupon\FacadeInterface;
|
||||
use Thelia\Exception\InvalidConditionValueException;
|
||||
use Thelia\Model\Currency;
|
||||
use Thelia\Type\FloatType;
|
||||
@@ -60,7 +60,7 @@ abstract class ConditionManagerAbstract implements ConditionManagerInterface
|
||||
// /** @var array Parameters to be validated */
|
||||
// protected $paramsToValidate = array();
|
||||
|
||||
/** @var AdapterInterface Provide necessary value from Thelia */
|
||||
/** @var FacadeInterface Provide necessary value from Thelia */
|
||||
protected $adapter = null;
|
||||
|
||||
/** @var Translator Service Translator */
|
||||
@@ -78,9 +78,9 @@ abstract class ConditionManagerAbstract implements ConditionManagerInterface
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param AdapterInterface $adapter Service adapter
|
||||
* @param FacadeInterface $adapter Service adapter
|
||||
*/
|
||||
public function __construct(AdapterInterface $adapter)
|
||||
public function __construct(FacadeInterface $adapter)
|
||||
{
|
||||
$this->adapter = $adapter;
|
||||
$this->translator = $adapter->getTranslator();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
namespace Thelia\Condition;
|
||||
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Coupon\AdapterInterface;
|
||||
use Thelia\Coupon\FacadeInterface;
|
||||
|
||||
/**
|
||||
* Created by JetBrains PhpStorm.
|
||||
@@ -42,9 +42,9 @@ interface ConditionManagerInterface
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param AdapterInterface $adapter Service adapter
|
||||
* @param FacadeInterface $adapter Service adapter
|
||||
*/
|
||||
function __construct(AdapterInterface $adapter);
|
||||
function __construct(FacadeInterface $adapter);
|
||||
|
||||
/**
|
||||
* Get Rule Service id
|
||||
|
||||
Reference in New Issue
Block a user