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 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"})
|
||||
|
@ -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")
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -68,7 +68,7 @@ class EventType extends AbstractType
|
||||
],
|
||||
'allow_add' => true,
|
||||
'allow_delete' => true,
|
||||
'delete_empty' => fn(StoredObject $storedObject): bool => '' === $storedObject->getFilename(),
|
||||
'delete_empty' => fn (StoredObject $storedObject): bool => '' === $storedObject->getFilename(),
|
||||
'button_remove_label' => 'event.form.remove_document',
|
||||
'button_add_label' => 'event.form.add_document',
|
||||
])
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -29,7 +29,8 @@ final readonly class EventACLAwareRepository implements EventACLAwareRepositoryI
|
||||
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
|
||||
private EntityManagerInterface $entityManager,
|
||||
private Security $security,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws NonUniqueResultException
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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',
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user