fix code style for symfony 5

This commit is contained in:
Julien Fastré 2024-07-03 13:29:22 +02:00
parent 54d045f261
commit ead1abb825
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
17 changed files with 25 additions and 39 deletions

View File

@ -22,9 +22,7 @@ class EventTypeAggregator implements AggregatorInterface
{
final public const KEY = 'event_type_aggregator';
public function __construct(protected EventTypeRepository $eventTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function __construct(protected EventTypeRepository $eventTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper) {}
public function addRole(): ?string
{

View File

@ -22,9 +22,7 @@ class RoleAggregator implements AggregatorInterface
{
final public const KEY = 'part_role_aggregator';
public function __construct(protected RoleRepository $roleRepository, protected TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function __construct(protected RoleRepository $roleRepository, protected TranslatableStringHelperInterface $translatableStringHelper) {}
public function addRole(): ?string
{

View File

@ -34,9 +34,7 @@ readonly class CountEventParticipations implements ExportInterface, GroupedExpor
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -34,9 +34,7 @@ readonly class CountEvents implements ExportInterface, GroupedExportInterface
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@ -23,9 +23,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class EventDateFilter implements FilterInterface
{
public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}
public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter) {}
public function addRole(): ?string
{

View File

@ -27,8 +27,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac
public function __construct(
protected TranslatableStringHelperInterface $translatableStringHelper,
protected EventTypeRepository $eventTypeRepository
) {
}
) {}
public function addRole(): ?string
{

View File

@ -27,8 +27,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface
public function __construct(
protected TranslatableStringHelperInterface $translatableStringHelper,
protected RoleRepository $roleRepository
) {
}
) {}
public function addRole(): ?string
{

View File

@ -28,7 +28,7 @@ class CountEventParticipationsTest extends KernelTestCase
{
parent::setUp();
self::bootKernel();
$this->countEventParticipations = self::$container->get(CountEventParticipations::class);
$this->countEventParticipations = self::getContainer()->get(CountEventParticipations::class);
}
public function testExecuteQuery(): void

View File

@ -28,7 +28,7 @@ class CountEventTest extends KernelTestCase
{
parent::setUp();
self::bootKernel();
$this->countEvents = self::$container->get(CountEvents::class);
$this->countEvents = self::getContainer()->get(CountEvents::class);
}
public function testExecuteQuery(): void

View File

@ -29,7 +29,7 @@ class EventDateAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::$container->get(EventDateAggregator::class);
$this->aggregator = self::getContainer()->get(EventDateAggregator::class);
}
public function getAggregator()
@ -48,7 +48,7 @@ class EventDateAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
$em = self::getContainer()->get(EntityManagerInterface::class);
return [
$em->createQueryBuilder()

View File

@ -29,7 +29,7 @@ class EventTypeAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::$container->get(EventTypeAggregator::class);
$this->aggregator = self::getContainer()->get(EventTypeAggregator::class);
}
public function getAggregator()
@ -48,7 +48,7 @@ class EventTypeAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
$em = self::getContainer()->get(EntityManagerInterface::class);
return [
$em->createQueryBuilder()

View File

@ -30,7 +30,7 @@ class RoleAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::$container->get(RoleAggregator::class);
$this->aggregator = self::getContainer()->get(RoleAggregator::class);
}
public function getAggregator()
@ -49,7 +49,7 @@ class RoleAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
$em = self::getContainer()->get(EntityManagerInterface::class);
return [
$em->createQueryBuilder()

View File

@ -32,7 +32,7 @@ class EventDateFilterTest extends AbstractFilterTest
parent::setUp();
self::bootKernel();
$this->rollingDateConverter = self::$container->get(RollingDateConverterInterface::class);
$this->rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class);
}
public function getFilter()
@ -54,7 +54,7 @@ class EventDateFilterTest extends AbstractFilterTest
{
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
$em = self::getContainer()->get(EntityManagerInterface::class);
return [
$em->createQueryBuilder()

View File

@ -30,7 +30,7 @@ class EventTypeFilterTest extends AbstractFilterTest
protected function setUp(): void
{
self::bootKernel();
$this->filter = self::$container->get(EventTypeFilter::class);
$this->filter = self::getContainer()->get(EventTypeFilter::class);
}
public function getFilter(): EventTypeFilter|\Chill\MainBundle\Export\FilterInterface
@ -42,7 +42,7 @@ class EventTypeFilterTest extends AbstractFilterTest
{
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
$em = self::getContainer()->get(EntityManagerInterface::class);
$array = $em->createQueryBuilder()
->from(EventType::class, 'et')
@ -65,7 +65,7 @@ class EventTypeFilterTest extends AbstractFilterTest
{
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
$em = self::getContainer()->get(EntityManagerInterface::class);
return [
$em->createQueryBuilder()

View File

@ -32,7 +32,7 @@ class RoleFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::$container->get(RoleFilter::class);
$this->filter = self::getContainer()->get(RoleFilter::class);
}
public function getFilter()
@ -43,7 +43,7 @@ class RoleFilterTest extends AbstractFilterTest
public function getFormData(): array
{
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
$em = self::getContainer()->get(EntityManagerInterface::class);
$array = $em->createQueryBuilder()
->from(Role::class, 'r')
@ -67,7 +67,7 @@ class RoleFilterTest extends AbstractFilterTest
{
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
$em = self::getContainer()->get(EntityManagerInterface::class);
return [
$em->createQueryBuilder()

View File

@ -35,6 +35,6 @@ class LoadAddressesLUFromBDAddressCommand extends Command
{
$this->addressImporter->import();
return 0;
return Command::SUCCESS;
}
}

View File

@ -19,9 +19,7 @@ class AddressReferenceLU
{
private const RELEASE = 'https://data.public.lu/fr/datasets/r/5cadc5b8-6a7d-4283-87bc-f9e58dd771f7';
public function __construct(private readonly HttpClientInterface $client, private readonly AddressReferenceBaseImporter $addressBaseImporter, private readonly PostalCodeBaseImporter $postalCodeBaseImporter, private readonly AddressToReferenceMatcher $addressToReferenceMatcher)
{
}
public function __construct(private readonly HttpClientInterface $client, private readonly AddressReferenceBaseImporter $addressBaseImporter, private readonly PostalCodeBaseImporter $postalCodeBaseImporter, private readonly AddressToReferenceMatcher $addressToReferenceMatcher) {}
public function import(): void
{