php cs fixes after updating php cs fixer

This commit is contained in:
2024-01-10 10:31:25 +01:00
parent 60ede58af0
commit 3c8e59e088
682 changed files with 2097 additions and 882 deletions

View File

@@ -46,7 +46,9 @@ use Symfony\Component\Workflow\Registry;
final class AccompanyingCourseApiController extends ApiController
{
public function __construct(private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository, private readonly AccompanyingPeriodACLAwareRepository $accompanyingPeriodACLAwareRepository, private readonly EventDispatcherInterface $eventDispatcher, private readonly ReferralsSuggestionInterface $referralAvailable, private readonly Registry $registry, private readonly ValidatorInterface $validator) {}
public function __construct(private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository, private readonly AccompanyingPeriodACLAwareRepository $accompanyingPeriodACLAwareRepository, private readonly EventDispatcherInterface $eventDispatcher, private readonly ReferralsSuggestionInterface $referralAvailable, private readonly Registry $registry, private readonly ValidatorInterface $validator)
{
}
public function commentApi($id, Request $request, string $_format): Response
{

View File

@@ -30,7 +30,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class AccompanyingCourseCommentController extends AbstractController
{
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly FormFactoryInterface $formFactory, private readonly TranslatorInterface $translator) {}
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly FormFactoryInterface $formFactory, private readonly TranslatorInterface $translator)
{
}
/**
* Page of comments in Accompanying Course section.

View File

@@ -37,7 +37,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController
{
public function __construct(protected SerializerInterface $serializer, protected EventDispatcherInterface $dispatcher, protected ValidatorInterface $validator, private readonly AccompanyingPeriodWorkRepository $workRepository, private readonly Registry $registry, private readonly TranslatorInterface $translator) {}
public function __construct(protected SerializerInterface $serializer, protected EventDispatcherInterface $dispatcher, protected ValidatorInterface $validator, private readonly AccompanyingPeriodWorkRepository $workRepository, private readonly Registry $registry, private readonly TranslatorInterface $translator)
{
}
/**
* @Route("/{_locale}/parcours/{accompanying_period_id}/close", name="chill_person_accompanying_course_close")

View File

@@ -21,7 +21,9 @@ use Symfony\Component\Routing\Annotation\Route;
class AccompanyingCourseWorkApiController extends ApiController
{
public function __construct(private readonly AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository) {}
public function __construct(private readonly AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository)
{
}
/**
* @Route("/api/1.0/person/accompanying-period/work/my-near-end")

View File

@@ -41,7 +41,8 @@ final class AccompanyingCourseWorkController extends AbstractController
private readonly LoggerInterface $chillLogger,
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory
) {}
) {
}
/**
* @Route(
@@ -223,7 +224,7 @@ final class AccompanyingCourseWorkController extends AbstractController
if (1 < count($types)) {
$filterBuilder
->addEntityChoice('typesFilter', 'accompanying_course_work.types_filter', \Chill\PersonBundle\Entity\SocialWork\SocialAction::class, $types, [
->addEntityChoice('typesFilter', 'accompanying_course_work.types_filter', SocialAction::class, $types, [
'choice_label' => fn (SocialAction $sa) => $this->translatableStringHelper->localize($sa->getTitle()),
]);
}

View File

@@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security;
class AccompanyingCourseWorkEvaluationDocumentController extends AbstractController
{
public function __construct(private readonly Security $security) {}
public function __construct(private readonly Security $security)
{
}
/**
* @Route(

View File

@@ -39,7 +39,8 @@ class AccompanyingPeriodController extends AbstractController
private readonly EventDispatcherInterface $eventDispatcher,
private readonly ValidatorInterface $validator,
private readonly TranslatorInterface $translator
) {}
) {
}
/**
* @throws \Exception
@@ -431,7 +432,7 @@ class AccompanyingPeriodController extends AbstractController
private function _getPerson(int $id): Person
{
$person = $this->getDoctrine()->getManager()
->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($id);
->getRepository(Person::class)->find($id);
if (null === $person) {
throw $this->createNotFoundException('Person not found');

View File

@@ -31,7 +31,9 @@ use Symfony\Component\Security\Core\Security;
class AccompanyingPeriodRegulationListController
{
public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly \Twig\Environment $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly \Twig\Environment $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}
/**
* @Route("/{_locale}/person/periods/undispatched", name="chill_person_course_list_regulation")

View File

@@ -29,7 +29,9 @@ use Symfony\Component\Serializer\SerializerInterface;
class AccompanyingPeriodWorkEvaluationApiController
{
public function __construct(private readonly AccompanyingPeriodWorkEvaluationRepository $accompanyingPeriodWorkEvaluationRepository, private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly SerializerInterface $serializer, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security) {}
public function __construct(private readonly AccompanyingPeriodWorkEvaluationRepository $accompanyingPeriodWorkEvaluationRepository, private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly SerializerInterface $serializer, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security)
{
}
/**
* @Route("/api/1.0/person/docgen/template/by-evaluation/{id}.{_format}",

View File

@@ -31,7 +31,9 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
class HouseholdApiController extends ApiController
{
public function __construct(private readonly EventDispatcherInterface $eventDispatcher, private readonly HouseholdRepository $householdRepository, private readonly HouseholdACLAwareRepositoryInterface $householdACLAwareRepository) {}
public function __construct(private readonly EventDispatcherInterface $eventDispatcher, private readonly HouseholdRepository $householdRepository, private readonly HouseholdACLAwareRepositoryInterface $householdACLAwareRepository)
{
}
/**
* @Route("/api/1.0/person/household/by-address-reference/{id}.json",

View File

@@ -44,7 +44,8 @@ class HouseholdCompositionController extends AbstractController
private readonly TranslatorInterface $translator,
private readonly \Twig\Environment $engine,
private readonly UrlGeneratorInterface $urlGenerator
) {}
) {
}
/**
* @Route("/{_locale}/person/household/{household_id}/composition/{composition_id}/delete", name="chill_person_household_composition_delete")

View File

@@ -34,7 +34,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class HouseholdController extends AbstractController
{
public function __construct(private readonly TranslatorInterface $translator, private readonly PositionRepository $positionRepository, private readonly SerializerInterface $serializer, private readonly Security $security) {}
public function __construct(private readonly TranslatorInterface $translator, private readonly PositionRepository $positionRepository, private readonly SerializerInterface $serializer, private readonly Security $security)
{
}
/**
* @Route(

View File

@@ -30,7 +30,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class HouseholdMemberController extends ApiController
{
public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly AccompanyingPeriodRepository $periodRepository) {}
public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly AccompanyingPeriodRepository $periodRepository)
{
}
/**
* @Route(

View File

@@ -29,7 +29,9 @@ class PersonAddressController extends AbstractController
/**
* PersonAddressController constructor.
*/
public function __construct(private readonly ValidatorInterface $validator, private readonly TranslatorInterface $translator) {}
public function __construct(private readonly ValidatorInterface $validator, private readonly TranslatorInterface $translator)
{
}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/address/create", name="chill_person_address_create", methods={"POST"})
@@ -37,7 +39,7 @@ class PersonAddressController extends AbstractController
public function createAction(mixed $person_id, Request $request)
{
$person = $this->getDoctrine()->getManager()
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->getRepository(Person::class)
->find($person_id);
if (null === $person) {
@@ -94,7 +96,7 @@ class PersonAddressController extends AbstractController
public function editAction(mixed $person_id, mixed $address_id)
{
$person = $this->getDoctrine()->getManager()
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->getRepository(Person::class)
->find($person_id);
if (null === $person) {
@@ -124,7 +126,7 @@ class PersonAddressController extends AbstractController
public function listAction(mixed $person_id)
{
$person = $this->getDoctrine()->getManager()
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->getRepository(Person::class)
->find($person_id);
if (null === $person) {
@@ -148,7 +150,7 @@ class PersonAddressController extends AbstractController
public function newAction(mixed $person_id)
{
$person = $this->getDoctrine()->getManager()
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->getRepository(Person::class)
->find($person_id);
if (null === $person) {
@@ -177,7 +179,7 @@ class PersonAddressController extends AbstractController
public function updateAction(mixed $person_id, mixed $address_id, Request $request)
{
$person = $this->getDoctrine()->getManager()
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->getRepository(Person::class)
->find($person_id);
if (null === $person) {

View File

@@ -47,7 +47,8 @@ final class PersonController extends AbstractController
private readonly ConfigPersonAltNamesHelper $configPersonAltNameHelper,
private readonly ValidatorInterface $validator,
private readonly EntityManagerInterface $em,
) {}
) {
}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/general/edit", name="chill_person_general_edit")
@@ -106,7 +107,7 @@ final class PersonController extends AbstractController
$cFGroup = null;
$cFDefaultGroup = $this->em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsDefaultGroup::class)
->findOneByEntity(\Chill\PersonBundle\Entity\Person::class);
->findOneByEntity(Person::class);
if ($cFDefaultGroup) {
$cFGroup = $cFDefaultGroup->getCustomFieldsGroup();
@@ -281,7 +282,7 @@ final class PersonController extends AbstractController
/**
* easy getting a person by his id.
*
* @return \Chill\PersonBundle\Entity\Person
* @return Person
*/
private function _getPerson(int $id)
{

View File

@@ -32,7 +32,9 @@ use function count;
class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController
{
public function __construct(private readonly SimilarPersonMatcher $similarPersonMatcher, private readonly TranslatorInterface $translator, private readonly PersonRepository $personRepository, private readonly PersonMove $personMove, private readonly EventDispatcherInterface $eventDispatcher) {}
public function __construct(private readonly SimilarPersonMatcher $similarPersonMatcher, private readonly TranslatorInterface $translator, private readonly PersonRepository $personRepository, private readonly PersonMove $personMove, private readonly EventDispatcherInterface $eventDispatcher)
{
}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person1_id}/duplicate/{person2_id}/confirm", name="chill_person_duplicate_confirm")

View File

@@ -25,7 +25,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
final class PersonResourceController extends AbstractController
{
public function __construct(private readonly PersonResourceRepository $personResourceRepository, private readonly PersonRepository $personRepository, private readonly EntityManagerInterface $em, private readonly TranslatorInterface $translator) {}
public function __construct(private readonly PersonResourceRepository $personResourceRepository, private readonly PersonRepository $personRepository, private readonly EntityManagerInterface $em, private readonly TranslatorInterface $translator)
{
}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/resources/{resource_id}/delete", name="chill_person_resource_delete")

View File

@@ -39,7 +39,9 @@ use Symfony\Component\Validator\Constraints\NotNull;
class ReassignAccompanyingPeriodController extends AbstractController
{
public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly UserRepository $userRepository, private readonly AccompanyingPeriodRepository $courseRepository, private readonly \Twig\Environment $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly UserRender $userRender, private readonly EntityManagerInterface $em) {}
public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly UserRepository $userRepository, private readonly AccompanyingPeriodRepository $courseRepository, private readonly \Twig\Environment $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly UserRender $userRender, private readonly EntityManagerInterface $em)
{
}
/**
* @Route("/{_locale}/person/accompanying-periods/reassign", name="chill_course_list_reassign")

View File

@@ -21,7 +21,9 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
class RelationshipApiController extends ApiController
{
public function __construct(private readonly ValidatorInterface $validator, private readonly RelationshipRepository $repository) {}
public function __construct(private readonly ValidatorInterface $validator, private readonly RelationshipRepository $repository)
{
}
/**
* @ParamConverter("person", options={"id": "person_id"})

View File

@@ -27,7 +27,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
final class ResidentialAddressController extends AbstractController
{
public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly ResidentialAddressRepository $residentialAddressRepository) {}
public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly ResidentialAddressRepository $residentialAddressRepository)
{
}
/**
* @Route("/{_locale}/person/residential-address/{id}/delete", name="chill_person_residential_address_delete")

View File

@@ -22,7 +22,9 @@ use Symfony\Component\Routing\Annotation\Route;
class SocialWorkEvaluationApiController extends AbstractController
{
public function __construct(private readonly PaginatorFactory $paginatorFactory) {}
public function __construct(private readonly PaginatorFactory $paginatorFactory)
{
}
/**
* @Route("/api/1.0/person/social-work/evaluation/by-social-action/{action_id}.json",

View File

@@ -21,7 +21,9 @@ use Symfony\Component\HttpFoundation\Response;
class SocialWorkGoalApiController extends ApiController
{
public function __construct(private readonly GoalRepository $goalRepository, private readonly PaginatorFactory $paginator) {}
public function __construct(private readonly GoalRepository $goalRepository, private readonly PaginatorFactory $paginator)
{
}
public function listBySocialAction(Request $request, SocialAction $action): Response
{

View File

@@ -21,7 +21,9 @@ use Symfony\Component\HttpFoundation\Response;
class SocialWorkResultApiController extends ApiController
{
public function __construct(private readonly ResultRepository $resultRepository) {}
public function __construct(private readonly ResultRepository $resultRepository)
{
}
public function listByGoal(Request $request, Goal $goal): Response
{

View File

@@ -26,7 +26,8 @@ final class SocialWorkSocialActionApiController extends ApiController
private readonly SocialIssueRepository $socialIssueRepository,
private readonly PaginatorFactory $paginator,
private readonly ClockInterface $clock,
) {}
) {
}
public function listBySocialIssueApi($id, Request $request)
{

View File

@@ -22,7 +22,9 @@ use Symfony\Component\HttpFoundation\Request;
class TimelinePersonController extends AbstractController
{
public function __construct(protected EventDispatcherInterface $eventDispatcher, protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory) {}
public function __construct(protected EventDispatcherInterface $eventDispatcher, protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory)
{
}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/timeline", name="chill_person_timeline")

View File

@@ -21,7 +21,9 @@ use Symfony\Component\Routing\Annotation\Route;
class UserAccompanyingPeriodController extends AbstractController
{
public function __construct(private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository, private readonly PaginatorFactory $paginatorFactory) {}
public function __construct(private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository, private readonly PaginatorFactory $paginatorFactory)
{
}
/**
* @Route("/{_locale}/person/accompanying-periods/my", name="chill_person_accompanying_period_user")