chore: fix phpstan errors
This commit is contained in:
1 parent
4e925171b3
commit
0fcecc9c58
109 files changed
+510
-429
No files matched your search
@@ -128,6 +128,10 @@ class ParticipantRentalsFieldHandler extends AbstractParticipantFieldHandler
|
||||
$participant->rentals = $validSelections;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<int, Service> $availableRentals
|
||||
* @param list<Service> $validSelections
|
||||
*/
|
||||
private function updateAutoBookOptOutRentals(
|
||||
ParticipantDto $participant,
|
||||
array $availableRentals,
|
||||
@@ -137,10 +141,6 @@ class ParticipantRentalsFieldHandler extends AbstractParticipantFieldHandler
|
||||
): void {
|
||||
$currentlySelectedAutoBookIds = [];
|
||||
foreach ($participant->rentals as $selectedService) {
|
||||
if (false === $selectedService instanceof Service) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (null === $selectedService->id || true === $selectedService->mandatory || false === $selectedService->autoBook) {
|
||||
continue;
|
||||
}
|
||||
@@ -174,6 +174,12 @@ class ParticipantRentalsFieldHandler extends AbstractParticipantFieldHandler
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<mixed> $selectedServices
|
||||
* @param array<int, Service> $availableServices
|
||||
*
|
||||
* @return list<Service>
|
||||
*/
|
||||
private function filterValidServiceSelections(
|
||||
array $selectedServices,
|
||||
array $availableServices,
|
||||
@@ -195,6 +201,9 @@ class ParticipantRentalsFieldHandler extends AbstractParticipantFieldHandler
|
||||
return $validSelections;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<int, Service> $availableServices
|
||||
*/
|
||||
private function isServiceValidForParticipant(
|
||||
mixed $selectedService,
|
||||
array $availableServices,
|
||||
@@ -222,12 +231,12 @@ class ParticipantRentalsFieldHandler extends AbstractParticipantFieldHandler
|
||||
* - rental.dateFrom === skipass.dateFrom
|
||||
* - rental.dateTo === skipass.dateTo
|
||||
*
|
||||
* @param array $rentals All available rental services
|
||||
* @param ParticipantDto $participant The participant with skipass selection
|
||||
* @param array<int, Service> $rentals All available rental services
|
||||
* @param ParticipantDto $participant The participant with skipass selection
|
||||
*
|
||||
* @return array Filtered rentals matching the skipass duration
|
||||
* @return array<int, Service> Filtered rentals matching the skipass duration
|
||||
*/
|
||||
private function filterRentalsBySkiPassDuration(array $rentals, $participant): array
|
||||
private function filterRentalsBySkiPassDuration(array $rentals, ParticipantDto $participant): array
|
||||
{
|
||||
$selectedSkiPass = $participant->skiPass;
|
||||
|
||||
|
||||
Reference in new issue
Block a user