update php-cs-fixer and rector + fix rules

This commit is contained in:
2024-01-09 13:50:45 +01:00
parent a63b40fb6c
commit 825cd127d1
79 changed files with 220 additions and 229 deletions

View File

@@ -34,7 +34,10 @@ class ParticipationController extends AbstractController
* ParticipationController constructor.
*/
public function __construct(
private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
private readonly LoggerInterface $logger,
private readonly TranslatorInterface $translator,
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
) {}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/create", name="chill_event_participation_create")
@@ -240,7 +243,7 @@ class ParticipationController extends AbstractController
public function deleteAction($participation_id, Request $request): Response|\Symfony\Component\HttpFoundation\RedirectResponse
{
$em = $this->managerRegistry->getManager();
$participation = $em->getRepository(\Chill\EventBundle\Entity\Participation::class)->findOneBy([
$participation = $em->getRepository(Participation::class)->findOneBy([
'id' => $participation_id,
]);
@@ -320,7 +323,7 @@ class ParticipationController extends AbstractController
*/
public function editMultipleAction($event_id): Response|\Symfony\Component\HttpFoundation\RedirectResponse
{
$event = $this->managerRegistry->getRepository(\Chill\EventBundle\Entity\Event::class)
$event = $this->managerRegistry->getRepository(Event::class)
->find($event_id);
if (null === $event) {
@@ -456,8 +459,8 @@ class ParticipationController extends AbstractController
*/
public function updateMultipleAction(mixed $event_id, Request $request)
{
/** @var \Chill\EventBundle\Entity\Event $event */
$event = $this->managerRegistry->getRepository(\Chill\EventBundle\Entity\Event::class)
/** @var Event $event */
$event = $this->managerRegistry->getRepository(Event::class)
->find($event_id);
if (null === $event) {
@@ -499,7 +502,7 @@ class ParticipationController extends AbstractController
}
/**
* @return \Symfony\Component\Form\FormInterface
* @return FormInterface
*/
protected function createEditFormMultiple(Collection $participations, Event $event)
{
@@ -558,7 +561,7 @@ class ParticipationController extends AbstractController
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
if (null !== $event_id) {
$event = $em->getRepository(\Chill\EventBundle\Entity\Event::class)
$event = $em->getRepository(Event::class)
->find($event_id);
if (null === $event) {
@@ -752,7 +755,7 @@ class ParticipationController extends AbstractController
}
/**
* @return \Symfony\Component\Form\FormInterface
* @return FormInterface
*/
private function createDeleteForm($participation_id)
{