WIP Coupon
Refactor
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
|
||||
namespace Thelia\Coupon\Rule;
|
||||
|
||||
use Thelia\Coupon\CouponAdapterInterface;
|
||||
|
||||
/**
|
||||
* Created by JetBrains PhpStorm.
|
||||
* Date: 8/19/13
|
||||
@@ -34,31 +36,26 @@ namespace Thelia\Coupon\Rule;
|
||||
*/
|
||||
class AvailableForDate extends AvailableForPeriod
|
||||
{
|
||||
|
||||
/**
|
||||
* Generate current Rule validator from adapter
|
||||
* Check if backoffice inputs are relevant or not
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
* @return bool
|
||||
*/
|
||||
protected function setValidators(CouponAdapterInterface $adapter)
|
||||
public function checkBackOfficeInput()
|
||||
{
|
||||
parent::setValidators($adapter); // TODO: Change the autogenerated stub
|
||||
// TODO: Implement checkBackOfficeInput() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate current Rule param to be validated from adapter
|
||||
* Check if Checkout inputs are relevant or not
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
* @return bool
|
||||
*/
|
||||
protected function setParametersToValidate(CouponAdapterInterface $adapter)
|
||||
public function checkCheckoutInput()
|
||||
{
|
||||
parent::setParametersToValidate($adapter); // TODO: Change the autogenerated stub
|
||||
// TODO: Implement checkCheckoutInput() method.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -34,31 +34,26 @@ namespace Thelia\Coupon\Rule;
|
||||
*/
|
||||
class AvailableForLocationX extends CouponRuleAbstract
|
||||
{
|
||||
|
||||
/**
|
||||
* Generate current Rule validator from adapter
|
||||
* Check if backoffice inputs are relevant or not
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
* @return bool
|
||||
*/
|
||||
protected function setValidators(CouponAdapterInterface $adapter)
|
||||
public function checkBackOfficeInput()
|
||||
{
|
||||
parent::setValidators($adapter); // TODO: Change the autogenerated stub
|
||||
// TODO: Implement checkBackOfficeInput() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate current Rule param to be validated from adapter
|
||||
* Check if Checkout inputs are relevant or not
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
* @return bool
|
||||
*/
|
||||
protected function setParametersToValidate(CouponAdapterInterface $adapter)
|
||||
public function checkCheckoutInput()
|
||||
{
|
||||
parent::setParametersToValidate($adapter); // TODO: Change the autogenerated stub
|
||||
// TODO: Implement checkCheckoutInput() method.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -34,31 +34,24 @@ namespace Thelia\Coupon\Rule;
|
||||
*/
|
||||
class AvailableForPeriod extends CouponRuleAbstract
|
||||
{
|
||||
|
||||
/**
|
||||
* Generate current Rule validator from adapter
|
||||
* Check if backoffice inputs are relevant or not
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
* @return bool
|
||||
*/
|
||||
protected function setValidators(CouponAdapterInterface $adapter)
|
||||
public function checkBackOfficeInput()
|
||||
{
|
||||
parent::setValidators($adapter); // TODO: Change the autogenerated stub
|
||||
// TODO: Implement checkBackOfficeInput() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate current Rule param to be validated from adapter
|
||||
* Check if Checkout inputs are relevant or not
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
* @return bool
|
||||
*/
|
||||
protected function setParametersToValidate(CouponAdapterInterface $adapter)
|
||||
public function checkCheckoutInput()
|
||||
{
|
||||
parent::setParametersToValidate($adapter); // TODO: Change the autogenerated stub
|
||||
// TODO: Implement checkCheckoutInput() method.
|
||||
}
|
||||
}
|
||||
@@ -34,31 +34,24 @@ namespace Thelia\Coupon\Rule;
|
||||
*/
|
||||
class AvailableForRepeatedDate extends AvailableForDate
|
||||
{
|
||||
|
||||
/**
|
||||
* Generate current Rule validator from adapter
|
||||
* Check if backoffice inputs are relevant or not
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
* @return bool
|
||||
*/
|
||||
protected function setValidators(CouponAdapterInterface $adapter)
|
||||
public function checkBackOfficeInput()
|
||||
{
|
||||
parent::setValidators($adapter); // TODO: Change the autogenerated stub
|
||||
// TODO: Implement checkBackOfficeInput() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate current Rule param to be validated from adapter
|
||||
* Check if Checkout inputs are relevant or not
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
* @return bool
|
||||
*/
|
||||
protected function setParametersToValidate(CouponAdapterInterface $adapter)
|
||||
public function checkCheckoutInput()
|
||||
{
|
||||
parent::setParametersToValidate($adapter); // TODO: Change the autogenerated stub
|
||||
// TODO: Implement checkCheckoutInput() method.
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
namespace Thelia\Coupon\Rule;
|
||||
|
||||
use Thelia\Coupon\CouponAdapterInterface;
|
||||
|
||||
/**
|
||||
* Created by JetBrains PhpStorm.
|
||||
* Date: 8/19/13
|
||||
@@ -34,19 +36,6 @@ namespace Thelia\Coupon\Rule;
|
||||
*/
|
||||
class AvailableForRepeatedPeriod extends AvailableForPeriod
|
||||
{
|
||||
/**
|
||||
* Generate current Rule validator from adapter
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
*/
|
||||
protected function setValidators(CouponAdapterInterface $adapter)
|
||||
{
|
||||
parent::setValidators($adapter); // TODO: Change the autogenerated stub
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate current Rule param to be validated from adapter
|
||||
@@ -61,4 +50,24 @@ class AvailableForRepeatedPeriod extends AvailableForPeriod
|
||||
{
|
||||
parent::setParametersToValidate($adapter); // TODO: Change the autogenerated stub
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if backoffice inputs are relevant or not
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function checkBackOfficeInput()
|
||||
{
|
||||
// TODO: Implement checkBackOfficeInput() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Checkout inputs are relevant or not
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function checkCheckoutInput()
|
||||
{
|
||||
// TODO: Implement checkCheckoutInput() method.
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,8 @@ class AvailableForTotalAmount extends CouponRuleAbstract
|
||||
*/
|
||||
protected function setValidatorsFromAdapter(CouponAdapterInterface $adapter)
|
||||
{
|
||||
$adapter->getRule($this);
|
||||
// $adapter->getRule($this);
|
||||
// @todo implement
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,31 +34,5 @@ namespace Thelia\Coupon\Rule;
|
||||
*/
|
||||
class AvailableForTotalAmountForCategoryY extends AvailableForTotalAmount
|
||||
{
|
||||
/**
|
||||
* Generate current Rule validator from adapter
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
*/
|
||||
protected function setValidators(CouponAdapterInterface $adapter)
|
||||
{
|
||||
parent::setValidators($adapter); // TODO: Change the autogenerated stub
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate current Rule param to be validated from adapter
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
*/
|
||||
protected function setParametersToValidate(CouponAdapterInterface $adapter)
|
||||
{
|
||||
parent::setParametersToValidate($adapter); // TODO: Change the autogenerated stub
|
||||
}
|
||||
}
|
||||
@@ -23,8 +23,6 @@
|
||||
|
||||
namespace Thelia\Coupon\Rule;
|
||||
|
||||
use Thelia\Type\IntType;
|
||||
|
||||
/**
|
||||
* Created by JetBrains PhpStorm.
|
||||
* Date: 8/19/13
|
||||
@@ -38,32 +36,25 @@ use Thelia\Type\IntType;
|
||||
*/
|
||||
class AvailableForXArticles extends CouponRuleAbstract
|
||||
{
|
||||
|
||||
/**
|
||||
* Generate current Rule validator from adapter
|
||||
* Check if backoffice inputs are relevant or not
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
* @return bool
|
||||
*/
|
||||
protected function setValidators(CouponAdapterInterface $adapter)
|
||||
public function checkBackOfficeInput()
|
||||
{
|
||||
parent::setValidators($adapter); // TODO: Change the autogenerated stub
|
||||
// TODO: Implement checkBackOfficeInput() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate current Rule param to be validated from adapter
|
||||
* Check if Checkout inputs are relevant or not
|
||||
*
|
||||
* @param CouponAdapterInterface $adapter allowing to gather
|
||||
* all necessary Thelia variables
|
||||
*
|
||||
* @throws \Symfony\Component\Intl\Exception\NotImplementedException
|
||||
* @return $this
|
||||
* @return bool
|
||||
*/
|
||||
protected function setParametersToValidate(CouponAdapterInterface $adapter)
|
||||
public function checkCheckoutInput()
|
||||
{
|
||||
parent::setParametersToValidate($adapter); // TODO: Change the autogenerated stub
|
||||
// TODO: Implement checkCheckoutInput() method.
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,8 +23,6 @@
|
||||
|
||||
namespace Thelia\Coupon\Rule;
|
||||
|
||||
use Thelia\Coupon\CouponAdapterInterface;
|
||||
|
||||
/**
|
||||
* Created by JetBrains PhpStorm.
|
||||
* Date: 8/19/13
|
||||
|
||||
Reference in New Issue
Block a user