mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 00:53:48 +00:00
update php-cs-fixer and rector + fix rules
This commit is contained in:
@@ -57,7 +57,7 @@ class ReportController extends AbstractController
|
||||
$cFGroup = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)
|
||||
->find($cf_group_id);
|
||||
|
||||
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)
|
||||
$person = $em->getRepository(Person::class)
|
||||
->find($person_id);
|
||||
|
||||
if (null === $person || null === $cFGroup) {
|
||||
@@ -183,7 +183,7 @@ class ReportController extends AbstractController
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id);
|
||||
$person = $em->getRepository(Person::class)->find($person_id);
|
||||
|
||||
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
|
||||
|
||||
@@ -240,7 +240,7 @@ class ReportController extends AbstractController
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id);
|
||||
$person = $em->getRepository(Person::class)->find($person_id);
|
||||
$cFGroup = $em
|
||||
->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)
|
||||
->find($cf_group_id);
|
||||
@@ -288,7 +288,7 @@ class ReportController extends AbstractController
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)
|
||||
$person = $em->getRepository(Person::class)
|
||||
->find($person_id);
|
||||
|
||||
if (null === $person) {
|
||||
@@ -310,7 +310,7 @@ class ReportController extends AbstractController
|
||||
}
|
||||
|
||||
$cFGroups = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)
|
||||
->findByEntity(\Chill\ReportBundle\Entity\Report::class);
|
||||
->findByEntity(Report::class);
|
||||
|
||||
if (1 === \count($cFGroups)) {
|
||||
return $this->redirectToRoute('report_new', ['person_id' => $person_id, 'cf_group_id' => $cFGroups[0]->getId()]);
|
||||
@@ -332,7 +332,7 @@ class ReportController extends AbstractController
|
||||
])
|
||||
->getForm();
|
||||
|
||||
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id);
|
||||
$person = $em->getRepository(Person::class)->find($person_id);
|
||||
|
||||
return $this->render('@ChillReport/Report/select_report_type.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
@@ -359,7 +359,7 @@ class ReportController extends AbstractController
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$cFGroups = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)
|
||||
->findByEntity(\Chill\ReportBundle\Entity\Report::class);
|
||||
->findByEntity(Report::class);
|
||||
|
||||
if (1 === \count($cFGroups)) {
|
||||
return $this->redirectToRoute('report_export_list', ['cf_group_id' => $cFGroups[0]->getId()]);
|
||||
@@ -459,7 +459,7 @@ class ReportController extends AbstractController
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id);
|
||||
$person = $em->getRepository(Person::class)->find($person_id);
|
||||
|
||||
$entity = $em->getRepository('ChillReportBundle:Report')->find($report_id);
|
||||
|
||||
|
@@ -43,7 +43,7 @@ final class ReportControllerNextTest extends WebTestCase
|
||||
->get('doctrine.orm.entity_manager');
|
||||
|
||||
$this->person = $em
|
||||
->getRepository(\Chill\PersonBundle\Entity\Person::class)
|
||||
->getRepository(Person::class)
|
||||
->findOneBy(
|
||||
[
|
||||
'lastName' => 'Charline',
|
||||
@@ -58,7 +58,7 @@ final class ReportControllerNextTest extends WebTestCase
|
||||
// get custom fields group from fixture
|
||||
$customFieldsGroups = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)
|
||||
->getRepository(CustomFieldsGroup::class)
|
||||
->findBy(['entity' => \Chill\ReportBundle\Entity\Report::class]);
|
||||
// filter customFieldsGroup to get only "situation de logement"
|
||||
$filteredCustomFieldsGroupHouse = array_filter(
|
||||
|
@@ -43,7 +43,7 @@ final class ReportControllerTest extends WebTestCase
|
||||
private static $group;
|
||||
|
||||
/**
|
||||
* @var \Chill\PersonBundle\Entity\Person
|
||||
* @var Person
|
||||
*/
|
||||
private static $person;
|
||||
|
||||
@@ -59,7 +59,7 @@ final class ReportControllerTest extends WebTestCase
|
||||
// get a random person
|
||||
self::$person = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository(\Chill\PersonBundle\Entity\Person::class)
|
||||
->getRepository(Person::class)
|
||||
->findOneBy(
|
||||
[
|
||||
'lastName' => 'Charline',
|
||||
@@ -73,7 +73,7 @@ final class ReportControllerTest extends WebTestCase
|
||||
|
||||
$customFieldsGroups = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)
|
||||
->getRepository(CustomFieldsGroup::class)
|
||||
->findBy(['entity' => \Chill\ReportBundle\Entity\Report::class]);
|
||||
// filter customFieldsGroup to get only "situation de logement"
|
||||
$filteredCustomFieldsGroupHouse = array_filter(
|
||||
@@ -123,7 +123,7 @@ final class ReportControllerTest extends WebTestCase
|
||||
$form = $crawlerAddAReportPage->selectButton('Créer un nouveau rapport')->form();
|
||||
|
||||
$this->assertInstanceOf(
|
||||
\Symfony\Component\DomCrawler\Form::class,
|
||||
Form::class,
|
||||
$form,
|
||||
'I can see a form with a button "add a new report" '
|
||||
);
|
||||
@@ -242,7 +242,7 @@ final class ReportControllerTest extends WebTestCase
|
||||
|
||||
$link = $crawlerPersonPage->selectLink("AJOUT D'UN RAPPORT")->link();
|
||||
$this->assertInstanceOf(
|
||||
\Symfony\Component\DomCrawler\Link::class,
|
||||
Link::class,
|
||||
$link,
|
||||
'There is a "add a report" link in menu'
|
||||
);
|
||||
@@ -270,7 +270,7 @@ final class ReportControllerTest extends WebTestCase
|
||||
->form();
|
||||
|
||||
$this->assertInstanceOf(
|
||||
\Symfony\Component\DomCrawler\Form::class,
|
||||
Form::class,
|
||||
$addForm,
|
||||
'I have a report form'
|
||||
);
|
||||
|
@@ -58,7 +58,7 @@ final class TimelineProviderTest extends WebTestCase
|
||||
|
||||
$scopesSocial = array_filter(
|
||||
self::$em
|
||||
->getRepository(\Chill\MainBundle\Entity\Scope::class)
|
||||
->getRepository(Scope::class)
|
||||
->findAll(),
|
||||
static fn (Scope $scope) => 'social' === $scope->getName()['en']
|
||||
);
|
||||
|
Reference in New Issue
Block a user