replace some entity shortcut by fqdn

* ChillPerson:Person
* ChillMain:Center
* ChillActivity:Activity
This commit is contained in:
2022-04-30 00:20:18 +02:00
parent 8ba51bafd0
commit a0392b9216
29 changed files with 61 additions and 60 deletions

View File

@@ -78,7 +78,7 @@ class ReportController extends AbstractController
$cFGroup = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')
->find($cf_group_id);
$person = $em->getRepository('ChillPersonBundle:Person')
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)
->find($person_id);
if (null === $person || null === $cFGroup) {
@@ -212,7 +212,7 @@ class ReportController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id);
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
@@ -269,7 +269,7 @@ class ReportController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id);
$cFGroup = $em
->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')
->find($cf_group_id);
@@ -317,7 +317,7 @@ class ReportController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$person = $em->getRepository('ChillPersonBundle:Person')
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)
->find($person_id);
if (null === $person) {
@@ -371,7 +371,7 @@ class ReportController extends AbstractController
])
->getForm();
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id);
return $this->render('ChillReportBundle:Report:select_report_type.html.twig', [
'form' => $form->createView(),
@@ -513,7 +513,7 @@ class ReportController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id);
$entity = $em->getRepository('ChillReportBundle:Report')->find($report_id);

View File

@@ -46,7 +46,7 @@ final class ReportControllerNextTest extends WebTestCase
->get('doctrine.orm.entity_manager');
$this->person = $em
->getRepository('ChillPersonBundle:Person')
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->findOneBy(
[
'lastName' => 'Charline',

View File

@@ -65,7 +65,7 @@ final class ReportControllerTest extends WebTestCase
//get a random person
self::$person = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('ChillPersonBundle:Person')
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->findOneBy(
[
'lastName' => 'Charline',
@@ -94,7 +94,7 @@ final class ReportControllerTest extends WebTestCase
self::$user = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('ChillMainBundle:User')
->getRepository(\Chill\MainBundle\Entity\User::class)
->findOneBy(['username' => 'center a_social']);
}

View File

@@ -52,7 +52,7 @@ final class TimelineProviderTest extends WebTestCase
self::$em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager');
$center = self::$em->getRepository('ChillMainBundle:Center')
$center = self::$em->getRepository(\Chill\MainBundle\Entity\Center::class)
->findOneBy(['name' => 'Center A']);
$person = (new Person(new DateTime('2015-05-01')))
@@ -71,7 +71,7 @@ final class TimelineProviderTest extends WebTestCase
);
$report = (new Report())
->setUser(self::$em->getRepository('ChillMainBundle:User')
->setUser(self::$em->getRepository(\Chill\MainBundle\Entity\User::class)
->findOneByUsername('center a_social'))
->setDate(new DateTime('2015-05-02'))
->setPerson($this->person)