chore: fix phpstan errors
This commit is contained in:
1 parent
4e925171b3
commit
0fcecc9c58
109 files changed
+510
-429
No files matched your search
@@ -65,7 +65,7 @@ class ParticipantPricingCalculator
|
||||
*
|
||||
* @param BookingDto $bookingDto The booking data containing all participants
|
||||
*
|
||||
* @return array Array indexed by participant index containing individual prices
|
||||
* @return array<int, float> Array indexed by participant index containing individual prices
|
||||
*/
|
||||
public function calculateAllParticipantIndividualPrices(BookingDto $bookingDto): array
|
||||
{
|
||||
@@ -106,17 +106,17 @@ class ParticipantPricingCalculator
|
||||
// Generate cache key based on participant state that affects pricing
|
||||
$stateComponents = [
|
||||
'room' => $participant->assignedRoomId ?? 'none',
|
||||
'skiPass' => $participant->skiPass?->id ?? 'none',
|
||||
'rentalInsurance' => $participant->rentalInsurance?->id ?? 'none',
|
||||
'transportationOut' => $participant->transportationOutbound?->id ?? 'none',
|
||||
'transportationIn' => $participant->transportationInbound?->id ?? 'none',
|
||||
'pickup' => $participant->pickup?->id ?? 'none',
|
||||
'dropOff' => $participant->dropOff?->id ?? 'none',
|
||||
'parking' => $participant->parkingService?->id ?? 'none',
|
||||
'courses' => implode('_', array_map(fn ($s) => $s->id, $participant->courses ?? [])),
|
||||
'additionalServices' => implode('_', array_map(fn ($s) => $s->id, $participant->additionalServices ?? [])),
|
||||
'board' => implode('_', array_map(fn ($s) => $s->id, $participant->board ?? [])),
|
||||
'rentals' => implode('_', array_map(fn ($s) => $s->id, $participant->rentals ?? [])),
|
||||
'skiPass' => $participant->skiPass->id ?? 'none',
|
||||
'rentalInsurance' => $participant->rentalInsurance->id ?? 'none',
|
||||
'transportationOut' => $participant->transportationOutbound->id ?? 'none',
|
||||
'transportationIn' => $participant->transportationInbound->id ?? 'none',
|
||||
'pickup' => $participant->pickup->id ?? 'none',
|
||||
'dropOff' => $participant->dropOff->id ?? 'none',
|
||||
'parking' => $participant->parkingService->id ?? 'none',
|
||||
'courses' => implode('_', array_map(fn ($s) => $s->id, $participant->courses)),
|
||||
'additionalServices' => implode('_', array_map(fn ($s) => $s->id, $participant->additionalServices)),
|
||||
'board' => implode('_', array_map(fn ($s) => $s->id, $participant->board)),
|
||||
'rentals' => implode('_', array_map(fn ($s) => $s->id, $participant->rentals)),
|
||||
];
|
||||
|
||||
$cacheKey = sprintf(
|
||||
@@ -261,12 +261,10 @@ class ParticipantPricingCalculator
|
||||
];
|
||||
|
||||
foreach ($multipleServiceArrays as $serviceArray) {
|
||||
if (true === is_array($serviceArray)) {
|
||||
foreach ($serviceArray as $service) {
|
||||
if ($service instanceof Service && null !== $service->price) {
|
||||
if (false === $onlyInsuranceCalculationServices || true === $service->includeInInsuranceCalculation) {
|
||||
$serviceTotal += $service->price;
|
||||
}
|
||||
foreach ($serviceArray as $service) {
|
||||
if (null !== $service->price) {
|
||||
if (false === $onlyInsuranceCalculationServices || true === $service->includeInInsuranceCalculation) {
|
||||
$serviceTotal += $service->price;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user