mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 00:53:48 +00:00
php cs fixes after updating php cs fixer
This commit is contained in:
@@ -13,4 +13,6 @@ namespace Chill\ReportBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class ChillReportBundle extends Bundle {}
|
||||
class ChillReportBundle extends Bundle
|
||||
{
|
||||
}
|
||||
|
@@ -37,7 +37,8 @@ class ReportController extends AbstractController
|
||||
private readonly AuthorizationHelper $authorizationHelper,
|
||||
private readonly PaginatorFactory $paginator,
|
||||
private readonly TranslatorInterface $translator
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new report for a given person and of a given type.
|
||||
@@ -56,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) {
|
||||
@@ -182,7 +183,7 @@ class ReportController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->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);
|
||||
|
||||
@@ -239,7 +240,7 @@ class ReportController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->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);
|
||||
@@ -287,7 +288,7 @@ class ReportController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)
|
||||
$person = $em->getRepository(Person::class)
|
||||
->find($person_id);
|
||||
|
||||
if (null === $person) {
|
||||
@@ -309,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()]);
|
||||
@@ -331,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(),
|
||||
@@ -358,7 +359,7 @@ class ReportController extends AbstractController
|
||||
$em = $this->getDoctrine()->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()]);
|
||||
@@ -458,7 +459,7 @@ class ReportController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->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);
|
||||
|
||||
|
@@ -46,7 +46,9 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
|
||||
|
||||
protected array $slugs = [];
|
||||
|
||||
public function __construct(protected CustomFieldsGroup $customfieldsGroup, protected TranslatableStringHelper $translatableStringHelper, protected TranslatorInterface $translator, protected CustomFieldProvider $customFieldProvider, protected EntityManagerInterface $em) {}
|
||||
public function __construct(protected CustomFieldsGroup $customfieldsGroup, protected TranslatableStringHelper $translatableStringHelper, protected TranslatorInterface $translator, protected CustomFieldProvider $customFieldProvider, protected EntityManagerInterface $em)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
|
@@ -19,7 +19,9 @@ use Doctrine\ORM\Query\Expr;
|
||||
|
||||
class ReportDateFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {}
|
||||
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
|
||||
{
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@@ -32,7 +32,7 @@ class ReportType extends AbstractType
|
||||
protected $authorizationHelper;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Persistence\ObjectManager
|
||||
* @var ObjectManager
|
||||
*/
|
||||
protected $om;
|
||||
|
||||
|
@@ -96,7 +96,7 @@ class ReportSearch extends AbstractSearch implements ContainerAwareInterface
|
||||
/**
|
||||
* @param array $terms the terms
|
||||
*
|
||||
* @return \Doctrine\ORM\QueryBuilder
|
||||
* @return QueryBuilder
|
||||
*/
|
||||
private function buildQuery(array $terms)
|
||||
{
|
||||
|
@@ -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'
|
||||
);
|
||||
|
@@ -44,7 +44,9 @@ final class ReportVoterTest extends KernelTestCase
|
||||
*/
|
||||
protected $voter;
|
||||
|
||||
public static function setUpBeforeClass(): void {}
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@@ -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']
|
||||
);
|
||||
|
@@ -25,7 +25,9 @@ use Symfony\Component\Security\Core\Security;
|
||||
*/
|
||||
class TimelineReportProvider implements TimelineProviderInterface
|
||||
{
|
||||
public function __construct(protected EntityManager $em, protected AuthorizationHelper $helper, private readonly Security $security, protected CustomFieldsHelper $customFieldsHelper, protected $showEmptyValues) {}
|
||||
public function __construct(protected EntityManager $em, protected AuthorizationHelper $helper, private readonly Security $security, protected CustomFieldsHelper $customFieldsHelper, protected $showEmptyValues)
|
||||
{
|
||||
}
|
||||
|
||||
public function fetchQuery($context, array $args)
|
||||
{
|
||||
|
Reference in New Issue
Block a user