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

@@ -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;

View File

@@ -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());
}
}