mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix cs with php-cs-fier version 3.49
This commit is contained in:
parent
8e65ad9476
commit
2ed42e1a2c
@ -57,7 +57,8 @@ final class EventController extends AbstractController
|
|||||||
private readonly TranslatorInterface $translator,
|
private readonly TranslatorInterface $translator,
|
||||||
private readonly PaginatorFactory $paginator,
|
private readonly PaginatorFactory $paginator,
|
||||||
private readonly Security $security,
|
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"})
|
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{event_id}/delete", name="chill_event__event_delete", requirements={"event_id"="\d+"}, methods={"GET", "DELETE"})
|
||||||
|
@ -40,7 +40,8 @@ final readonly class EventListController
|
|||||||
private PaginatorFactoryInterface $paginatorFactory,
|
private PaginatorFactoryInterface $paginatorFactory,
|
||||||
private TranslatableStringHelperInterface $translatableStringHelper,
|
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
private UrlGeneratorInterface $urlGenerator,
|
private UrlGeneratorInterface $urlGenerator,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Route("{_locale}/event/event/list", name="chill_event_event_list")
|
* @Route("{_locale}/event/event/list", name="chill_event_event_list")
|
||||||
|
@ -41,7 +41,8 @@ final class ParticipationController extends AbstractController
|
|||||||
private readonly TranslatorInterface $translator,
|
private readonly TranslatorInterface $translator,
|
||||||
private readonly EventRepository $eventRepository,
|
private readonly EventRepository $eventRepository,
|
||||||
private readonly PersonRepository $personRepository,
|
private readonly PersonRepository $personRepository,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/create", name="chill_event_participation_create")
|
* @\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
|
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);
|
->find($event_id);
|
||||||
|
|
||||||
if (null === $event) {
|
if (null === $event) {
|
||||||
|
@ -15,7 +15,6 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
|
|||||||
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
|
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
|
||||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
||||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
|
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
|
||||||
use Chill\MainBundle\Entity\Center;
|
|
||||||
use Chill\MainBundle\Entity\HasCenterInterface;
|
use Chill\MainBundle\Entity\HasCenterInterface;
|
||||||
use Chill\MainBundle\Entity\HasScopeInterface;
|
use Chill\MainBundle\Entity\HasScopeInterface;
|
||||||
use Chill\MainBundle\Entity\Scope;
|
use Chill\MainBundle\Entity\Scope;
|
||||||
|
@ -22,7 +22,8 @@ final readonly class SectionMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private Security $security,
|
private Security $security,
|
||||||
private TranslatorInterface $translator,
|
private TranslatorInterface $translator,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,8 @@ final readonly class EventACLAwareRepository implements EventACLAwareRepositoryI
|
|||||||
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
|
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
|
||||||
private EntityManagerInterface $entityManager,
|
private EntityManagerInterface $entityManager,
|
||||||
private Security $security,
|
private Security $security,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws NonUniqueResultException
|
* @throws NonUniqueResultException
|
||||||
|
@ -30,7 +30,9 @@ class EventListControllerTest extends WebTestCase
|
|||||||
private readonly PaginatorFactory $paginatorFactory;
|
private readonly PaginatorFactory $paginatorFactory;
|
||||||
private readonly Environment $environment;
|
private readonly Environment $environment;
|
||||||
|
|
||||||
protected function setUp(): void {}
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function testList(): void
|
public function testList(): void
|
||||||
{
|
{
|
||||||
|
@ -143,7 +143,7 @@ final class ParticipationControllerTest extends WebTestCase
|
|||||||
$client = $this->getClientAuthenticated();
|
$client = $this->getClientAuthenticated();
|
||||||
$this->prepareDI();
|
$this->prepareDI();
|
||||||
|
|
||||||
/** @var \Chill\EventBundle\Entity\Event $event */
|
/** @var Event $event */
|
||||||
$event = $this->getRandomEventWithMultipleParticipations();
|
$event = $this->getRandomEventWithMultipleParticipations();
|
||||||
|
|
||||||
$crawler = $client->request('GET', '/fr/event/participation/'.$event->getId().
|
$crawler = $client->request('GET', '/fr/event/participation/'.$event->getId().
|
||||||
@ -301,7 +301,7 @@ final class ParticipationControllerTest extends WebTestCase
|
|||||||
$this->assertGreaterThan(0, \count($span2));
|
$this->assertGreaterThan(0, \count($span2));
|
||||||
|
|
||||||
// as the container has reloaded, reload the event
|
// 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->em->refresh($event);
|
||||||
|
|
||||||
$this->assertEquals($nbParticipations + 2, $event->getParticipations()->count());
|
$this->assertEquals($nbParticipations + 2, $event->getParticipations()->count());
|
||||||
@ -398,7 +398,7 @@ final class ParticipationControllerTest extends WebTestCase
|
|||||||
$this->assertTrue($client->getResponse()->isRedirect());
|
$this->assertTrue($client->getResponse()->isRedirect());
|
||||||
|
|
||||||
// reload the event and test there is a new participation
|
// 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());
|
->find($event->getId());
|
||||||
$this->em->refresh($event);
|
$this->em->refresh($event);
|
||||||
|
|
||||||
@ -451,7 +451,7 @@ final class ParticipationControllerTest extends WebTestCase
|
|||||||
$this->assertGreaterThan(0, \count($span));
|
$this->assertGreaterThan(0, \count($span));
|
||||||
|
|
||||||
// as the container has reloaded, reload the event
|
// 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->em->refresh($event);
|
||||||
|
|
||||||
$this->assertEquals($nbParticipations + 1, $event->getParticipations()->count());
|
$this->assertEquals($nbParticipations + 1, $event->getParticipations()->count());
|
||||||
@ -476,7 +476,7 @@ final class ParticipationControllerTest extends WebTestCase
|
|||||||
* @param string $centerName
|
* @param string $centerName
|
||||||
* @param type $circleName
|
* @param type $circleName
|
||||||
*
|
*
|
||||||
* @return \Chill\EventBundle\Entity\Event
|
* @return Event
|
||||||
*/
|
*/
|
||||||
protected function getRandomEventWithMultipleParticipations(
|
protected function getRandomEventWithMultipleParticipations(
|
||||||
$centerName = 'Center A',
|
$centerName = 'Center A',
|
||||||
|
@ -25,7 +25,7 @@ interface PaginatorFactoryInterface
|
|||||||
* @param string|null $route the specific route to use in pages
|
* @param string|null $route the specific route to use in pages
|
||||||
* @param array|null $routeParameters the specific route parameters 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;
|
public function getCurrentItemsPerPage(): int;
|
||||||
|
|
||||||
|
@ -23,9 +23,10 @@ class DummyPaginator implements PaginatorFactoryInterface
|
|||||||
private readonly UrlGeneratorInterface $urlGenerator,
|
private readonly UrlGeneratorInterface $urlGenerator,
|
||||||
private readonly string $route,
|
private readonly string $route,
|
||||||
private readonly array $routeParameters = []
|
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(
|
return new Paginator(
|
||||||
$totalItems,
|
$totalItems,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user