fix cs
This commit is contained in:
@@ -28,7 +28,6 @@ use Symfony\Component\Validator\Constraints\GreaterThan;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Form\BaseForm;
|
||||
|
||||
|
||||
/**
|
||||
* Class AreaCountryForm
|
||||
* @package Thelia\Form\Area
|
||||
@@ -86,4 +85,4 @@ class AreaCountryForm extends BaseForm
|
||||
{
|
||||
return 'thelia_area_country';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ use Thelia\Core\Translation\Translator;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Form\BaseForm;
|
||||
|
||||
|
||||
/**
|
||||
* Class AreaCreateForm
|
||||
* @package Thelia\Form\Shipping
|
||||
@@ -76,4 +75,4 @@ class AreaCreateForm extends BaseForm
|
||||
{
|
||||
return 'thelia_area_creation';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace Thelia\Form\Area;
|
||||
use Symfony\Component\Validator\Constraints\GreaterThan;
|
||||
use Thelia\Form\Area\AreaCreateForm;
|
||||
|
||||
|
||||
/**
|
||||
* Class AreaModificationForm
|
||||
* @package Thelia\Form\Shipping
|
||||
@@ -46,4 +45,4 @@ class AreaModificationForm extends AreaCreateForm
|
||||
{
|
||||
return 'thelia_area_modification';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Form\BaseForm;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
|
||||
/**
|
||||
* Class AreaPostageForm
|
||||
* @package Thelia\Form\Area
|
||||
@@ -85,4 +84,4 @@ class AreaPostageForm extends BaseForm
|
||||
{
|
||||
return 'thelia_area_postage';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
namespace Thelia\Form;
|
||||
|
||||
use Symfony\Component\Validator\Constraints\GreaterThan;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
class CountryModificationForm extends CountryCreationForm
|
||||
{
|
||||
|
||||
@@ -28,7 +28,6 @@ use Symfony\Component\Validator\Constraints\GreaterThan;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Form\BaseForm;
|
||||
|
||||
|
||||
/**
|
||||
* Class ShippingZoneAddArea
|
||||
* @package Thelia\Form\ShippingZone
|
||||
@@ -84,4 +83,4 @@ class ShippingZoneAddArea extends BaseForm
|
||||
{
|
||||
return 'thelia_shippingzone_area';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
namespace Thelia\Form\ShippingZone;
|
||||
|
||||
|
||||
/**
|
||||
* Class ShippingZoneRemoveArea
|
||||
* @package Thelia\Form\ShippingZone
|
||||
@@ -39,4 +38,4 @@ class ShippingZoneRemoveArea extends ShippingZoneAddArea
|
||||
{
|
||||
return 'thelia_shippingzone_remove_area';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,6 @@ namespace Thelia\Form;
|
||||
|
||||
use Symfony\Component\Validator\Constraints;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Model\CountryQuery;
|
||||
|
||||
class TaxRuleCreationForm extends BaseForm
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ class TaxRuleTaxListUpdateForm extends BaseForm
|
||||
protected function buildForm()
|
||||
{
|
||||
$countryList = array();
|
||||
foreach(CountryQuery::create()->find() as $country) {
|
||||
foreach (CountryQuery::create()->find() as $country) {
|
||||
$countryList[$country->getId()] = $country->getId();
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ class TaxRuleTaxListUpdateForm extends BaseForm
|
||||
public function verifyTaxList($value, ExecutionContextInterface $context)
|
||||
{
|
||||
$jsonType = new JsonType();
|
||||
if(!$jsonType->isValid($value)) {
|
||||
if (!$jsonType->isValid($value)) {
|
||||
$context->addViolation("Tax list is not valid JSON");
|
||||
}
|
||||
|
||||
@@ -104,10 +104,10 @@ class TaxRuleTaxListUpdateForm extends BaseForm
|
||||
|
||||
/* check we have 2 level max */
|
||||
|
||||
foreach($taxList as $taxLevel1) {
|
||||
if(is_array($taxLevel1)) {
|
||||
foreach($taxLevel1 as $taxLevel2) {
|
||||
if(is_array($taxLevel2)) {
|
||||
foreach ($taxList as $taxLevel1) {
|
||||
if (is_array($taxLevel1)) {
|
||||
foreach ($taxLevel1 as $taxLevel2) {
|
||||
if (is_array($taxLevel2)) {
|
||||
$context->addViolation("Bad tax list JSON");
|
||||
} else {
|
||||
$taxModel = TaxQuery::create()->findPk($taxLevel2);
|
||||
|
||||
Reference in New Issue
Block a user