update php-cs-fixer and rector + fix rules

This commit is contained in:
2024-01-09 13:50:45 +01:00
parent a63b40fb6c
commit 825cd127d1
79 changed files with 220 additions and 229 deletions

View File

@@ -224,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

@@ -432,7 +432,7 @@ class AccompanyingPeriodController extends AbstractController
private function _getPerson(int $id): Person
{
$person = $this->managerRegistry->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

@@ -21,9 +21,8 @@ use Symfony\Component\HttpFoundation\Request;
*/
class ClosingMotiveController extends CRUDController
{
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry)
{
}
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
/**
* @param string $action
*/

View File

@@ -37,7 +37,7 @@ class PersonAddressController extends AbstractController
public function createAction(mixed $person_id, Request $request)
{
$person = $this->managerRegistry->getManager()
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->getRepository(Person::class)
->find($person_id);
if (null === $person) {
@@ -94,7 +94,7 @@ class PersonAddressController extends AbstractController
public function editAction(mixed $person_id, mixed $address_id)
{
$person = $this->managerRegistry->getManager()
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->getRepository(Person::class)
->find($person_id);
if (null === $person) {
@@ -124,7 +124,7 @@ class PersonAddressController extends AbstractController
public function listAction(mixed $person_id)
{
$person = $this->managerRegistry->getManager()
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->getRepository(Person::class)
->find($person_id);
if (null === $person) {
@@ -148,7 +148,7 @@ class PersonAddressController extends AbstractController
public function newAction(mixed $person_id)
{
$person = $this->managerRegistry->getManager()
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->getRepository(Person::class)
->find($person_id);
if (null === $person) {
@@ -177,7 +177,7 @@ class PersonAddressController extends AbstractController
public function updateAction(mixed $person_id, mixed $address_id, Request $request)
{
$person = $this->managerRegistry->getManager()
->getRepository(\Chill\PersonBundle\Entity\Person::class)
->getRepository(Person::class)
->find($person_id);
if (null === $person) {

View File

@@ -106,7 +106,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 +281,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)
{