wip: additional services with constraints

This commit is contained in:
Björn Fromme committed 2026-03-16 11:59:09 +01:00
1 parent 4b92f56ed7
commit 0f7d95d31b
28 files changed
+141 -63

No files matched your search

@@ -138,4 +138,4 @@ class AgeRangeCondition implements FieldConditionInterface
return (int) $dateOfBirth->diff($today)->y;
}
}
}
@@ -30,7 +30,7 @@ class ApplicantCondition implements FieldConditionInterface
public function evaluate(BookingDtoInterface $bookingDto, int $participantIndex, array $formData): bool
{
// Default: applicant is the first participant (index 0)
return $participantIndex === 0;
return 0 === $participantIndex;
}
public function getDependentFields(): array
@@ -42,4 +42,4 @@ class ApplicantCondition implements FieldConditionInterface
{
return 'Checks if the participant is the applicant (index 0)';
}
}
}
@@ -231,4 +231,4 @@ class CompositeCondition implements FieldConditionInterface
throw new \InvalidArgumentException(sprintf('%s operator requires at least one condition', $operator));
}
}
}
}
@@ -263,4 +263,4 @@ class FieldValueCondition implements FieldConditionInterface
throw new \InvalidArgumentException(sprintf('Operator "%s" does not accept expectedValue parameter', $operator));
}
}
}
}
@@ -46,4 +46,4 @@ class MutabilityCondition implements FieldConditionInterface
{
return 'Checks if the participant\'s personal data is mutable (edit flow)';
}
}
}