apply rector rules: php up to php82

This commit is contained in:
2023-07-19 23:16:01 +02:00
parent 7b637d1287
commit 023a29cb78
744 changed files with 1369 additions and 1381 deletions

View File

@@ -21,7 +21,7 @@ use function in_array;
class AdministrativeLocationAggregator implements AggregatorInterface
{
public function __construct(private LocationRepository $locationRepository, private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly LocationRepository $locationRepository, private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -20,7 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class ClosingMotiveAggregator implements AggregatorInterface
{
public function __construct(private ClosingMotiveRepositoryInterface $motiveRepository, private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly ClosingMotiveRepositoryInterface $motiveRepository, private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -20,7 +20,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class ConfidentialAggregator implements AggregatorInterface
{
public function __construct(private TranslatorInterface $translator)
public function __construct(private readonly TranslatorInterface $translator)
{
}

View File

@@ -21,7 +21,7 @@ use function in_array;
class CreatorJobAggregator implements AggregatorInterface
{
public function __construct(private UserJobRepository $jobRepository, private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly UserJobRepository $jobRepository, private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -20,7 +20,7 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
final class DurationAggregator implements AggregatorInterface
final readonly class DurationAggregator implements AggregatorInterface
{
private const CHOICES = [
'month',

View File

@@ -20,7 +20,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class EmergencyAggregator implements AggregatorInterface
{
public function __construct(private TranslatorInterface $translator)
public function __construct(private readonly TranslatorInterface $translator)
{
}

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class EvaluationAggregator implements AggregatorInterface
final readonly class EvaluationAggregator implements AggregatorInterface
{
public function __construct(private EvaluationRepository $evaluationRepository, private TranslatableStringHelper $translatableStringHelper)
{

View File

@@ -27,7 +27,7 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\FormBuilderInterface;
use UnexpectedValueException;
final class GeographicalUnitStatAggregator implements AggregatorInterface
final readonly class GeographicalUnitStatAggregator implements AggregatorInterface
{
public function __construct(private GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private TranslatableStringHelperInterface $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter)
{

View File

@@ -20,7 +20,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class IntensityAggregator implements AggregatorInterface
{
public function __construct(private TranslatorInterface $translator)
public function __construct(private readonly TranslatorInterface $translator)
{
}

View File

@@ -23,11 +23,11 @@ use function in_array;
final class OriginAggregator implements AggregatorInterface
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(
EntityManagerInterface $em,
private TranslatableStringHelper $translatableStringHelper
private readonly TranslatableStringHelper $translatableStringHelper
) {
$this->repository = $em->getRepository(Origin::class);
}

View File

@@ -21,7 +21,7 @@ use Chill\PersonBundle\Export\Declarations;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
final class ReferrerAggregator implements AggregatorInterface
final readonly class ReferrerAggregator implements AggregatorInterface
{
private const A = 'acp_ref_agg_uhistory';

View File

@@ -26,7 +26,7 @@ class ReferrerScopeAggregator implements AggregatorInterface
{
private const SCOPE_KEY = 'acp_agg_refscope_user_history_ref_scope_name';
public function __construct(private ScopeRepositoryInterface $scopeRepository, private TranslatableStringHelperInterface $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly ScopeRepositoryInterface $scopeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -18,7 +18,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function in_array;
final class RequestorAggregator implements AggregatorInterface
final readonly class RequestorAggregator implements AggregatorInterface
{
public function __construct(private TranslatorInterface $translator)
{

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class ScopeAggregator implements AggregatorInterface
final readonly class ScopeAggregator implements AggregatorInterface
{
public function __construct(private ScopeRepository $scopeRepository, private TranslatableStringHelper $translatableStringHelper)
{

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class SocialActionAggregator implements AggregatorInterface
final readonly class SocialActionAggregator implements AggregatorInterface
{
public function __construct(private SocialActionRender $actionRender, private SocialActionRepository $actionRepository)
{

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class SocialIssueAggregator implements AggregatorInterface
final readonly class SocialIssueAggregator implements AggregatorInterface
{
public function __construct(private SocialIssueRepository $issueRepository, private SocialIssueRender $issueRender)
{

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function in_array;
final class StepAggregator implements AggregatorInterface
final readonly class StepAggregator implements AggregatorInterface
{
private const A = 'acpstephistories';

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class UserJobAggregator implements AggregatorInterface
final readonly class UserJobAggregator implements AggregatorInterface
{
public function __construct(private UserJobRepository $jobRepository, private TranslatableStringHelper $translatableStringHelper)
{

View File

@@ -19,7 +19,7 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class ByEndDateAggregator implements AggregatorInterface
final class ByEndDateAggregator implements AggregatorInterface
{
private const CHOICES = [
'by week' => 'week',
@@ -29,8 +29,6 @@ class ByEndDateAggregator implements AggregatorInterface
private const DEFAULT_CHOICE = 'year';
private TranslatorInterface $translator;
public function addRole(): ?string
{
return null;

View File

@@ -19,7 +19,7 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class ByMaxDateAggregator implements AggregatorInterface
final class ByMaxDateAggregator implements AggregatorInterface
{
private const CHOICES = [
'by week' => 'week',
@@ -29,8 +29,6 @@ class ByMaxDateAggregator implements AggregatorInterface
private const DEFAULT_CHOICE = 'year';
private TranslatorInterface $translator;
public function addRole(): ?string
{
return null;

View File

@@ -19,7 +19,7 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class ByStartDateAggregator implements AggregatorInterface
final class ByStartDateAggregator implements AggregatorInterface
{
private const CHOICES = [
'by week' => 'week',
@@ -29,8 +29,6 @@ class ByStartDateAggregator implements AggregatorInterface
private const DEFAULT_CHOICE = 'year';
private TranslatorInterface $translator;
public function addRole(): ?string
{
return null;

View File

@@ -20,7 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class EvaluationTypeAggregator implements AggregatorInterface
{
public function __construct(private EvaluationRepository $evaluationRepository, private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly EvaluationRepository $evaluationRepository, private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -20,7 +20,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class HavingEndDateAggregator implements AggregatorInterface
{
public function __construct(private TranslatorInterface $translator)
public function __construct(private readonly TranslatorInterface $translator)
{
}

View File

@@ -24,7 +24,7 @@ use function in_array;
class ChildrenNumberAggregator implements AggregatorInterface
{
public function __construct(private TranslatorInterface $translator, private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -25,7 +25,7 @@ use function in_array;
class CompositionAggregator implements AggregatorInterface
{
public function __construct(private HouseholdCompositionTypeRepository $typeRepository, private TranslatableStringHelper $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly HouseholdCompositionTypeRepository $typeRepository, private readonly TranslatableStringHelper $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -27,7 +27,7 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface
{
private const PREFIX = 'acp_by_household_compo_agg';
public function __construct(private RollingDateConverterInterface $rollingDateConverter, private HouseholdCompositionTypeRepositoryInterface $householdCompositionTypeRepository, private TranslatableStringHelperInterface $translatableStringHelper)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly HouseholdCompositionTypeRepositoryInterface $householdCompositionTypeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}

View File

@@ -25,7 +25,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function in_array;
final class CountryOfBirthAggregator implements AggregatorInterface, ExportElementValidatedInterface
final readonly class CountryOfBirthAggregator implements AggregatorInterface, ExportElementValidatedInterface
{
public function __construct(private CountryRepository $countriesRepository, private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator)
{

View File

@@ -19,7 +19,7 @@ use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
final class GenderAggregator implements AggregatorInterface
final readonly class GenderAggregator implements AggregatorInterface
{
public function __construct(private TranslatorInterface $translator)
{

View File

@@ -26,7 +26,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class GeographicalUnitAggregator implements AggregatorInterface
{
public function __construct(private GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private TranslatableStringHelperInterface $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -27,7 +27,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function in_array;
final class HouseholdPositionAggregator implements AggregatorInterface, ExportElementValidatedInterface
final readonly class HouseholdPositionAggregator implements AggregatorInterface, ExportElementValidatedInterface
{
public function __construct(private TranslatorInterface $translator, private TranslatableStringHelper $translatableStringHelper, private PositionRepository $positionRepository, private RollingDateConverterInterface $rollingDateConverter)
{

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class MaritalStatusAggregator implements AggregatorInterface
final readonly class MaritalStatusAggregator implements AggregatorInterface
{
public function __construct(private MaritalStatusRepository $maritalStatusRepository, private TranslatableStringHelper $translatableStringHelper)
{

View File

@@ -23,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
final class NationalityAggregator implements AggregatorInterface, ExportElementValidatedInterface
final readonly class NationalityAggregator implements AggregatorInterface, ExportElementValidatedInterface
{
public function __construct(private CountryRepository $countriesRepository, private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator)
{

View File

@@ -22,7 +22,7 @@ use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class ActionTypeAggregator implements AggregatorInterface
final readonly class ActionTypeAggregator implements AggregatorInterface
{
public function __construct(private SocialActionRepository $socialActionRepository, private SocialActionRender $actionRender, private SocialIssueRender $socialIssueRender, private SocialIssueRepository $socialIssueRepository)
{

View File

@@ -20,7 +20,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class CurrentActionAggregator implements AggregatorInterface
{
public function __construct(private TranslatorInterface $translator)
public function __construct(private readonly TranslatorInterface $translator)
{
}

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class GoalAggregator implements AggregatorInterface
final readonly class GoalAggregator implements AggregatorInterface
{
public function __construct(private GoalRepository $goalRepository, private TranslatableStringHelper $translatableStringHelper)
{

View File

@@ -23,7 +23,7 @@ use function in_array;
class GoalResultAggregator implements AggregatorInterface
{
public function __construct(private ResultRepository $resultRepository, private GoalRepository $goalRepository, private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly ResultRepository $resultRepository, private readonly GoalRepository $goalRepository, private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class JobAggregator implements AggregatorInterface
final readonly class JobAggregator implements AggregatorInterface
{
public function __construct(private UserJobRepository $jobRepository, private TranslatableStringHelper $translatableStringHelper)
{

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class ReferrerAggregator implements AggregatorInterface
final readonly class ReferrerAggregator implements AggregatorInterface
{
public function __construct(private UserRepository $userRepository, private UserRender $userRender)
{

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class ResultAggregator implements AggregatorInterface
final readonly class ResultAggregator implements AggregatorInterface
{
public function __construct(private ResultRepository $resultRepository, private TranslatableStringHelper $translatableStringHelper)
{

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
final class ScopeAggregator implements AggregatorInterface
final readonly class ScopeAggregator implements AggregatorInterface
{
public function __construct(private ScopeRepository $scopeRepository, private TranslatableStringHelper $translatableStringHelper)
{

View File

@@ -16,15 +16,15 @@ namespace Chill\PersonBundle\Export;
*/
abstract class Declarations
{
public const ACP_TYPE = 'accompanying_period';
final public const ACP_TYPE = 'accompanying_period';
public const EVAL_TYPE = 'evaluation';
final public const EVAL_TYPE = 'evaluation';
public const HOUSEHOLD_TYPE = 'household';
final public const HOUSEHOLD_TYPE = 'household';
public const PERSON_IMPLIED_IN = 'person_implied_in';
final public const PERSON_IMPLIED_IN = 'person_implied_in';
public const PERSON_TYPE = 'person';
final public const PERSON_TYPE = 'person';
public const SOCIAL_WORK_ACTION_TYPE = 'social_actions';
final public const SOCIAL_WORK_ACTION_TYPE = 'social_actions';
}

View File

@@ -25,7 +25,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class CountEvaluation implements ExportInterface, GroupedExportInterface
{
public function __construct(private EntityManagerInterface $entityManager)
public function __construct(private readonly EntityManagerInterface $entityManager)
{
}

View File

@@ -30,7 +30,7 @@ class CountHousehold implements ExportInterface, GroupedExportInterface
{
private const TR_PREFIX = 'export.export.nb_household_with_course.';
public function __construct(private EntityManagerInterface $entityManager, private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -27,7 +27,7 @@ use function in_array;
class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExportInterface
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(
EntityManagerInterface $em

View File

@@ -76,7 +76,7 @@ class ListAccompanyingPeriodWork implements ListInterface, GroupedExportInterfac
'updatedBy',
];
public function __construct(private EntityManagerInterface $entityManager, private DateTimeHelper $dateTimeHelper, private UserHelper $userHelper, private LabelPersonHelper $personHelper, private LabelThirdPartyHelper $thirdPartyHelper, private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper, private SocialIssueRender $socialIssueRender, private SocialIssueRepository $socialIssueRepository, private SocialActionRender $socialActionRender, private RollingDateConverterInterface $rollingDateConverter, private AggregateStringHelper $aggregateStringHelper, private SocialActionRepository $socialActionRepository)
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly DateTimeHelper $dateTimeHelper, private readonly UserHelper $userHelper, private readonly LabelPersonHelper $personHelper, private readonly LabelThirdPartyHelper $thirdPartyHelper, private readonly TranslatableStringExportLabelHelper $translatableStringExportLabelHelper, private readonly SocialIssueRender $socialIssueRender, private readonly SocialIssueRepository $socialIssueRepository, private readonly SocialActionRender $socialActionRender, private readonly RollingDateConverterInterface $rollingDateConverter, private readonly AggregateStringHelper $aggregateStringHelper, private readonly SocialActionRepository $socialActionRepository)
{
}

View File

@@ -68,7 +68,7 @@ class ListEvaluation implements ListInterface, GroupedExportInterface
'updatedBy',
];
public function __construct(private EntityManagerInterface $entityManager, private SocialIssueRender $socialIssueRender, private SocialIssueRepository $socialIssueRepository, private SocialActionRender $socialActionRender, private SocialActionRepository $socialActionRepository, private UserHelper $userHelper, private LabelPersonHelper $personHelper, private DateTimeHelper $dateTimeHelper, private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper, private AggregateStringHelper $aggregateStringHelper, private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly SocialIssueRender $socialIssueRender, private readonly SocialIssueRepository $socialIssueRepository, private readonly SocialActionRender $socialActionRender, private readonly SocialActionRepository $socialActionRepository, private readonly UserHelper $userHelper, private readonly LabelPersonHelper $personHelper, private readonly DateTimeHelper $dateTimeHelper, private readonly TranslatableStringExportLabelHelper $translatableStringExportLabelHelper, private readonly AggregateStringHelper $aggregateStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -46,11 +46,11 @@ class ListHouseholdInPeriod implements ListInterface, GroupedExportInterface
];
public function __construct(
private ExportAddressHelper $addressHelper,
private AggregateStringHelper $aggregateStringHelper,
private EntityManagerInterface $entityManager,
private RollingDateConverterInterface $rollingDateConverter,
private TranslatableStringExportLabelHelper $translatableStringHelper
private readonly ExportAddressHelper $addressHelper,
private readonly AggregateStringHelper $aggregateStringHelper,
private readonly EntityManagerInterface $entityManager,
private readonly RollingDateConverterInterface $rollingDateConverter,
private readonly TranslatableStringExportLabelHelper $translatableStringHelper
) {
}

View File

@@ -50,7 +50,7 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou
{
private $slugs = [];
public function __construct(private ExportAddressHelper $addressHelper, private CustomFieldProvider $customFieldProvider, private ListPersonHelper $listPersonHelper, private EntityManagerInterface $entityManager, private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly ExportAddressHelper $addressHelper, private readonly CustomFieldProvider $customFieldProvider, private readonly ListPersonHelper $listPersonHelper, private readonly EntityManagerInterface $entityManager, private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -49,8 +49,8 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
public function __construct(
EntityManagerInterface $em,
private TranslatorInterface $translator,
private UrlGeneratorInterface $router,
private readonly TranslatorInterface $translator,
private readonly UrlGeneratorInterface $router,
$routeParameters
) {
$this->entityManager = $em;

View File

@@ -42,7 +42,7 @@ use function strlen;
*/
class ListPersonHavingAccompanyingPeriod implements ExportElementValidatedInterface, ListInterface, GroupedExportInterface
{
public function __construct(private ExportAddressHelper $addressHelper, private ListPersonHelper $listPersonHelper, private EntityManagerInterface $entityManager)
public function __construct(private readonly ExportAddressHelper $addressHelper, private readonly ListPersonHelper $listPersonHelper, private readonly EntityManagerInterface $entityManager)
{
}

View File

@@ -29,7 +29,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportInterface
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(
EntityManagerInterface $em

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class ActiveOnDateFilter implements FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class ActiveOneDayBetweenDatesFilter implements FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -20,7 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class AdministrativeLocationFilter implements FilterInterface
{
public function __construct(private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class ClosingMotiveFilter implements FilterInterface
{
public function __construct(private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -28,7 +28,7 @@ class ConfidentialFilter implements FilterInterface
private const DEFAULT_CHOICE = 'false';
public function __construct(private TranslatorInterface $translator)
public function __construct(private readonly TranslatorInterface $translator)
{
}

View File

@@ -23,7 +23,7 @@ use function in_array;
class CreatorJobFilter implements FilterInterface
{
public function __construct(private TranslatableStringHelper $translatableStringHelper, private UserJobRepositoryInterface $userJobRepository)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly UserJobRepositoryInterface $userJobRepository)
{
}

View File

@@ -28,7 +28,7 @@ class EmergencyFilter implements FilterInterface
private const DEFAULT_CHOICE = 'false';
public function __construct(private TranslatorInterface $translator)
public function __construct(private readonly TranslatorInterface $translator)
{
}

View File

@@ -23,7 +23,7 @@ use function in_array;
class EvaluationFilter implements FilterInterface
{
public function __construct(private EvaluationRepositoryInterface $evaluationRepository, private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly EvaluationRepositoryInterface $evaluationRepository, private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -32,7 +32,7 @@ use Symfony\Component\Form\FormBuilderInterface;
*/
class GeographicalUnitStatFilter implements FilterInterface
{
public function __construct(private GeographicalUnitRepositoryInterface $geographicalUnitRepository, private GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private TranslatableStringHelperInterface $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class HasNoReferrerFilter implements FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -23,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class HasTemporaryLocationFilter implements FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -28,7 +28,7 @@ class IntensityFilter implements FilterInterface
private const DEFAULT_CHOICE = 'occasional';
public function __construct(private TranslatorInterface $translator)
public function __construct(private readonly TranslatorInterface $translator)
{
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class OpenBetweenDatesFilter implements FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class OriginFilter implements FilterInterface
{
public function __construct(private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -29,7 +29,7 @@ class ReferrerFilter implements FilterInterface
private const PU = 'acp_referrer_filter_users';
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function in_array;
final class RequestorFilter implements FilterInterface
final readonly class RequestorFilter implements FilterInterface
{
private const DEFAULT_CHOICE = 'participation';

View File

@@ -23,7 +23,7 @@ use function in_array;
class SocialActionFilter implements FilterInterface
{
public function __construct(private TranslatableStringHelper $translatableStringHelper, private SocialActionRender $actionRender)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly SocialActionRender $actionRender)
{
}

View File

@@ -30,7 +30,7 @@ class SocialIssueFilter implements FilterInterface
public function __construct(
TranslatorInterface $translator,
private SocialIssueRender $socialIssueRender
private readonly SocialIssueRender $socialIssueRender
) {
$this->translator = $translator;
}

View File

@@ -39,7 +39,7 @@ class StepFilterBetweenDates implements FilterInterface
'course.inactive_long' => AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_LONG,
];
public function __construct(private RollingDateConverterInterface $rollingDateConverter, private TranslatorInterface $translator)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatorInterface $translator)
{
}

View File

@@ -43,7 +43,7 @@ class StepFilterOnDate implements FilterInterface
'course.inactive_long' => AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_LONG,
];
public function __construct(private RollingDateConverterInterface $rollingDateConverter, private TranslatorInterface $translator)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatorInterface $translator)
{
}

View File

@@ -34,7 +34,7 @@ class UserJobFilter implements FilterInterface
private const PJ = 'acp_ujob_filter_job';
public function __construct(private TranslatableStringHelper $translatableStringHelper, private UserJobRepositoryInterface $userJobRepository, private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly UserJobRepositoryInterface $userJobRepository, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -35,7 +35,7 @@ class UserScopeFilter implements FilterInterface
private const PS = 'acp_uscope_filter_scopes';
public function __construct(private ScopeRepositoryInterface $scopeRepository, private Security $security, private TranslatableStringHelper $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly ScopeRepositoryInterface $scopeRepository, private readonly Security $security, private readonly TranslatableStringHelper $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class ByEndDateFilter implements FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class ByStartDateFilter implements FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -20,7 +20,7 @@ use Doctrine\ORM\QueryBuilder;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\FormBuilderInterface;
final class EvaluationTypeFilter implements FilterInterface
final readonly class EvaluationTypeFilter implements FilterInterface
{
public function __construct(private TranslatableStringHelper $translatableStringHelper)
{

View File

@@ -25,7 +25,7 @@ class MaxDateFilter implements FilterInterface
'maxdate is not specified' => false,
];
public function __construct(private TranslatorInterface $translator)
public function __construct(private readonly TranslatorInterface $translator)
{
}

View File

@@ -26,7 +26,7 @@ use function in_array;
class CompositionFilter implements FilterInterface
{
public function __construct(private TranslatableStringHelper $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -24,7 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class AddressRefStatusFilter implements \Chill\MainBundle\Export\FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -26,7 +26,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
class AgeFilter implements ExportElementValidatedInterface, FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -24,7 +24,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
class BirthdateFilter implements ExportElementValidatedInterface, FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -28,7 +28,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class ByHouseholdCompositionFilter implements FilterInterface
{
public function __construct(private HouseholdCompositionTypeRepositoryInterface $householdCompositionTypeRepository, private RollingDateConverterInterface $rollingDateConverter, private TranslatableStringHelperInterface $translatableStringHelper)
public function __construct(private readonly HouseholdCompositionTypeRepositoryInterface $householdCompositionTypeRepository, private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}

View File

@@ -23,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class DeadOrAliveFilter implements FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -24,7 +24,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
class DeathdateFilter implements ExportElementValidatedInterface, FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -26,7 +26,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class GeographicalUnitFilter implements \Chill\MainBundle\Export\FilterInterface
{
public function __construct(private GeographicalUnitRepositoryInterface $geographicalUnitRepository, private GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private TranslatableStringHelperInterface $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -19,7 +19,7 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType;
class MaritalStatusFilter implements FilterInterface
{
public function __construct(private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -26,7 +26,7 @@ class NationalityFilter implements
ExportElementValidatedInterface,
FilterInterface
{
public function __construct(private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -27,7 +27,7 @@ use function in_array;
class ResidentialAddressAtThirdpartyFilter implements FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter, private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -24,7 +24,7 @@ use function in_array;
class ResidentialAddressAtUserFilter implements FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -24,7 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class WithoutHouseholdComposition implements FilterInterface
{
public function __construct(private RollingDateConverterInterface $rollingDateConverter)
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}

View File

@@ -24,7 +24,7 @@ use function in_array;
class JobFilter implements FilterInterface
{
public function __construct(protected TranslatorInterface $translator, private TranslatableStringHelper $translatableStringHelper)
public function __construct(protected TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -24,7 +24,7 @@ use function in_array;
class ScopeFilter implements FilterInterface
{
public function __construct(protected TranslatorInterface $translator, private TranslatableStringHelper $translatableStringHelper)
public function __construct(protected TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -28,7 +28,7 @@ use function in_array;
class SocialWorkTypeFilter implements FilterInterface
{
public function __construct(private SocialActionRender $socialActionRender, private TranslatableStringHelper $translatableStringHelper, private EntityManagerInterface $em)
public function __construct(private readonly SocialActionRender $socialActionRender, private readonly TranslatableStringHelper $translatableStringHelper, private readonly EntityManagerInterface $em)
{
}

View File

@@ -18,7 +18,7 @@ use const SORT_NUMERIC;
class LabelPersonHelper
{
public function __construct(private PersonRepository $personRepository, private PersonRenderInterface $personRender)
public function __construct(private readonly PersonRepository $personRepository, private readonly PersonRenderInterface $personRender)
{
}

View File

@@ -88,7 +88,7 @@ final readonly class ListAccompanyingPeriodHelper
public function getLabels($key, array $values, $data)
{
if (str_starts_with($key, 'acp_address_fields')) {
if (str_starts_with((string) $key, 'acp_address_fields')) {
return $this->addressHelper->getLabel($key, $values, $data, 'acp_address_fields');
}

View File

@@ -42,7 +42,7 @@ use function strlen;
*/
class ListPersonHelper
{
public const FIELDS = [
final public const FIELDS = [
'personId',
'civility',
'firstName',
@@ -74,7 +74,7 @@ class ListPersonHelper
'lifecycleUpdate',
];
public function __construct(private ExportAddressHelper $addressHelper, private CenterRepositoryInterface $centerRepository, private CivilityRepositoryInterface $civilityRepository, private CountryRepository $countryRepository, private LanguageRepositoryInterface $languageRepository, private MaritalStatusRepositoryInterface $maritalStatusRepository, private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator, private UserRepositoryInterface $userRepository)
public function __construct(private readonly ExportAddressHelper $addressHelper, private readonly CenterRepositoryInterface $centerRepository, private readonly CivilityRepositoryInterface $civilityRepository, private readonly CountryRepository $countryRepository, private readonly LanguageRepositoryInterface $languageRepository, private readonly MaritalStatusRepositoryInterface $maritalStatusRepository, private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator, private readonly UserRepositoryInterface $userRepository)
{
}
@@ -208,7 +208,7 @@ class ListPersonHelper
public function getLabels($key, array $values, $data): callable
{
if (str_starts_with($key, 'address_fields')) {
if (str_starts_with((string) $key, 'address_fields')) {
return $this->addressHelper->getLabel($key, $values, $data, 'address_fields');
}