DX: apply rector rules up to php8.0

This commit is contained in:
2023-04-15 01:05:37 +02:00
parent d8870e906f
commit dde3002100
714 changed files with 2348 additions and 9263 deletions

View File

@@ -22,14 +22,8 @@ use Psr\Log\LoggerInterface;
class OldDraftAccompanyingPeriodRemover implements OldDraftAccompanyingPeriodRemoverInterface
{
private EntityManagerInterface $em;
private LoggerInterface $logger;
public function __construct(EntityManagerInterface $em, LoggerInterface $logger)
public function __construct(private EntityManagerInterface $em, private LoggerInterface $logger)
{
$this->em = $em;
$this->logger = $logger;
}
public function remove(DateInterval $interval): void

View File

@@ -46,40 +46,8 @@ class AccompanyingPeriodContext implements
DocGeneratorContextWithAdminFormInterface,
DocGeneratorContextWithPublicFormInterface
{
private BaseContextData $baseContextData;
private DocumentCategoryRepository $documentCategoryRepository;
private EntityManagerInterface $em;
private NormalizerInterface $normalizer;
private PersonRenderInterface $personRender;
private PersonRepository $personRepository;
private TranslatableStringHelperInterface $translatableStringHelper;
private TranslatorInterface $translator;
public function __construct(
DocumentCategoryRepository $documentCategoryRepository,
NormalizerInterface $normalizer,
TranslatableStringHelperInterface $translatableStringHelper,
EntityManagerInterface $em,
PersonRenderInterface $personRender,
PersonRepository $personRepository,
TranslatorInterface $translator,
BaseContextData $baseContextData
) {
$this->documentCategoryRepository = $documentCategoryRepository;
$this->normalizer = $normalizer;
$this->translatableStringHelper = $translatableStringHelper;
$this->em = $em;
$this->personRender = $personRender;
$this->personRepository = $personRepository;
$this->translator = $translator;
$this->baseContextData = $baseContextData;
public function __construct(private DocumentCategoryRepository $documentCategoryRepository, private NormalizerInterface $normalizer, private TranslatableStringHelperInterface $translatableStringHelper, private EntityManagerInterface $em, private PersonRenderInterface $personRender, private PersonRepository $personRepository, private TranslatorInterface $translator, private BaseContextData $baseContextData)
{
}
public function adminFormReverseTransform(array $data): array

View File

@@ -29,16 +29,8 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
*/
class AccompanyingPeriodWorkContext implements DocGeneratorContextWithPublicFormInterface
{
private NormalizerInterface $normalizer;
private AccompanyingPeriodContext $periodContext;
public function __construct(
AccompanyingPeriodContext $periodContext,
NormalizerInterface $normalizer
) {
$this->periodContext = $periodContext;
$this->normalizer = $normalizer;
public function __construct(private AccompanyingPeriodContext $periodContext, private NormalizerInterface $normalizer)
{
}
public function adminFormReverseTransform(array $data): array

View File

@@ -33,28 +33,8 @@ class AccompanyingPeriodWorkEvaluationContext implements
DocGeneratorContextWithAdminFormInterface,
DocGeneratorContextWithPublicFormInterface
{
private AccompanyingPeriodWorkContext $accompanyingPeriodWorkContext;
private EntityManagerInterface $em;
private EvaluationRepository $evaluationRepository;
private NormalizerInterface $normalizer;
private TranslatableStringHelperInterface $translatableStringHelper;
public function __construct(
AccompanyingPeriodWorkContext $accompanyingPeriodWorkContext,
EntityManagerInterface $em,
EvaluationRepository $evaluationRepository,
NormalizerInterface $normalizer,
TranslatableStringHelperInterface $translatableStringHelper
) {
$this->accompanyingPeriodWorkContext = $accompanyingPeriodWorkContext;
$this->em = $em;
$this->evaluationRepository = $evaluationRepository;
$this->normalizer = $normalizer;
$this->translatableStringHelper = $translatableStringHelper;
public function __construct(private AccompanyingPeriodWorkContext $accompanyingPeriodWorkContext, private EntityManagerInterface $em, private EvaluationRepository $evaluationRepository, private NormalizerInterface $normalizer, private TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function adminFormReverseTransform(array $data): array

View File

@@ -45,52 +45,22 @@ use function count;
final class PersonContext implements PersonContextInterface
{
private AuthorizationHelperInterface $authorizationHelper;
private BaseContextData $baseContextData;
private CenterResolverManagerInterface $centerResolverManager;
private DocumentCategoryRepository $documentCategoryRepository;
private EntityManagerInterface $em;
private NormalizerInterface $normalizer;
private ScopeRepositoryInterface $scopeRepository;
private Security $security;
private bool $showScopes;
private TranslatableStringHelperInterface $translatableStringHelper;
private TranslatorInterface $translator;
public function __construct(
AuthorizationHelperInterface $authorizationHelper,
BaseContextData $baseContextData,
CenterResolverManagerInterface $centerResolverManager,
DocumentCategoryRepository $documentCategoryRepository,
EntityManagerInterface $em,
NormalizerInterface $normalizer,
private AuthorizationHelperInterface $authorizationHelper,
private BaseContextData $baseContextData,
private CenterResolverManagerInterface $centerResolverManager,
private DocumentCategoryRepository $documentCategoryRepository,
private EntityManagerInterface $em,
private NormalizerInterface $normalizer,
ParameterBagInterface $parameterBag,
ScopeRepositoryInterface $scopeRepository,
Security $security,
TranslatorInterface $translator,
TranslatableStringHelperInterface $translatableStringHelper
private ScopeRepositoryInterface $scopeRepository,
private Security $security,
private TranslatorInterface $translator,
private TranslatableStringHelperInterface $translatableStringHelper
) {
$this->authorizationHelper = $authorizationHelper;
$this->centerResolverManager = $centerResolverManager;
$this->baseContextData = $baseContextData;
$this->documentCategoryRepository = $documentCategoryRepository;
$this->em = $em;
$this->normalizer = $normalizer;
$this->scopeRepository = $scopeRepository;
$this->security = $security;
$this->showScopes = $parameterBag->get('chill_main')['acl']['form_show_scopes'];
$this->translator = $translator;
$this->translatableStringHelper = $translatableStringHelper;
}
public function adminFormReverseTransform(array $data): array

View File

@@ -27,20 +27,8 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
*/
class PersonContextWithThirdParty implements DocGeneratorContextWithAdminFormInterface, DocGeneratorContextWithPublicFormInterface
{
private NormalizerInterface $normalizer;
private PersonContextInterface $personContext;
private ThirdPartyRepository $thirdPartyRepository;
public function __construct(
PersonContextInterface $personContext,
NormalizerInterface $normalizer,
ThirdPartyRepository $thirdPartyRepository
) {
$this->personContext = $personContext;
$this->normalizer = $normalizer;
$this->thirdPartyRepository = $thirdPartyRepository;
public function __construct(private PersonContextInterface $personContext, private NormalizerInterface $normalizer, private ThirdPartyRepository $thirdPartyRepository)
{
}
public function adminFormReverseTransform(array $data): array

View File

@@ -30,32 +30,8 @@ use function count;
final class SocialWorkMetadata implements SocialWorkMetadataInterface
{
private EntityManagerInterface $entityManager;
private EvaluationRepository $evaluationRepository;
private GoalRepository $goalRepository;
private ResultRepository $resultRepository;
private SocialActionRepository $socialActionRepository;
private SocialIssueRepository $socialIssueRepository;
public function __construct(
SocialIssueRepository $socialIssueRepository,
SocialActionRepository $socialActionRepository,
GoalRepository $goalRepository,
ResultRepository $resultRepository,
EvaluationRepository $evaluationRepository,
EntityManagerInterface $entityManager
) {
$this->socialIssueRepository = $socialIssueRepository;
$this->socialActionRepository = $socialActionRepository;
$this->goalRepository = $goalRepository;
$this->resultRepository = $resultRepository;
$this->evaluationRepository = $evaluationRepository;
$this->entityManager = $entityManager;
public function __construct(private SocialIssueRepository $socialIssueRepository, private SocialActionRepository $socialActionRepository, private GoalRepository $goalRepository, private ResultRepository $resultRepository, private EvaluationRepository $evaluationRepository, private EntityManagerInterface $entityManager)
{
}
/**