php cs fixer
This commit is contained in:
@@ -15,15 +15,10 @@ namespace Thelia\Core\Template\Smarty\Plugins;
|
|||||||
use Propel\Runtime\ActiveQuery\Criteria;
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
use Propel\Runtime\Util\PropelModelPager;
|
use Propel\Runtime\Util\PropelModelPager;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
use Thelia\Core\Template\Element\BaseLoop;
|
|
||||||
use Thelia\Core\Template\Element\LoopResult;
|
|
||||||
use Thelia\Core\Template\Smarty\AbstractSmartyPlugin;
|
use Thelia\Core\Template\Smarty\AbstractSmartyPlugin;
|
||||||
use Thelia\Core\Template\Smarty\SmartyPluginDescriptor;
|
use Thelia\Core\Template\Smarty\SmartyPluginDescriptor;
|
||||||
|
|
||||||
use Thelia\Core\Template\Element\Exception\ElementNotFoundException;
|
|
||||||
use Thelia\Core\Template\Element\Exception\InvalidElementException;
|
|
||||||
use Thelia\Core\Translation\Translator;
|
use Thelia\Core\Translation\Translator;
|
||||||
use Thelia\Log\Tlog;
|
|
||||||
use Thelia\Model\AddressQuery;
|
use Thelia\Model\AddressQuery;
|
||||||
use Thelia\Model\ConfigQuery;
|
use Thelia\Model\ConfigQuery;
|
||||||
use Thelia\Model\Country;
|
use Thelia\Model\Country;
|
||||||
@@ -45,14 +40,12 @@ class CartPostage extends AbstractSmartyPlugin
|
|||||||
|
|
||||||
protected $loopDefinition = array();
|
protected $loopDefinition = array();
|
||||||
|
|
||||||
|
|
||||||
/** @var \Thelia\Core\HttpFoundation\Request The Request */
|
/** @var \Thelia\Core\HttpFoundation\Request The Request */
|
||||||
protected $request;
|
protected $request;
|
||||||
|
|
||||||
/** @var \Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher The Dispatcher */
|
/** @var \Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher The Dispatcher */
|
||||||
protected $dispatcher;
|
protected $dispatcher;
|
||||||
|
|
||||||
|
|
||||||
/** @var \Thelia\Core\Security\SecurityContext The Security Context */
|
/** @var \Thelia\Core\Security\SecurityContext The Security Context */
|
||||||
protected $securityContext;
|
protected $securityContext;
|
||||||
|
|
||||||
@@ -74,7 +67,6 @@ class CartPostage extends AbstractSmartyPlugin
|
|||||||
/** @var boolean $isCustomizable indicate if customer can change the country */
|
/** @var boolean $isCustomizable indicate if customer can change the country */
|
||||||
protected $isCustomizable = true;
|
protected $isCustomizable = true;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ContainerInterface $container
|
* @param ContainerInterface $container
|
||||||
*/
|
*/
|
||||||
@@ -88,7 +80,6 @@ class CartPostage extends AbstractSmartyPlugin
|
|||||||
$this->translator = $container->get("thelia.translator");
|
$this->translator = $container->get("thelia.translator");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get postage amount for cart
|
* Get postage amount for cart
|
||||||
*
|
*
|
||||||
@@ -122,7 +113,6 @@ class CartPostage extends AbstractSmartyPlugin
|
|||||||
$template->assign('is_customizable', $this->isCustomizable);
|
$template->assign('is_customizable', $this->isCustomizable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the delivery country for a customer
|
* Retrieve the delivery country for a customer
|
||||||
*
|
*
|
||||||
@@ -152,6 +142,7 @@ class CartPostage extends AbstractSmartyPlugin
|
|||||||
|
|
||||||
if (null !== $address) {
|
if (null !== $address) {
|
||||||
$this->isCustomizable = false;
|
$this->isCustomizable = false;
|
||||||
|
|
||||||
return $address->getCountry();
|
return $address->getCountry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -171,9 +162,9 @@ class CartPostage extends AbstractSmartyPlugin
|
|||||||
// get default country for store.
|
// get default country for store.
|
||||||
try {
|
try {
|
||||||
$country = Country::getDefaultCountry();
|
$country = Country::getDefaultCountry();
|
||||||
|
|
||||||
return $country;
|
return $country;
|
||||||
}
|
} catch (\LogicException $e) {
|
||||||
catch (\LogicException $e) {
|
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,7 +182,6 @@ class CartPostage extends AbstractSmartyPlugin
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the cheapest delivery for country
|
* Retrieve the cheapest delivery for country
|
||||||
*
|
*
|
||||||
@@ -235,7 +225,6 @@ class CartPostage extends AbstractSmartyPlugin
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the various smarty plugins handled by this class
|
* Defines the various smarty plugins handled by this class
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -22,10 +22,8 @@ class Redirect
|
|||||||
{
|
{
|
||||||
if (false == Tlog::getInstance()->showRedirect($url)) {
|
if (false == Tlog::getInstance()->showRedirect($url)) {
|
||||||
$response = new RedirectResponse($url, $status);
|
$response = new RedirectResponse($url, $status);
|
||||||
foreach ($cookies as $cookie)
|
foreach ($cookies as $cookie) {
|
||||||
{
|
if (!$cookie instanceof Cookie) {
|
||||||
if (!$cookie instanceof Cookie)
|
|
||||||
{
|
|
||||||
throw new \InvalidArgumentException(sprintf('Third parameter is not a valid Cookie object.'));
|
throw new \InvalidArgumentException(sprintf('Third parameter is not a valid Cookie object.'));
|
||||||
}
|
}
|
||||||
$response->headers->setCookie($cookie);
|
$response->headers->setCookie($cookie);
|
||||||
|
|||||||
Reference in New Issue
Block a user