diff --git a/src/Bundle/ChillMainBundle/Form/GenderType.php b/src/Bundle/ChillMainBundle/Form/GenderType.php index d1326b383..19a4af6cd 100644 --- a/src/Bundle/ChillMainBundle/Form/GenderType.php +++ b/src/Bundle/ChillMainBundle/Form/GenderType.php @@ -18,7 +18,6 @@ use Chill\MainBundle\Form\Type\TranslatableStringFormType; 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\NumberType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php index bd698fdc8..9f15b5642 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php @@ -18,9 +18,7 @@ use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\GenderRepository; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\PersonBundle\Export\Declarations; -use Doctrine\ORM\Query\Expr; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; @@ -54,7 +52,7 @@ class GenderFilter implements } $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() @@ -91,7 +89,7 @@ class GenderFilter implements '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;