Skip to content

Commit f85b3ac

Browse files
committed
[TASK] Fix error in RegistrationService due to phpstan optimizations
Refs #1314
1 parent f218610 commit f85b3ac

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Classes/Service/RegistrationService.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@ public function createDependingRegistrations(Registration $registration): void
5959
$registrations = $registration->getAmountOfRegistrations();
6060
for ($i = 1; $i <= $registrations - 1; $i++) {
6161
$newReg = GeneralUtility::makeInstance(Registration::class);
62-
$newReg->setMainRegistration($registration);
63-
$newReg->setAmountOfRegistrations(1);
64-
$newReg->setIgnoreNotifications(true);
6562
$properties = ObjectAccess::getGettableProperties($registration);
6663
foreach ($properties as $propertyName => $propertyValue) {
6764
ObjectAccess::setProperty($newReg, $propertyName, $propertyValue);
6865
}
66+
$newReg->setMainRegistration($registration);
67+
$newReg->setAmountOfRegistrations(1);
68+
$newReg->setIgnoreNotifications(true);
69+
6970
/** @var Registration $newReg */
7071
$this->registrationRepository->add($newReg);
7172
}

0 commit comments

Comments
 (0)