mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
php cs fixes
This commit is contained in:
@@ -14,7 +14,6 @@ namespace Chill\PersonBundle\Export\Aggregator\PersonAggregators;
|
||||
use Chill\MainBundle\Export\AggregatorInterface;
|
||||
use Chill\MainBundle\Repository\GenderRepository;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
@@ -12,17 +12,13 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Export\Filter\PersonFilters;
|
||||
|
||||
use Chill\MainBundle\Entity\Gender;
|
||||
use Chill\MainBundle\Entity\GenderEnum;
|
||||
use Chill\MainBundle\Export\ExportElementValidatedInterface;
|
||||
use Chill\MainBundle\Export\FilterInterface;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
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\Extension\Core\Type\EnumType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
@@ -31,9 +27,7 @@ class GenderFilter implements
|
||||
ExportElementValidatedInterface,
|
||||
FilterInterface
|
||||
{
|
||||
public function __construct(private TranslatorInterface $translator, private TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private TranslatorInterface $translator, private TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
@@ -73,7 +67,7 @@ class GenderFilter implements
|
||||
{
|
||||
$builder->add('accepted_genders', EntityType::class, [
|
||||
'class' => Gender::class,
|
||||
'choice_label' => fn(Gender $g) => $this->translatableStringHelper->localize($g->getLabel()),
|
||||
'choice_label' => fn (Gender $g) => $this->translatableStringHelper->localize($g->getLabel()),
|
||||
'multiple' => true,
|
||||
'expanded' => true,
|
||||
]);
|
||||
@@ -92,7 +86,7 @@ class GenderFilter implements
|
||||
if ('null' === $g) {
|
||||
$genders[] = $this->translator->trans('Not given');
|
||||
} else {
|
||||
$genders[] = $this->translatableStringHelper($g->getLabel());
|
||||
$genders[] = $this->translatableStringHelper->localize($g->getLabel());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user