This commit is contained in:
Manuel Raynaud
2013-10-18 09:28:17 +02:00
parent 12b5a81364
commit 52ed89f1aa
70 changed files with 136 additions and 244 deletions

View File

@@ -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';
}
}
}

View File

@@ -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';
}
}
}

View File

@@ -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';
}
}
}

View File

@@ -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';
}
}
}

View File

@@ -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
{

View File

@@ -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';
}
}
}

View File

@@ -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';
}
}
}

View File

@@ -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
{

View File

@@ -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);