Fix cs with php-cs-fier version 3.49

This commit is contained in:
Julien Fastré 2024-02-08 21:12:27 +01:00
parent 8e65ad9476
commit 2ed42e1a2c
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
11 changed files with 24 additions and 17 deletions

View File

@ -57,7 +57,8 @@ final class EventController extends AbstractController
private readonly TranslatorInterface $translator,
private readonly PaginatorFactory $paginator,
private readonly Security $security,
) {}
) {
}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{event_id}/delete", name="chill_event__event_delete", requirements={"event_id"="\d+"}, methods={"GET", "DELETE"})

View File

@ -40,7 +40,8 @@ final readonly class EventListController
private PaginatorFactoryInterface $paginatorFactory,
private TranslatableStringHelperInterface $translatableStringHelper,
private UrlGeneratorInterface $urlGenerator,
) {}
) {
}
/**
* @Route("{_locale}/event/event/list", name="chill_event_event_list")

View File

@ -41,7 +41,8 @@ final class ParticipationController extends AbstractController
private readonly TranslatorInterface $translator,
private readonly EventRepository $eventRepository,
private readonly PersonRepository $personRepository,
) {}
) {
}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/create", name="chill_event_participation_create")
@ -328,7 +329,7 @@ final class ParticipationController extends AbstractController
*/
public function editMultipleAction($event_id): Response|\Symfony\Component\HttpFoundation\RedirectResponse
{
$event = $this->getDoctrine()->getRepository(\Chill\EventBundle\Entity\Event::class)
$event = $this->getDoctrine()->getRepository(Event::class)
->find($event_id);
if (null === $event) {

View File

@ -15,7 +15,6 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\HasCenterInterface;
use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\Scope;

View File

@ -22,7 +22,8 @@ final readonly class SectionMenuBuilder implements LocalMenuBuilderInterface
public function __construct(
private Security $security,
private TranslatorInterface $translator,
) {}
) {
}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{

View File

@ -29,7 +29,8 @@ final readonly class EventACLAwareRepository implements EventACLAwareRepositoryI
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
private EntityManagerInterface $entityManager,
private Security $security,
) {}
) {
}
/**
* @throws NonUniqueResultException

View File

@ -30,7 +30,9 @@ class EventListControllerTest extends WebTestCase
private readonly PaginatorFactory $paginatorFactory;
private readonly Environment $environment;
protected function setUp(): void {}
protected function setUp(): void
{
}
public function testList(): void
{

View File

@ -143,7 +143,7 @@ final class ParticipationControllerTest extends WebTestCase
$client = $this->getClientAuthenticated();
$this->prepareDI();
/** @var \Chill\EventBundle\Entity\Event $event */
/** @var Event $event */
$event = $this->getRandomEventWithMultipleParticipations();
$crawler = $client->request('GET', '/fr/event/participation/'.$event->getId().
@ -301,7 +301,7 @@ final class ParticipationControllerTest extends WebTestCase
$this->assertGreaterThan(0, \count($span2));
// as the container has reloaded, reload the event
$event = $this->em->getRepository(\Chill\EventBundle\Entity\Event::class)->find($event->getId());
$event = $this->em->getRepository(Event::class)->find($event->getId());
$this->em->refresh($event);
$this->assertEquals($nbParticipations + 2, $event->getParticipations()->count());
@ -398,7 +398,7 @@ final class ParticipationControllerTest extends WebTestCase
$this->assertTrue($client->getResponse()->isRedirect());
// reload the event and test there is a new participation
$event = $this->em->getRepository(\Chill\EventBundle\Entity\Event::class)
$event = $this->em->getRepository(Event::class)
->find($event->getId());
$this->em->refresh($event);
@ -451,7 +451,7 @@ final class ParticipationControllerTest extends WebTestCase
$this->assertGreaterThan(0, \count($span));
// as the container has reloaded, reload the event
$event = $this->em->getRepository(\Chill\EventBundle\Entity\Event::class)->find($event->getId());
$event = $this->em->getRepository(Event::class)->find($event->getId());
$this->em->refresh($event);
$this->assertEquals($nbParticipations + 1, $event->getParticipations()->count());
@ -476,7 +476,7 @@ final class ParticipationControllerTest extends WebTestCase
* @param string $centerName
* @param type $circleName
*
* @return \Chill\EventBundle\Entity\Event
* @return Event
*/
protected function getRandomEventWithMultipleParticipations(
$centerName = 'Center A',

View File

@ -25,7 +25,7 @@ interface PaginatorFactoryInterface
* @param string|null $route the specific route to use in pages
* @param array|null $routeParameters the specific route parameters to use in pages
*/
public function create(int $totalItems, string $route = null, array $routeParameters = null): PaginatorInterface;
public function create(int $totalItems, ?string $route = null, ?array $routeParameters = null): PaginatorInterface;
public function getCurrentItemsPerPage(): int;

View File

@ -23,9 +23,10 @@ class DummyPaginator implements PaginatorFactoryInterface
private readonly UrlGeneratorInterface $urlGenerator,
private readonly string $route,
private readonly array $routeParameters = []
) {}
) {
}
public function create(int $totalItems, string $route = null, array $routeParameters = null): PaginatorInterface
public function create(int $totalItems, ?string $route = null, ?array $routeParameters = null): PaginatorInterface
{
return new Paginator(
$totalItems,