apply rules rector up to php82

This commit is contained in:
2023-05-01 21:39:45 +02:00
parent 81e8928344
commit 6d63177ff4
733 changed files with 1257 additions and 1322 deletions

View File

@@ -51,7 +51,7 @@ use function count;
final class AccompanyingCourseApiController extends ApiController
{
public function __construct(private AccompanyingPeriodRepository $accompanyingPeriodRepository, private AccompanyingPeriodACLAwareRepository $accompanyingPeriodACLAwareRepository, private EventDispatcherInterface $eventDispatcher, private ReferralsSuggestionInterface $referralAvailable, private Registry $registry, private 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)
{
}

View File

@@ -32,7 +32,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class AccompanyingCourseCommentController extends AbstractController
{
public function __construct(private EntityManagerInterface $entityManager, private FormFactoryInterface $formFactory, private TranslatorInterface $translator)
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly FormFactoryInterface $formFactory, private readonly TranslatorInterface $translator)
{
}

View File

@@ -41,7 +41,7 @@ use function is_array;
*/
class AccompanyingCourseController extends Controller
{
public function __construct(protected SerializerInterface $serializer, protected EventDispatcherInterface $dispatcher, protected ValidatorInterface $validator, private AccompanyingPeriodWorkRepository $workRepository, private Registry $registry, private 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)
{
}

View File

@@ -23,7 +23,7 @@ use Symfony\Component\Routing\Annotation\Route;
class AccompanyingCourseWorkApiController extends ApiController
{
public function __construct(private AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository)
public function __construct(private readonly AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository)
{
}

View File

@@ -28,7 +28,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class AccompanyingCourseWorkController extends AbstractController
{
public function __construct(private TranslatorInterface $trans, private SerializerInterface $serializer, private AccompanyingPeriodWorkRepository $workRepository, private PaginatorFactory $paginator, private LoggerInterface $chillLogger)
public function __construct(private readonly TranslatorInterface $trans, private readonly SerializerInterface $serializer, private readonly AccompanyingPeriodWorkRepository $workRepository, private readonly PaginatorFactory $paginator, private readonly LoggerInterface $chillLogger)
{
}

View File

@@ -32,7 +32,7 @@ use Symfony\Component\Templating\EngineInterface;
class AccompanyingPeriodRegulationListController
{
public function __construct(private AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private EngineInterface $engine, private FormFactoryInterface $formFactory, private PaginatorFactory $paginatorFactory, private Security $security, private TranslatableStringHelperInterface $translatableStringHelper)
public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly EngineInterface $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}

View File

@@ -32,7 +32,7 @@ use function in_array;
class AccompanyingPeriodWorkEvaluationApiController
{
public function __construct(private AccompanyingPeriodWorkEvaluationRepository $accompanyingPeriodWorkEvaluationRepository, private DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private SerializerInterface $serializer, private PaginatorFactory $paginatorFactory, private 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)
{
}

View File

@@ -35,7 +35,7 @@ use function array_values;
class HouseholdApiController extends ApiController
{
public function __construct(private EventDispatcherInterface $eventDispatcher, private HouseholdRepository $householdRepository, private HouseholdACLAwareRepositoryInterface $householdACLAwareRepository)
public function __construct(private readonly EventDispatcherInterface $eventDispatcher, private readonly HouseholdRepository $householdRepository, private readonly HouseholdACLAwareRepositoryInterface $householdACLAwareRepository)
{
}

View File

@@ -36,7 +36,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class HouseholdCompositionController extends AbstractController
{
public function __construct(private Security $security, private HouseholdCompositionRepository $householdCompositionRepository, private HouseholdRepository $householdRepository, private PaginatorFactory $paginatorFactory, private FormFactoryInterface $formFactory, private EntityManagerInterface $entityManager, private TranslatorInterface $translator, private EngineInterface $engine, private UrlGeneratorInterface $urlGenerator)
public function __construct(private readonly Security $security, private readonly HouseholdCompositionRepository $householdCompositionRepository, private readonly HouseholdRepository $householdRepository, private readonly PaginatorFactory $paginatorFactory, private readonly FormFactoryInterface $formFactory, private readonly EntityManagerInterface $entityManager, private readonly TranslatorInterface $translator, private readonly EngineInterface $engine, private readonly UrlGeneratorInterface $urlGenerator)
{
}

View File

@@ -37,7 +37,7 @@ use function count;
*/
class HouseholdController extends AbstractController
{
public function __construct(private TranslatorInterface $translator, private PositionRepository $positionRepository, private SerializerInterface $serializer, private Security $security)
public function __construct(private readonly TranslatorInterface $translator, private readonly PositionRepository $positionRepository, private readonly SerializerInterface $serializer, private readonly Security $security)
{
}

View File

@@ -32,7 +32,7 @@ use function count;
class HouseholdMemberController extends ApiController
{
public function __construct(private UrlGeneratorInterface $generator, private TranslatorInterface $translator, private AccompanyingPeriodRepository $periodRepository)
public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly AccompanyingPeriodRepository $periodRepository)
{
}

View File

@@ -27,11 +27,11 @@ use function in_array;
class PersonApiController extends ApiController
{
private bool $showCenters;
private readonly bool $showCenters;
public function __construct(
private AuthorizedCenterOnPersonCreationInterface $authorizedCenterOnPersonCreation,
private ConfigPersonAltNamesHelper $configPersonAltNameHelper,
private readonly AuthorizedCenterOnPersonCreationInterface $authorizedCenterOnPersonCreation,
private readonly ConfigPersonAltNamesHelper $configPersonAltNameHelper,
ParameterBagInterface $parameterBag
) {
$this->showCenters = $parameterBag->get('chill_main')['acl']['form_show_centers'];

View File

@@ -48,7 +48,7 @@ use function is_array;
final class PersonController extends AbstractController
{
public function __construct(
private AuthorizationHelperInterface $authorizationHelper,
private readonly AuthorizationHelperInterface $authorizationHelper,
protected SimilarPersonMatcher $similarPersonMatcher,
protected TranslatorInterface $translator,
protected EventDispatcherInterface $eventDispatcher,
@@ -57,9 +57,9 @@ final class PersonController extends AbstractController
*/
protected PersonRepository $personRepository,
protected ConfigPersonAltNamesHelper $configPersonAltNameHelper,
private LoggerInterface $logger,
private ValidatorInterface $validator,
private EntityManagerInterface $em
private readonly LoggerInterface $logger,
private readonly ValidatorInterface $validator,
private readonly EntityManagerInterface $em
) {
}

View File

@@ -34,7 +34,7 @@ use function count;
class PersonDuplicateController extends Controller
{
public function __construct(private SimilarPersonMatcher $similarPersonMatcher, private TranslatorInterface $translator, private PersonRepository $personRepository, private PersonMove $personMove, private 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)
{
}

View File

@@ -25,7 +25,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
final class PersonResourceController extends AbstractController
{
public function __construct(private PersonResourceRepository $personResourceRepository, private PersonRepository $personRepository, private EntityManagerInterface $em, private TranslatorInterface $translator)
public function __construct(private readonly PersonResourceRepository $personResourceRepository, private readonly PersonRepository $personRepository, private readonly EntityManagerInterface $em, private readonly TranslatorInterface $translator)
{
}

View File

@@ -40,7 +40,7 @@ use function is_int;
class ReassignAccompanyingPeriodController extends AbstractController
{
public function __construct(private AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private UserRepository $userRepository, private AccompanyingPeriodRepository $courseRepository, private EngineInterface $engine, private FormFactoryInterface $formFactory, private PaginatorFactory $paginatorFactory, private Security $security, private UserRender $userRender, private EntityManagerInterface $em)
public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly UserRepository $userRepository, private readonly AccompanyingPeriodRepository $courseRepository, private readonly EngineInterface $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly UserRender $userRender, private readonly EntityManagerInterface $em)
{
}
@@ -84,7 +84,7 @@ class ReassignAccompanyingPeriodController extends AbstractController
$assignForm->handleRequest($request);
if ($assignForm->isSubmitted() && $assignForm->isValid()) {
$assignPeriodIds = json_decode($assignForm->get('periods')->getData(), true, 512, JSON_THROW_ON_ERROR);
$assignPeriodIds = json_decode((string) $assignForm->get('periods')->getData(), true, 512, JSON_THROW_ON_ERROR);
$userTo = $assignForm->get('userTo')->getData();
$userFrom = $assignForm->get('userFrom')->getData();

View File

@@ -21,7 +21,7 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
class RelationshipApiController extends ApiController
{
public function __construct(private ValidatorInterface $validator, private RelationshipRepository $repository)
public function __construct(private readonly ValidatorInterface $validator, private readonly RelationshipRepository $repository)
{
}

View File

@@ -27,7 +27,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
final class ResidentialAddressController extends AbstractController
{
public function __construct(private UrlGeneratorInterface $generator, private TranslatorInterface $translator, private ResidentialAddressRepository $residentialAddressRepository)
public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly ResidentialAddressRepository $residentialAddressRepository)
{
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Routing\Annotation\Route;
class SocialWorkEvaluationApiController extends AbstractController
{
public function __construct(private PaginatorFactory $paginatorFactory)
public function __construct(private readonly PaginatorFactory $paginatorFactory)
{
}

View File

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

View File

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

View File

@@ -23,7 +23,7 @@ use function count;
class SocialWorkSocialActionApiController extends ApiController
{
public function __construct(private SocialIssueRepository $socialIssueRepository, private PaginatorFactory $paginator)
public function __construct(private readonly SocialIssueRepository $socialIssueRepository, private readonly PaginatorFactory $paginator)
{
}

View File

@@ -19,7 +19,7 @@ use Symfony\Component\Routing\Annotation\Route;
class UserAccompanyingPeriodController extends AbstractController
{
public function __construct(private AccompanyingPeriodRepository $accompanyingPeriodRepository, private PaginatorFactory $paginatorFactory)
public function __construct(private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository, private readonly PaginatorFactory $paginatorFactory)
{
}