DX: fix phpstan errors

This commit is contained in:
2023-02-07 22:34:37 +01:00
parent e5c183aa44
commit fa481fd795
3 changed files with 55 additions and 28 deletions

View File

@@ -78,15 +78,14 @@ class ParticipationOverlapValidator extends ConstraintValidator
if ($overlaps->hasIntersections()) {
foreach ($overlaps->getIntersections() as [$start, $end, $ids]) {
$msg = null === $end ? $constraint->message :
$constraint->message;
$msg = $constraint->message;
$this->context->buildViolation($msg)
->setParameters([
'{{ start }}' => $start->format('d-m-Y'),
'{{ end }}' => null === $end ? null : $end->format('d-m-Y'),
'{{ ids }}' => $ids,
'{{ name }}' => $this->personRender->renderString($participation->getPerson(), []),
'{{ name }}' => $this->personRender->renderString($participations[0]->getPerson(), []),
])
->addViolation();
}