apply rector rules: symfony **UP TO** 44

This commit is contained in:
2023-07-28 01:52:53 +02:00
parent b6a094aeee
commit c20f65eebb
88 changed files with 211 additions and 320 deletions

View File

@@ -72,11 +72,9 @@ class AccompanyingPeriodController extends AbstractController
['%name%' => $person->__toString()]
));
return $this->redirect(
$this->generateUrl('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
])
);
return $this->redirectToRoute('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
]);
}
$current = $person->getCurrentAccompanyingPeriod();
@@ -102,11 +100,9 @@ class AccompanyingPeriodController extends AbstractController
$this->getDoctrine()->getManager()->flush();
return $this->redirect(
$this->generateUrl('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
])
);
return $this->redirectToRoute('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
]);
}
$this->get('session')->getFlashBag()
->add('error', $this->get('translator')
@@ -182,11 +178,9 @@ class AccompanyingPeriodController extends AbstractController
)
);
return $this->redirect(
$this->generateUrl('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
])
);
return $this->redirectToRoute('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
]);
}
$flashBag->add('error', $this->get('translator')
->trans('Error! Period not created!'));
@@ -214,7 +208,7 @@ class AccompanyingPeriodController extends AbstractController
'element_class' => AccompanyingPeriod::class,
'action' => 'list',
]);
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
$this->eventDispatcher->dispatch($event, PrivacyEvent::PERSON_PRIVACY_EVENT);
$accompanyingPeriods = $this->accompanyingPeriodACLAwareRepository
->findByPerson($person, AccompanyingPeriodVoter::SEE, ["openingDate" => "DESC", "id" => "DESC"]);
@@ -249,11 +243,9 @@ class AccompanyingPeriodController extends AbstractController
['%name%' => $person->__toString()]
));
return $this->redirect(
$this->generateUrl('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
])
);
return $this->redirectToRoute('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
]);
}
$accompanyingPeriod = new AccompanyingPeriod(new DateTime());
@@ -285,11 +277,9 @@ class AccompanyingPeriodController extends AbstractController
$this->getDoctrine()->getManager()->flush();
return $this->redirect(
$this->generateUrl('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
])
);
return $this->redirectToRoute('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
]);
}
$this->get('session')->getFlashBag()
->add('error', $this->get('translator')
@@ -414,11 +404,9 @@ class AccompanyingPeriodController extends AbstractController
$this->get('translator')->trans('An accompanying period has been updated.')
);
return $this->redirect(
$this->generateUrl('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
])
);
return $this->redirectToRoute('chill_person_accompanying_period_list', [
'person_id' => $person->getId(),
]);
}
$flashBag->add('error', $this->get('translator')