From 4b9b27a8efb27ccf40937f2be8466c2c6e3102ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 30 Apr 2022 00:37:26 +0200 Subject: [PATCH] replace docrine shortcuts in activity bundle by fqdn --- .../Controller/ActivityReasonCategoryController.php | 8 ++++---- .../Controller/ActivityReasonController.php | 8 ++++---- .../Tests/Controller/ActivityControllerTest.php | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php index 3d5591b77..d367d5803 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php @@ -54,7 +54,7 @@ class ActivityReasonCategoryController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository('ChillActivityBundle:ActivityReasonCategory')->find($id); + $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); @@ -75,7 +75,7 @@ class ActivityReasonCategoryController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entities = $em->getRepository('ChillActivityBundle:ActivityReasonCategory')->findAll(); + $entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->findAll(); return $this->render('ChillActivityBundle:ActivityReasonCategory:index.html.twig', [ 'entities' => $entities, @@ -105,7 +105,7 @@ class ActivityReasonCategoryController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository('ChillActivityBundle:ActivityReasonCategory')->find($id); + $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); @@ -125,7 +125,7 @@ class ActivityReasonCategoryController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository('ChillActivityBundle:ActivityReasonCategory')->find($id); + $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php index d69347ae9..ae213d578 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php @@ -54,7 +54,7 @@ class ActivityReasonController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository('ChillActivityBundle:ActivityReason')->find($id); + $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ActivityReason entity.'); @@ -75,7 +75,7 @@ class ActivityReasonController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entities = $em->getRepository('ChillActivityBundle:ActivityReason')->findAll(); + $entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->findAll(); return $this->render('ChillActivityBundle:ActivityReason:index.html.twig', [ 'entities' => $entities, @@ -105,7 +105,7 @@ class ActivityReasonController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository('ChillActivityBundle:ActivityReason')->find($id); + $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ActivityReason entity.'); @@ -125,7 +125,7 @@ class ActivityReasonController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository('ChillActivityBundle:ActivityReason')->find($id); + $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ActivityReason entity.'); diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php index 9fbbde980..43ce85778 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php @@ -305,7 +305,7 @@ final class ActivityControllerTest extends WebTestCase { $reasons = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') - ->getRepository('ChillActivityBundle:ActivityReason') + ->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class) ->findAll(); $reason = $reasons[array_rand($reasons)];