mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
apply rules rector up to php82
This commit is contained in:
@@ -74,7 +74,7 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
|
||||
'pinnedComment' => AccompanyingPeriod\Comment::class,
|
||||
];
|
||||
|
||||
public function __construct(private TranslatorInterface $translator, private TranslatableStringHelper $translatableStringHelper, private SocialIssueRender $socialIssueRender, private ClosingMotiveRender $closingMotiveRender, private ScopeResolverDispatcher $scopeResolverDispatcher)
|
||||
public function __construct(private readonly TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper, private readonly SocialIssueRender $socialIssueRender, private readonly ClosingMotiveRender $closingMotiveRender, private readonly ScopeResolverDispatcher $scopeResolverDispatcher)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -32,7 +32,7 @@ class AccompanyingPeriodResourceNormalizer implements DenormalizerAwareInterface
|
||||
|
||||
use ObjectToPopulateTrait;
|
||||
|
||||
public function __construct(private ResourceRepository $repository)
|
||||
public function __construct(private readonly ResourceRepository $repository)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -36,11 +36,11 @@ class AccompanyingPeriodWorkDenormalizer implements ContextAwareDenormalizerInte
|
||||
|
||||
use ObjectToPopulateTrait;
|
||||
|
||||
public const GROUP_CREATE = 'accompanying_period_work:create';
|
||||
final public const GROUP_CREATE = 'accompanying_period_work:create';
|
||||
|
||||
public const GROUP_EDIT = 'accompanying_period_work:edit';
|
||||
final public const GROUP_EDIT = 'accompanying_period_work:edit';
|
||||
|
||||
public function __construct(private AccompanyingPeriodWorkRepository $workRepository, private EntityManagerInterface $em)
|
||||
public function __construct(private readonly AccompanyingPeriodWorkRepository $workRepository, private readonly EntityManagerInterface $em)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class AccompanyingPeriodWorkEvaluationDocumentNormalizer implements ContextAware
|
||||
|
||||
private const SKIP = 'accompanying_period_work_evaluation_document_skip';
|
||||
|
||||
public function __construct(private EntityWorkflowRepository $entityWorkflowRepository, private MetadataExtractor $metadataExtractor, private Registry $registry)
|
||||
public function __construct(private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ class AccompanyingPeriodWorkEvaluationNormalizer implements ContextAwareNormaliz
|
||||
|
||||
private const IGNORE_EVALUATION = 'evaluation:ignore';
|
||||
|
||||
public function __construct(private Registry $registry, private EntityWorkflowRepository $entityWorkflowRepository, private MetadataExtractor $metadataExtractor)
|
||||
public function __construct(private readonly Registry $registry, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly MetadataExtractor $metadataExtractor)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,7 @@ class AccompanyingPeriodWorkNormalizer implements ContextAwareNormalizerInterfac
|
||||
|
||||
private const IGNORE_WORK = 'ignore:work';
|
||||
|
||||
public function __construct(private Registry $registry, private EntityWorkflowRepository $entityWorkflowRepository, private MetadataExtractor $metadataExtractor)
|
||||
public function __construct(private readonly Registry $registry, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly MetadataExtractor $metadataExtractor)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,7 @@ class MembersEditorNormalizer implements DenormalizerAwareInterface, Denormalize
|
||||
{
|
||||
use DenormalizerAwareTrait;
|
||||
|
||||
public function __construct(private MembersEditorFactory $factory)
|
||||
public function __construct(private readonly MembersEditorFactory $factory)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -47,7 +47,7 @@ class PersonDocGenNormalizer implements
|
||||
|
||||
private const CIRCULAR_KEY = 'person:circular';
|
||||
|
||||
public function __construct(private PersonRenderInterface $personRender, private RelationshipRepository $relationshipRepository, private TranslatorInterface $translator, private TranslatableStringHelper $translatableStringHelper, private SummaryBudgetInterface $summaryBudget)
|
||||
public function __construct(private readonly PersonRenderInterface $personRender, private readonly RelationshipRepository $relationshipRepository, private readonly TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper, private readonly SummaryBudgetInterface $summaryBudget)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -48,12 +48,12 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
|
||||
use ObjectToPopulateTrait;
|
||||
|
||||
public function __construct(
|
||||
private ChillEntityRenderExtension $render,
|
||||
private readonly ChillEntityRenderExtension $render,
|
||||
/* TODO: replace by PersonRenderInterface, as sthis is the only one required */
|
||||
private PersonRepository $repository,
|
||||
private CenterResolverManagerInterface $centerResolverManager,
|
||||
private ResidentialAddressRepository $residentialAddressRepository,
|
||||
private PhoneNumberHelperInterface $phoneNumberHelper
|
||||
private readonly PersonRepository $repository,
|
||||
private readonly CenterResolverManagerInterface $centerResolverManager,
|
||||
private readonly ResidentialAddressRepository $residentialAddressRepository,
|
||||
private readonly PhoneNumberHelperInterface $phoneNumberHelper
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -214,14 +214,9 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
|
||||
return $data;
|
||||
}
|
||||
|
||||
return array_merge($data, [
|
||||
'centers' => $this->normalizer->normalize($this->centerResolverManager->resolveCenters($person), $format, $context),
|
||||
'altNames' => $this->normalizeAltNames($person->getAltNames()),
|
||||
'current_household_id' => $household ? $this->normalizer->normalize($household->getId(), $format, $context) : null,
|
||||
'current_residential_addresses' => $currentResidentialAddresses ?
|
||||
$this->normalizer->normalize($currentResidentialAddresses, $format, $context) :
|
||||
null,
|
||||
]);
|
||||
return [...$data, 'centers' => $this->normalizer->normalize($this->centerResolverManager->resolveCenters($person), $format, $context), 'altNames' => $this->normalizeAltNames($person->getAltNames()), 'current_household_id' => $household ? $this->normalizer->normalize($household->getId(), $format, $context) : null, 'current_residential_addresses' => $currentResidentialAddresses ?
|
||||
$this->normalizer->normalize($currentResidentialAddresses, $format, $context) :
|
||||
null];
|
||||
}
|
||||
|
||||
public function supportsDenormalization($data, $type, $format = null)
|
||||
|
@@ -22,7 +22,7 @@ class RelationshipDocGenNormalizer implements ContextAwareNormalizerInterface, N
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
public function __construct(private TranslatableStringHelperInterface $translatableStringHelper)
|
||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ class SocialActionNormalizer implements NormalizerAwareInterface, NormalizerInte
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
public function __construct(private SocialActionRender $render)
|
||||
public function __construct(private readonly SocialActionRender $render)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ class SocialIssueNormalizer implements ContextAwareNormalizerInterface, Normaliz
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
public function __construct(private SocialIssueRender $render)
|
||||
public function __construct(private readonly SocialIssueRender $render)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ class WorkflowNormalizer implements ContextAwareNormalizerInterface, NormalizerA
|
||||
|
||||
private const IGNORE_ENTITY_WORKFLOW = 'ignore:entity_workflow';
|
||||
|
||||
public function __construct(private Registry $registry, private MetadataExtractor $metadataExtractor)
|
||||
public function __construct(private readonly Registry $registry, private readonly MetadataExtractor $metadataExtractor)
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user