diff --git a/src/Bundle/ChillDocStoreBundle/Workflow/AccompanyingCourseDocumentWorkflowHandler.php b/src/Bundle/ChillDocStoreBundle/Workflow/AccompanyingCourseDocumentWorkflowHandler.php index c3285507e..546234a31 100644 --- a/src/Bundle/ChillDocStoreBundle/Workflow/AccompanyingCourseDocumentWorkflowHandler.php +++ b/src/Bundle/ChillDocStoreBundle/Workflow/AccompanyingCourseDocumentWorkflowHandler.php @@ -46,8 +46,7 @@ class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandler public function getEntityData(EntityWorkflow $entityWorkflow, array $options = []): array { - $course = $this->getRelatedEntity($entityWorkflow) - ->getCourse(); + $course = $this->getRelatedEntity($entityWorkflow)?->getCourse(); $persons = []; if (null !== $course) { diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php index 88bc4e6b8..b9daf5a09 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php @@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security; class AccompanyingCourseWorkEvaluationDocumentController extends AbstractController { - public function __construct(Private Security $security) {} + public function __construct(private Security $security) + { + } /** * @Route( @@ -35,8 +37,10 @@ class AccompanyingCourseWorkEvaluationDocumentController extends AbstractControl return $this->redirectToRoute( $this->security->isGranted(AccompanyingPeriodWorkVoter::UPDATE, $work) ? - 'chill_person_accompanying_period_work_edit' : 'chill_person_accompanying_period_work_show', [ - 'id' => $work->getId() - ]); + 'chill_person_accompanying_period_work_edit' : 'chill_person_accompanying_period_work_show', + [ + 'id' => $work->getId() + ] + ); } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkWorkflowHandler.php b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkWorkflowHandler.php index 3cdf23f88..528c2b7aa 100644 --- a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkWorkflowHandler.php +++ b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkWorkflowHandler.php @@ -47,8 +47,7 @@ class AccompanyingPeriodWorkWorkflowHandler implements EntityWorkflowHandlerInte public function getEntityData(EntityWorkflow $entityWorkflow, array $options = []): array { return [ - 'persons' => $this->getRelatedEntity($entityWorkflow) - ->getPersons(), + 'persons' => $this->getRelatedEntity($entityWorkflow)?->getPersons() ?? [], ]; }