Php cs fixes

This commit is contained in:
Julie Lenaerts 2024-10-22 09:16:15 +02:00
parent 5786759daa
commit 30b66d5806
2 changed files with 2 additions and 5 deletions

View File

@ -18,7 +18,6 @@ use Chill\MainBundle\Form\Type\TranslatableStringFormType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\EnumType; use Symfony\Component\Form\Extension\Core\Type\EnumType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\NumberType; use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@ -18,9 +18,7 @@ use Chill\MainBundle\Export\FilterInterface;
use Chill\MainBundle\Repository\GenderRepository; use Chill\MainBundle\Repository\GenderRepository;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Export\Declarations; use Chill\PersonBundle\Export\Declarations;
use Doctrine\ORM\Query\Expr;
use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\QueryBuilder;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface;
@ -54,7 +52,7 @@ class GenderFilter implements
} }
$qb->andWhere($clause); $qb->andWhere($clause);
$qb->setParameter('person_gender', array_filter($acceptedGenders, fn($gender) => $gender !== null)); $qb->setParameter('person_gender', array_filter($acceptedGenders, fn ($gender) => null !== $gender));
} }
public function applyOn() public function applyOn()
@ -91,7 +89,7 @@ class GenderFilter implements
'unknown' => null, 'unknown' => null,
]; ];
$transformedData['accepted_genders_entity'] = array_map(fn($gender) => $genderMapping[$gender] ?? null, $before['accepted_genders']); $transformedData['accepted_genders_entity'] = array_map(fn ($gender) => $genderMapping[$gender] ?? null, $before['accepted_genders']);
} }
return $transformedData; return $transformedData;