chore: fix phpstan errors
This commit is contained in:
@@ -511,7 +511,7 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
return [
|
||||
'label' => 'Hinfahrt',
|
||||
'choices' => $choices,
|
||||
'choice_label' => fn (Service $service) => $service?->label,
|
||||
'choice_label' => fn (Service $service) => $service->label,
|
||||
'choice_value' => 'id',
|
||||
'expanded' => true,
|
||||
'multiple' => false,
|
||||
@@ -551,7 +551,7 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
return [
|
||||
'label' => 'Rückfahrt',
|
||||
'choices' => $choices,
|
||||
'choice_label' => fn (Service $service) => $service?->label,
|
||||
'choice_label' => fn (Service $service) => $service->label,
|
||||
'choice_value' => 'id',
|
||||
'expanded' => true,
|
||||
'multiple' => false,
|
||||
@@ -622,7 +622,7 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
$hasOutboundBus = null !== $participant?->transportationOutbound
|
||||
&& DirectionMapper::SUBTYPE_BUS_API === $participant->transportationOutbound->subType;
|
||||
|
||||
if ($hasOutboundBus && false === ($participant->differentDropOff ?? false)) {
|
||||
if ($hasOutboundBus && false === $participant->differentDropOff) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -806,11 +806,11 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
* as the participant's selected skipass. This ensures rental equipment
|
||||
* is only available for the exact duration of the skipass.
|
||||
*
|
||||
* @param array $rentals Array of rental Service objects to filter
|
||||
* @param BookingDto $bookingDto The booking DTO containing participant data
|
||||
* @param int $participantIndex Index of the participant to evaluate
|
||||
* @param array<int, Service> $rentals Array of rental Service objects to filter
|
||||
* @param BookingDto $bookingDto The booking DTO containing participant data
|
||||
* @param int $participantIndex Index of the participant to evaluate
|
||||
*
|
||||
* @return array Filtered array of rentals matching skipass duration
|
||||
* @return array<int, Service> Filtered array of rentals matching skipass duration
|
||||
*/
|
||||
private function filterRentalsBySkiPassDuration(array $rentals, BookingDto $bookingDto, int $participantIndex): array
|
||||
{
|
||||
@@ -914,8 +914,8 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
/**
|
||||
* Checks if a service array contains a service with the given ID.
|
||||
*
|
||||
* @param array $services Array of Service objects
|
||||
* @param int $serviceId Service ID to search for
|
||||
* @param array<int, Service> $services Array of Service objects
|
||||
* @param int $serviceId Service ID to search for
|
||||
*
|
||||
* @return bool True if the service is found in the array
|
||||
*/
|
||||
@@ -937,11 +937,11 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
* If no age evaluator is configured or participant has no birth date,
|
||||
* returns empty array to be handled by field visibility conditions.
|
||||
*
|
||||
* @param array $services Array of Service objects to filter
|
||||
* @param BookingDto $bookingDto The booking DTO containing participant data
|
||||
* @param int $participantIndex Index of the participant to evaluate
|
||||
* @param array<int, Service> $services Array of Service objects to filter
|
||||
* @param BookingDto $bookingDto The booking DTO containing participant data
|
||||
* @param int $participantIndex Index of the participant to evaluate
|
||||
*
|
||||
* @return array Filtered array of available services
|
||||
* @return array<int, Service> Filtered array of available services
|
||||
*/
|
||||
private function filterServicesByAgeConstraints(array $services, BookingDto $bookingDto, int $participantIndex): array
|
||||
{
|
||||
@@ -1112,6 +1112,7 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
/**
|
||||
* Gets the rental insurance description for help text.
|
||||
*/
|
||||
/** @param list<Service> $rentalInsuranceManagers */
|
||||
private function getRentalInsuranceDescription(array $rentalInsuranceManagers): ?string
|
||||
{
|
||||
if (empty($rentalInsuranceManagers)) {
|
||||
@@ -1131,7 +1132,7 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
* @param BookingDto $bookingDto The booking DTO containing travel and participant data
|
||||
* @param int $participantIndex The index of the participant to get eligible insurances for
|
||||
*
|
||||
* @return array Array of eligible insurance objects filtered by age, family status, and other constraints
|
||||
* @return list<Insurance> Array of eligible insurance objects filtered by age, family status, and other constraints
|
||||
*/
|
||||
private function getEligibleInsurances(BookingDto $bookingDto, int $participantIndex): array
|
||||
{
|
||||
@@ -1180,11 +1181,11 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
* got the discount to change their mind (e.g., select bus instead), making the discount available
|
||||
* for others in the same booking session.
|
||||
*
|
||||
* @param array $services Transportation services from Travel model
|
||||
* @param BookingDto $bookingDto Current booking DTO with participant selections
|
||||
* @param int $participantIndex Current participant being processed
|
||||
* @param array<int, Service> $services Transportation services from Travel model
|
||||
* @param BookingDto $bookingDto Current booking DTO with participant selections
|
||||
* @param int $participantIndex Current participant being processed
|
||||
*
|
||||
* @return array Filtered transportation choices with smart PKW option selection
|
||||
* @return array<int, Service> Filtered transportation choices with smart PKW option selection
|
||||
*/
|
||||
private function filterTransportationChoices(array $services, BookingDto $bookingDto, int $participantIndex): array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user