mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-07 07:14:58 +00:00
fix cs
This commit is contained in:
@@ -18,19 +18,18 @@ use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Chill\PersonBundle\Repository\Household\PositionRepository;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\Form\Extension\Core\Type\DateType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final class HouseholdPositionAggregator implements AggregatorInterface, ExportElementValidatedInterface
|
||||
{
|
||||
private TranslatorInterface $translator;
|
||||
|
||||
private PositionRepository $positionRepository;
|
||||
|
||||
private TranslatableStringHelper $translatableStringHelper;
|
||||
|
||||
private TranslatorInterface $translator;
|
||||
|
||||
public function __construct(TranslatorInterface $translator, TranslatableStringHelper $translatableStringHelper, PositionRepository $positionRepository)
|
||||
{
|
||||
$this->translator = $translator;
|
||||
@@ -70,7 +69,6 @@ final class HouseholdPositionAggregator implements AggregatorInterface, ExportEl
|
||||
} else {
|
||||
$qb->groupBy('household_position_aggregator');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function applyOn()
|
||||
|
@@ -18,7 +18,6 @@ use Chill\PersonBundle\Repository\MaritalStatusRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
|
||||
final class MaritalStatusAggregator implements AggregatorInterface
|
||||
{
|
||||
private MaritalStatusRepository $maritalStatusRepository;
|
||||
|
@@ -124,19 +124,17 @@ final class NationalityAggregator implements AggregatorInterface, ExportElementV
|
||||
->getQuery()
|
||||
->getResult(\Doctrine\ORM\Query::HYDRATE_SCALAR);
|
||||
|
||||
|
||||
// initialize array and add blank key for null values
|
||||
$labels = [
|
||||
'' => $this->translator->trans('without data'),
|
||||
'_header' => $this->translator->trans('Nationality'),
|
||||
];
|
||||
|
||||
|
||||
foreach ($countries as $row) {
|
||||
$labels[$row['c_countryCode']] = $this->translatableStringHelper->localize($row['c_name']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ('continent' === $data['group_by_level']) {
|
||||
$labels = [
|
||||
'EU' => $this->translator->trans('Europe'),
|
||||
@@ -151,10 +149,9 @@ final class NationalityAggregator implements AggregatorInterface, ExportElementV
|
||||
];
|
||||
}
|
||||
|
||||
return function ($value) use ($labels): string {
|
||||
return static function ($value) use ($labels): string {
|
||||
return $labels[$value];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
public function getQueryKeys($data)
|
||||
|
Reference in New Issue
Block a user