php cs fixes

This commit is contained in:
2024-10-08 16:49:54 +02:00
parent f34c94fd65
commit fa64f44cf1
15 changed files with 101 additions and 42 deletions

View File

@@ -1,5 +1,14 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\MainBundle\Form;
use Chill\MainBundle\Entity\Gender;
@@ -10,7 +19,6 @@ use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\EnumType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -22,24 +30,19 @@ class GenderType extends AbstractType
->add('label', TranslatableStringFormType::class, [
'required' => true,
])
/* ->add('icon', EnumType::class, [
'class' => GenderIconEnum::class,
'label_html' => true,
'expanded' => false,
'mapped' => true,
])*/
->add('icon', ChoiceType::class, [
'choices' => GenderIconEnum::cases(),
'expanded' => true,
'multiple' => false,
'mapped' => true,
'choice_label' => fn(GenderIconEnum $enum) => '<i class="' . strtolower($enum->value) . '"></i>',
'choice_value' => fn(?GenderIconEnum $enum) => null !== $enum ? $enum->value : null,
'choice_label' => fn (GenderIconEnum $enum) => '<i class="'.strtolower($enum->value).'"></i>',
'choice_value' => fn (?GenderIconEnum $enum) => null !== $enum ? $enum->value : null,
'label' => 'gender.admin.Select Gender Icon',
'label_html' => true,
])
->add('genderTranslation', EnumType::class, [
'class' => GenderEnum::class,
'choice_label' => fn (GenderEnum $enum) => $enum->value,
'label' => 'gender.admin.Select Gender Translation',
])
->add('active', ChoiceType::class, [