mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
fix phpstan errors
This commit is contained in:
@@ -30,6 +30,7 @@ class ParticipationOverlapValidator extends ConstraintValidator
|
||||
}
|
||||
|
||||
$overlaps = new DateRangeCovering(self::MAX_PARTICIPATION, $participations[0]->getStartDate()->getTimezone());
|
||||
$participationList = [];
|
||||
|
||||
foreach ($participations as $participation) {
|
||||
|
||||
@@ -38,12 +39,12 @@ class ParticipationOverlapValidator extends ConstraintValidator
|
||||
}
|
||||
|
||||
$personId = $participation->getPerson()->getId();
|
||||
|
||||
$particpationList[$personId][] = $participation;
|
||||
|
||||
$participationList[$personId][] = $participation;
|
||||
|
||||
}
|
||||
|
||||
foreach ($particpationList as $group) {
|
||||
foreach ($participationList as $group) {
|
||||
if (count($group) > 1) {
|
||||
foreach ($group as $p) {
|
||||
$overlaps->add($p->getStartDate(), $p->getEndDate(), $p->getId());
|
||||
@@ -69,4 +70,4 @@ class ParticipationOverlapValidator extends ConstraintValidator
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user