fix cs
This commit is contained in:
@@ -25,12 +25,9 @@ namespace Thelia\Form;
|
||||
use Symfony\Component\Validator\Constraints;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Symfony\Component\Validator\ExecutionContextInterface;
|
||||
use Thelia\Core\Security\AccessManager;
|
||||
use Thelia\Core\Security\Resource\AdminResources;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Model\AdminQuery;
|
||||
use Thelia\Model\ProfileQuery;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
|
||||
class AdministratorCreationForm extends BaseForm
|
||||
{
|
||||
@@ -110,7 +107,7 @@ class AdministratorCreationForm extends BaseForm
|
||||
{
|
||||
$data = $context->getRoot()->getData();
|
||||
|
||||
if($data["password"] === '' && $data["password_confirm"] === '') {
|
||||
if ($data["password"] === '' && $data["password_confirm"] === '') {
|
||||
$context->addViolation("password can't be empty");
|
||||
}
|
||||
|
||||
@@ -118,7 +115,7 @@ class AdministratorCreationForm extends BaseForm
|
||||
$context->addViolation("password confirmation is not the same as password field");
|
||||
}
|
||||
|
||||
if(strlen($data["password"]) < 4) {
|
||||
if (strlen($data["password"]) < 4) {
|
||||
$context->addViolation("password must be composed of at least 4 characters");
|
||||
}
|
||||
}
|
||||
@@ -135,4 +132,4 @@ class AdministratorCreationForm extends BaseForm
|
||||
{
|
||||
return "thelia_admin_administrator_creation";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace Thelia\Form;
|
||||
|
||||
use Symfony\Component\Validator\Constraints;
|
||||
use Symfony\Component\Validator\ExecutionContextInterface;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Model\AdminQuery;
|
||||
|
||||
class AdministratorModificationForm extends AdministratorCreationForm
|
||||
@@ -90,7 +89,7 @@ class AdministratorModificationForm extends AdministratorCreationForm
|
||||
$context->addViolation("password confirmation is not the same as password field");
|
||||
}
|
||||
|
||||
if($data["password"] !== '' && strlen($data["password"]) < 4) {
|
||||
if ($data["password"] !== '' && strlen($data["password"]) < 4) {
|
||||
$context->addViolation("password must be composed of at least 4 characters");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ use Symfony\Component\Validator\Constraints\Email;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
|
||||
/**
|
||||
* Class ContactForm
|
||||
* @package Thelia\Form
|
||||
@@ -107,4 +106,4 @@ class ContactForm extends BaseForm
|
||||
{
|
||||
return 'thelia_contact';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
namespace Thelia\Form;
|
||||
|
||||
use Symfony\Component\Validator\Constraints;
|
||||
use Thelia\Model\ModuleQuery;
|
||||
use Thelia\Module\BaseModule;
|
||||
|
||||
/**
|
||||
* Class CouponCode
|
||||
|
||||
@@ -27,7 +27,6 @@ use Symfony\Component\Validator\Constraints\Date;
|
||||
use Symfony\Component\Validator\Constraints\GreaterThanOrEqual;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Symfony\Component\Validator\Constraints\NotEqualTo;
|
||||
use Symfony\Component\Validator\Constraints\Range;
|
||||
|
||||
/**
|
||||
* Created by JetBrains PhpStorm.
|
||||
|
||||
@@ -26,7 +26,6 @@ use Symfony\Component\Validator\Constraints;
|
||||
use Symfony\Component\Validator\ExecutionContextInterface;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Model\CustomerQuery;
|
||||
|
||||
/**
|
||||
* Class CustomerPasswordUpdateForm
|
||||
|
||||
@@ -22,11 +22,8 @@
|
||||
/*************************************************************************************/
|
||||
namespace Thelia\Form;
|
||||
|
||||
use Symfony\Component\Validator\Constraints;
|
||||
use Symfony\Component\Validator\ExecutionContextInterface;
|
||||
use Thelia\Model\CustomerQuery;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
/**
|
||||
* Class CustomerProfilUpdateForm
|
||||
@@ -69,7 +66,6 @@ class CustomerProfilUpdateForm extends CustomerCreateForm
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
* @param ExecutionContextInterface $context
|
||||
|
||||
@@ -26,7 +26,6 @@ use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Form\BaseForm;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
|
||||
/**
|
||||
* Class LangCreateForm
|
||||
* @package Thelia\Form\Lang
|
||||
@@ -113,4 +112,4 @@ class LangCreateForm extends BaseForm
|
||||
{
|
||||
return 'thelia_language_create';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,11 +24,9 @@
|
||||
namespace Thelia\Form\Lang;
|
||||
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Symfony\Component\Validator\Constraints\Range;
|
||||
use Thelia\Form\BaseForm;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
|
||||
/**
|
||||
* Class LangDefaultBehaviorForm
|
||||
* @package Thelia\Form\Lang
|
||||
@@ -82,4 +80,4 @@ class LangDefaultBehaviorForm extends BaseForm
|
||||
{
|
||||
return 'thelia_lang_defaultBehavior';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace Thelia\Form\Lang;
|
||||
use Symfony\Component\Validator\Constraints\GreaterThan;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
|
||||
|
||||
/**
|
||||
* Class LangUpdateForm
|
||||
* @package Thelia\Form\Lang
|
||||
@@ -51,4 +50,4 @@ class LangUpdateForm extends LangCreateForm
|
||||
{
|
||||
return 'thelia_lang_update';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
namespace Thelia\Form\Lang;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
|
||||
/**
|
||||
* Class LangUrlEvent
|
||||
* @package Thelia\Form\Lang
|
||||
@@ -43,4 +42,4 @@ class LangUrlEvent extends ActionEvent
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Form\BaseForm;
|
||||
use Thelia\Model\LangQuery;
|
||||
|
||||
|
||||
/**
|
||||
* Class LangUrlForm
|
||||
* @package Thelia\Form\Lang
|
||||
@@ -84,4 +83,4 @@ class LangUrlForm extends BaseForm
|
||||
{
|
||||
return 'thelia_language_url';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ use Symfony\Component\Validator\ExecutionContextInterface;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Model\NewsletterQuery;
|
||||
|
||||
|
||||
/**
|
||||
* Class NewsletterForm
|
||||
* @package Thelia\Form
|
||||
@@ -95,4 +94,4 @@ class NewsletterForm extends BaseForm
|
||||
{
|
||||
return 'thelia_newsletter';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,4 +111,4 @@ class ProductDefaultSaleElementUpdateForm extends ProductSaleElementUpdateForm
|
||||
{
|
||||
return "thelia_product_default_sale_element_update_form";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ use Symfony\Component\Validator\Constraints;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Symfony\Component\Validator\ExecutionContextInterface;
|
||||
use Thelia\Core\Security\AccessManager;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Model\ProfileQuery;
|
||||
use Thelia\Model\ModuleQuery;
|
||||
|
||||
@@ -57,7 +56,7 @@ class ProfileUpdateModuleAccessForm extends BaseForm
|
||||
))
|
||||
;
|
||||
|
||||
foreach(ModuleQuery::create()->find() as $module) {
|
||||
foreach (ModuleQuery::create()->find() as $module) {
|
||||
$this->formBuilder->add(
|
||||
self::MODULE_ACCESS_FIELD_PREFIX . ':' . str_replace(".", ":", $module->getCode()),
|
||||
"choice",
|
||||
|
||||
@@ -26,7 +26,6 @@ use Symfony\Component\Validator\Constraints;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Symfony\Component\Validator\ExecutionContextInterface;
|
||||
use Thelia\Core\Security\AccessManager;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Model\ProfileQuery;
|
||||
use Thelia\Model\ResourceQuery;
|
||||
|
||||
@@ -57,7 +56,7 @@ class ProfileUpdateResourceAccessForm extends BaseForm
|
||||
))
|
||||
;
|
||||
|
||||
foreach(ResourceQuery::create()->find() as $resource) {
|
||||
foreach (ResourceQuery::create()->find() as $resource) {
|
||||
$this->formBuilder->add(
|
||||
self::RESOURCE_ACCESS_FIELD_PREFIX . ':' . str_replace(".", ":", $resource->getCode()),
|
||||
"choice",
|
||||
|
||||
@@ -43,7 +43,7 @@ class TaxCreationForm extends BaseForm
|
||||
$types = TaxEngine::getInstance()->getTaxTypeList();
|
||||
$typeList = array();
|
||||
$requirementList = array();
|
||||
foreach($types as $type) {
|
||||
foreach ($types as $type) {
|
||||
$classPath = "\\Thelia\\TaxEngine\\TaxType\\$type";
|
||||
$instance = new $classPath();
|
||||
$typeList[$type] = $instance->getTitle();
|
||||
@@ -65,8 +65,8 @@ class TaxCreationForm extends BaseForm
|
||||
))
|
||||
;
|
||||
|
||||
foreach($requirementList as $type => $requirements) {
|
||||
foreach($requirements as $name => $requirementType) {
|
||||
foreach ($requirementList as $type => $requirements) {
|
||||
foreach ($requirements as $name => $requirementType) {
|
||||
$this->formBuilder
|
||||
->add($type . ':' . $name, new TheliaType(), array(
|
||||
//"instance" => $requirementType,
|
||||
|
||||
Reference in New Issue
Block a user