chore: fix phpstan errors

This commit is contained in:
Björn Fromme committed 2026-04-16 16:27:35 +02:00
1 parent 4e925171b3
commit 0fcecc9c58
109 files changed
+510 -429

No files matched your search

@@ -132,6 +132,7 @@ class Step2Controller extends AbstractController
}
}
/** @param array<int, \App\Form\Model\RoomSelectionDto> $roomSelections */
private function calculateParticipantsCount(array $roomSelections, Travel $travelData): int
{
$participantsCount = 0;
@@ -124,6 +124,7 @@ class Step2ParticipantController extends AbstractController
);
}
/** @param FormInterface<mixed> $form */
private function renderParticipantForm(
FormInterface $form,
int $index,
@@ -157,6 +158,7 @@ class Step2ParticipantController extends AbstractController
return $bookingDto;
}
/** @return FormInterface<mixed> */
private function createParticipantForm(BookingDto $bookingDto, int $index): FormInterface
{
$wrapper = $this->participantFormSupportService->createParticipantEditDto($bookingDto, $index);
@@ -220,6 +220,7 @@ class Step3Controller extends AbstractController
/**
* Renders the step 3 form with standard template variables.
*/
/** @param FormInterface<mixed> $form */
private function renderStepForm(BookingDto $bookingCreateDto, FormInterface $form): Response
{
$context = $this->createContextFactory->create(
@@ -177,6 +177,9 @@ class Step4Controller extends AbstractController
/**
* Renders the step 4 form with standard template variables.
*/
/**
* @param FormInterface<mixed> $form
*/
private function renderStepForm(
BookingDto $bookingCreateDto,
FormInterface $form,
@@ -8,6 +8,7 @@ use App\Service\BookingSessionManager;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\FlashBagAwareSessionInterface;
use Symfony\Component\Routing\Attribute\Route;
/**
@@ -23,11 +24,17 @@ class SuccessController extends AbstractController
#[Route('/bookings/create/success', name: 'app_booking_create_success')]
public function success(Request $request): Response
{
$flashBag = $request->getSession()->getFlashBag();
$returnUrl = $this->bookingSessionService->getReturnUrl($request);
$session = $request->getSession();
if (!$session instanceof FlashBagAwareSessionInterface) {
return $this->redirect($returnUrl);
}
$flashBag = $session->getFlashBag();
$bookingNumber = $flashBag->get('booking_number')[0] ?? null;
$bookingTotal = $flashBag->get('booking_total')[0] ?? null;
$travelName = $flashBag->get('booking_travel_name')[0] ?? null;
$returnUrl = $this->bookingSessionService->getReturnUrl($request);
// Redirect to return URL if no booking number (direct access or refresh)
if (null === $bookingNumber) {