mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 04:53:49 +00:00
cs: Enable more risky rules.
This commit is contained in:
@@ -21,6 +21,10 @@ use Symfony\Bridge\Twig\TwigEngine;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use function array_key_exists;
|
||||
use function count;
|
||||
use function in_array;
|
||||
use function is_array;
|
||||
use function LogicException;
|
||||
|
||||
class CustomFieldChoice extends AbstractCustomField
|
||||
@@ -229,10 +233,10 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
|
||||
if ($cf->getOptions()[self::MULTIPLE]) {
|
||||
if ($cf->getOptions()[self::ALLOW_OTHER]) {
|
||||
return \in_array($choiceSlug, $this->deserialize($data, $cf)['_choices']);
|
||||
return in_array($choiceSlug, $this->deserialize($data, $cf)['_choices']);
|
||||
}
|
||||
|
||||
return \in_array($choiceSlug, $this->deserialize($data, $cf));
|
||||
return in_array($choiceSlug, $this->deserialize($data, $cf));
|
||||
}
|
||||
|
||||
if ($cf->getOptions()[self::ALLOW_OTHER]) {
|
||||
|
@@ -21,6 +21,9 @@ use LogicException;
|
||||
use Symfony\Bridge\Twig\TwigEngine;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use function get_class;
|
||||
use function gettype;
|
||||
use function is_object;
|
||||
|
||||
class CustomFieldLongChoice extends AbstractCustomField
|
||||
{
|
||||
|
@@ -18,6 +18,7 @@ use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use function array_key_exists;
|
||||
|
||||
class CustomFieldText extends AbstractCustomField
|
||||
{
|
||||
|
Reference in New Issue
Block a user