chore: streamline property naming
This commit is contained in:
@@ -41,7 +41,7 @@ class ParticipantValidator extends ConstraintValidator
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (['transportationServiceTo', 'transportationServiceFro'] as $property) {
|
||||
foreach (['transportationOutbound', 'transportationInbound'] as $property) {
|
||||
if (null === $participant->{$property}) {
|
||||
$this->context->buildViolation('Bitte angeben')
|
||||
->atPath($property)
|
||||
@@ -54,12 +54,12 @@ class ParticipantValidator extends ConstraintValidator
|
||||
public function assertPickupSelected(ParticipantDto $participant): void
|
||||
{
|
||||
if (
|
||||
null !== $participant->transportationServiceTo
|
||||
&& 'BUS' === $participant->transportationServiceTo->subType
|
||||
&& null === $participant->pickup
|
||||
null !== $participant->transportationOutbound
|
||||
&& 'BUS' === $participant->transportationOutbound->subType
|
||||
&& null === $participant->pickupOutbound
|
||||
) {
|
||||
$this->context->buildViolation('Bitte auswählen')
|
||||
->atPath('pickup')
|
||||
->atPath('pickupOutbound')
|
||||
->addViolation()
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user