fix: simplify trait to address incorrect arguments

This commit is contained in:
Björn Fromme committed 2026-03-28 10:18:34 +01:00
1 parent bca3610cff
commit fbfffbb31a
3 files changed
+23 -35

No files matched your search

@@ -5,9 +5,7 @@ declare(strict_types=1);
namespace App\Controller\Booking\Traits;
use App\Form\Model\BookingDto;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;
/**
* Provides common functionality for booking creation controllers.
@@ -82,18 +80,14 @@ trait BookingCreateTrait
}
/**
* Handles API errors by logging, adding flash message, and rendering the form.
* Handles API errors by logging and adding a flash message.
*/
private function handleApiError(
string $logMessage,
array $context,
string $flashMessage,
BookingDto $bookingCreateDto,
FormInterface $form,
): Response {
): void {
$this->logger->error($logMessage, $context);
$this->addFlash('error', $flashMessage);
return $this->renderStepForm($bookingCreateDto, $form);
}
}