mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-03-06 22:19:40 +00:00
Apply new rector rules regarding to PHP version to 8.4
This commit is contained in:
@@ -24,7 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
*/
|
||||
final readonly class ClosingDateAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acp_closing_date_agg';
|
||||
private const string PREFIX = 'acp_closing_date_agg';
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CreatorJobAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acp_agg_creator_job';
|
||||
private const string PREFIX = 'acp_agg_creator_job';
|
||||
|
||||
public function __construct(
|
||||
private readonly UserJobRepository $jobRepository,
|
||||
|
||||
@@ -20,7 +20,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final readonly class DurationAggregator implements AggregatorInterface
|
||||
{
|
||||
private const CHOICES = [
|
||||
private const array CHOICES = [
|
||||
'month',
|
||||
'week',
|
||||
'day',
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acp_agg_user_job_working_on_course';
|
||||
private const string PREFIX = 'acp_agg_user_job_working_on_course';
|
||||
|
||||
public function __construct(
|
||||
private UserJobRepositoryInterface $userJobRepository,
|
||||
|
||||
@@ -24,7 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
*/
|
||||
final readonly class OpeningDateAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acp_opening_date_agg';
|
||||
private const string PREFIX = 'acp_opening_date_agg';
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class PersonParticipatingAggregator implements AggregatorInterface
|
||||
{
|
||||
private const KEY = 'acp_person_part_agg';
|
||||
private const string KEY = 'acp_person_part_agg';
|
||||
|
||||
public function __construct(
|
||||
private LabelPersonHelper $labelPersonHelper,
|
||||
|
||||
@@ -24,9 +24,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ReferrerAggregator implements AggregatorInterface, DataTransformerInterface
|
||||
{
|
||||
private const A = 'acp_ref_agg_uhistory';
|
||||
private const string A = 'acp_ref_agg_uhistory';
|
||||
|
||||
private const P = 'acp_ref_agg_date';
|
||||
private const string P = 'acp_ref_agg_date';
|
||||
|
||||
public function __construct(
|
||||
private UserRepository $userRepository,
|
||||
|
||||
@@ -26,7 +26,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
readonly class ReferrerScopeAggregator implements AggregatorInterface, DataTransformerInterface
|
||||
{
|
||||
private const PREFIX = 'acp_agg_referrer_scope';
|
||||
private const string PREFIX = 'acp_agg_referrer_scope';
|
||||
|
||||
public function __construct(
|
||||
private ScopeRepositoryInterface $scopeRepository,
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acp_agg_user_scope_working_on_course';
|
||||
private const string PREFIX = 'acp_agg_user_scope_working_on_course';
|
||||
|
||||
public function __construct(
|
||||
private ScopeRepositoryInterface $scopeRepository,
|
||||
|
||||
@@ -23,9 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final readonly class StepAggregator implements AggregatorInterface
|
||||
{
|
||||
private const A = 'acpstephistories';
|
||||
private const string A = 'acpstephistories';
|
||||
|
||||
private const P = 'acp_step_agg_date';
|
||||
private const string P = 'acp_step_agg_date';
|
||||
|
||||
public function __construct(private RollingDateConverterInterface $rollingDateConverter, private TranslatorInterface $translator) {}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class UserJobAggregator implements AggregatorInterface, DataTransformerInterface
|
||||
{
|
||||
private const PREFIX = 'acp_agg_user_job';
|
||||
private const string PREFIX = 'acp_agg_user_job';
|
||||
|
||||
public function __construct(
|
||||
private UserJobRepository $jobRepository,
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class UserWorkingOnCourseAggregator implements AggregatorInterface
|
||||
{
|
||||
private const COLUMN_NAME = 'user_working_on_course_user_id';
|
||||
private const string COLUMN_NAME = 'user_working_on_course_user_id';
|
||||
|
||||
public function __construct(
|
||||
private UserRender $userRender,
|
||||
|
||||
@@ -20,7 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ByClosingMotiveAggregator implements AggregatorInterface
|
||||
{
|
||||
private const KEY = 'acpstephistory_by_closing_motive_agg';
|
||||
private const string KEY = 'acpstephistory_by_closing_motive_agg';
|
||||
|
||||
public function __construct(
|
||||
private ClosingMotiveRepositoryInterface $closingMotiveRepository,
|
||||
|
||||
@@ -24,7 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
*/
|
||||
final readonly class ByDateAggregator implements AggregatorInterface
|
||||
{
|
||||
private const KEY = 'acpstephistory_by_date_agg';
|
||||
private const string KEY = 'acpstephistory_by_date_agg';
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
*/
|
||||
final readonly class ByStepAggregator implements AggregatorInterface
|
||||
{
|
||||
private const KEY = 'acpstephistory_step_agg';
|
||||
private const string KEY = 'acpstephistory_step_agg';
|
||||
|
||||
public function __construct(
|
||||
private TranslatorInterface $translator,
|
||||
|
||||
@@ -19,13 +19,13 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final class ByEndDateAggregator implements AggregatorInterface
|
||||
{
|
||||
private const CHOICES = [
|
||||
private const array CHOICES = [
|
||||
'by week' => 'week',
|
||||
'by month' => 'month',
|
||||
'by year' => 'year',
|
||||
];
|
||||
|
||||
private const DEFAULT_CHOICE = 'year';
|
||||
private const string DEFAULT_CHOICE = 'year';
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
||||
@@ -19,13 +19,13 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final class ByMaxDateAggregator implements AggregatorInterface
|
||||
{
|
||||
private const CHOICES = [
|
||||
private const array CHOICES = [
|
||||
'by week' => 'week',
|
||||
'by month' => 'month',
|
||||
'by year' => 'year',
|
||||
];
|
||||
|
||||
private const DEFAULT_CHOICE = 'year';
|
||||
private const string DEFAULT_CHOICE = 'year';
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
||||
@@ -19,13 +19,13 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final class ByStartDateAggregator implements AggregatorInterface
|
||||
{
|
||||
private const CHOICES = [
|
||||
private const array CHOICES = [
|
||||
'by week' => 'week',
|
||||
'by month' => 'month',
|
||||
'by year' => 'year',
|
||||
];
|
||||
|
||||
private const DEFAULT_CHOICE = 'year';
|
||||
private const string DEFAULT_CHOICE = 'year';
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ByHouseholdCompositionAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acp_by_household_compo_agg';
|
||||
private const string PREFIX = 'acp_by_household_compo_agg';
|
||||
|
||||
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly HouseholdCompositionTypeRepositoryInterface $householdCompositionTypeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class CenterAggregator implements AggregatorInterface
|
||||
{
|
||||
private const COLUMN_NAME = 'person_center_aggregator';
|
||||
private const string COLUMN_NAME = 'person_center_aggregator';
|
||||
|
||||
public function __construct(
|
||||
private CenterRepositoryInterface $centerRepository,
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class PostalCodeAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'person_postal_code_agg';
|
||||
private const string PREFIX = 'person_postal_code_agg';
|
||||
|
||||
public function __construct(
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
|
||||
@@ -20,7 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CreatorAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acpw_aggr_creator';
|
||||
private const string PREFIX = 'acpw_aggr_creator';
|
||||
|
||||
public function __construct(
|
||||
private readonly UserRepository $userRepository,
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CreatorJobAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acpw_aggr_creator_job';
|
||||
private const string PREFIX = 'acpw_aggr_creator_job';
|
||||
|
||||
public function __construct(
|
||||
private readonly UserJobRepository $jobRepository,
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CreatorScopeAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acpw_aggr_creator_scope';
|
||||
private const string PREFIX = 'acpw_aggr_creator_scope';
|
||||
|
||||
public function __construct(
|
||||
private readonly ScopeRepository $scopeRepository,
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
*/
|
||||
final readonly class HandlingThirdPartyAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acpw_handling3party_agg';
|
||||
private const string PREFIX = 'acpw_handling3party_agg';
|
||||
|
||||
public function __construct(private LabelThirdPartyHelper $labelThirdPartyHelper) {}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class JobAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acp_work_action_agg_user_job';
|
||||
private const string PREFIX = 'acp_work_action_agg_user_job';
|
||||
|
||||
public function __construct(
|
||||
private UserJobRepository $jobRepository,
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ReferrerAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acpw_referrer_aggregator';
|
||||
private const string PREFIX = 'acpw_referrer_aggregator';
|
||||
|
||||
public function __construct(
|
||||
private UserRepository $userRepository,
|
||||
@@ -71,7 +71,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface
|
||||
public function normalizeFormData(array $formData): array
|
||||
{
|
||||
if (!array_key_exists('referrer_at', $formData)) {
|
||||
return ['referrer_at' => (new RollingDate(RollingDate::T_TODAY))->normalize()];
|
||||
return ['referrer_at' => new RollingDate(RollingDate::T_TODAY)->normalize()];
|
||||
}
|
||||
|
||||
return ['referrer_at' => $formData['referrer_at']->normalize()];
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ScopeAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acp_work_action_agg_user_scope';
|
||||
private const string PREFIX = 'acp_work_action_agg_user_scope';
|
||||
|
||||
public function __construct(
|
||||
private ScopeRepository $scopeRepository,
|
||||
|
||||
@@ -24,9 +24,7 @@ abstract class Declarations
|
||||
|
||||
final public const HOUSEHOLD_TYPE = 'household';
|
||||
|
||||
/**
|
||||
* @deprecated consider using the PERSON_TYPE instead
|
||||
*/
|
||||
#[\Deprecated(message: 'consider using the PERSON_TYPE instead')]
|
||||
final public const PERSON_IMPLIED_IN = 'person_implied_in';
|
||||
|
||||
final public const PERSON_TYPE = 'person';
|
||||
|
||||
@@ -29,7 +29,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CountHouseholdInPeriod implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
private const TR_PREFIX = 'export.export.nb_household_with_course.';
|
||||
private const string TR_PREFIX = 'export.export.nb_household_with_course.';
|
||||
private readonly bool $filterStatsByCenters;
|
||||
|
||||
public function __construct(
|
||||
|
||||
@@ -49,7 +49,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod implements ListInterface, GroupedExportInterface
|
||||
{
|
||||
private const FIELDS = [
|
||||
private const array FIELDS = [
|
||||
'id',
|
||||
'socialActionId',
|
||||
'socialAction',
|
||||
|
||||
@@ -49,7 +49,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ListAccompanyingPeriodWorkAssociatePersonOnWork implements ListInterface, GroupedExportInterface
|
||||
{
|
||||
private const FIELDS = [
|
||||
private const array FIELDS = [
|
||||
'id',
|
||||
'socialActionId',
|
||||
'socialAction',
|
||||
|
||||
@@ -42,7 +42,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ListEvaluation implements ListInterface, GroupedExportInterface
|
||||
{
|
||||
private const FIELDS = [
|
||||
private const array FIELDS = [
|
||||
'id',
|
||||
'startDate',
|
||||
'endDate',
|
||||
|
||||
@@ -35,7 +35,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ListHouseholdInPeriod implements ListInterface, GroupedExportInterface
|
||||
{
|
||||
private const FIELDS = [
|
||||
private const array FIELDS = [
|
||||
'id',
|
||||
'membersCount',
|
||||
'membersId',
|
||||
|
||||
@@ -33,7 +33,7 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
private const PRECISION_DEFAULT_VALUE = 0.7;
|
||||
private const float PRECISION_DEFAULT_VALUE = 0.7;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
||||
@@ -22,12 +22,12 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class ConfidentialFilter implements FilterInterface
|
||||
{
|
||||
private const CHOICES = [
|
||||
private const array CHOICES = [
|
||||
'is not confidential' => 'false',
|
||||
'is confidential' => 'true',
|
||||
];
|
||||
|
||||
private const DEFAULT_CHOICE = 'false';
|
||||
private const string DEFAULT_CHOICE = 'false';
|
||||
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ use Symfony\Component\Translation\TranslatableMessage;
|
||||
final readonly class CreatorJobFilter implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const PREFIX = 'acp_filter_creator_job';
|
||||
private const string PREFIX = 'acp_filter_creator_job';
|
||||
|
||||
public function __construct(
|
||||
private TranslatableStringHelper $translatableStringHelper,
|
||||
|
||||
@@ -22,12 +22,12 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class EmergencyFilter implements FilterInterface
|
||||
{
|
||||
private const CHOICES = [
|
||||
private const array CHOICES = [
|
||||
'is emergency' => 'true',
|
||||
'is not emergency' => 'false',
|
||||
];
|
||||
|
||||
private const DEFAULT_CHOICE = 'false';
|
||||
private const string DEFAULT_CHOICE = 'false';
|
||||
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ class GeographicalUnitStatFilter implements FilterInterface
|
||||
{
|
||||
$units = array_filter(
|
||||
array_map(
|
||||
fn (int $id) => $this->geographicalUnitRepository->findSimpleGeographicalUnit($id),
|
||||
$this->geographicalUnitRepository->findSimpleGeographicalUnit(...),
|
||||
$formData['units'],
|
||||
),
|
||||
static fn (?SimpleGeographicalUnitDTO $unitDTO) => null !== $unitDTO,
|
||||
|
||||
@@ -25,7 +25,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
final readonly class HandlingThirdPartyFilter implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const PREFIX = 'acpw_handling_3party_filter';
|
||||
private const string PREFIX = 'acpw_handling_3party_filter';
|
||||
|
||||
public function __construct(
|
||||
private ThirdPartyRender $thirdPartyRender,
|
||||
|
||||
@@ -22,12 +22,12 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class IntensityFilter implements FilterInterface
|
||||
{
|
||||
private const CHOICES = [
|
||||
private const array CHOICES = [
|
||||
'is occasional' => 'occasional',
|
||||
'is regular' => 'regular',
|
||||
];
|
||||
|
||||
private const DEFAULT_CHOICE = 'occasional';
|
||||
private const string DEFAULT_CHOICE = 'occasional';
|
||||
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
readonly class JobWorkingOnCourseFilter implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const PREFIX = 'acp_filter_user_job_working_on_course';
|
||||
private const string PREFIX = 'acp_filter_user_job_working_on_course';
|
||||
|
||||
public function __construct(
|
||||
private UserJobRepositoryInterface $userJobRepository,
|
||||
|
||||
@@ -27,11 +27,11 @@ final readonly class ReferrerFilter implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
|
||||
private const A = 'acp_referrer_filter_uhistory_x';
|
||||
private const string A = 'acp_referrer_filter_uhistory_x';
|
||||
|
||||
private const P = 'acp_referrer_filter_date';
|
||||
private const string P = 'acp_referrer_filter_date';
|
||||
|
||||
private const PU = 'acp_referrer_filter_users';
|
||||
private const string PU = 'acp_referrer_filter_users';
|
||||
|
||||
public function __construct(private RollingDateConverterInterface $rollingDateConverter, private UserRepositoryInterface $userRepository, private UserRender $userRender) {}
|
||||
|
||||
|
||||
@@ -35,12 +35,12 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
final readonly class ReferrerFilterBetweenDates implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const A = 'acp_referrer_filter_uhistory';
|
||||
private const string A = 'acp_referrer_filter_uhistory';
|
||||
|
||||
private const P = 'acp_referrer_filter_date_start';
|
||||
private const Q = 'acp_referrer_filter_date_end';
|
||||
private const string P = 'acp_referrer_filter_date_start';
|
||||
private const string Q = 'acp_referrer_filter_date_end';
|
||||
|
||||
private const PU = 'acp_referrer_filter_users';
|
||||
private const string PU = 'acp_referrer_filter_users';
|
||||
|
||||
public function __construct(
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
|
||||
@@ -23,9 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final readonly class RequestorFilter implements FilterInterface
|
||||
{
|
||||
private const DEFAULT_CHOICE = 'participation';
|
||||
private const string DEFAULT_CHOICE = 'participation';
|
||||
|
||||
private const REQUESTOR_CHOICES = [
|
||||
private const array REQUESTOR_CHOICES = [
|
||||
'is person concerned' => 'participation',
|
||||
'is other person' => 'other_person',
|
||||
'is thirdparty' => 'thirdparty',
|
||||
|
||||
@@ -35,7 +35,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
readonly class ScopeWorkingOnCourseFilter implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const PREFIX = 'acp_filter_user_scope_working_on_course';
|
||||
private const string PREFIX = 'acp_filter_user_scope_working_on_course';
|
||||
|
||||
public function __construct(
|
||||
private ScopeRepositoryInterface $scopeRepository,
|
||||
|
||||
@@ -30,7 +30,7 @@ final readonly class SocialActionFilter implements FilterInterface
|
||||
{
|
||||
use ExportDataNormalizerTrait;
|
||||
|
||||
private const PREFIX = 'acp_by_social_action_filter';
|
||||
private const string PREFIX = 'acp_by_social_action_filter';
|
||||
|
||||
public function __construct(
|
||||
private SocialActionRender $actionRender,
|
||||
|
||||
@@ -26,13 +26,13 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class StepFilterBetweenDates implements FilterInterface
|
||||
{
|
||||
private const DEFAULT_CHOICE = [
|
||||
private const array DEFAULT_CHOICE = [
|
||||
AccompanyingPeriod::STEP_CONFIRMED,
|
||||
AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_SHORT,
|
||||
AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_LONG,
|
||||
];
|
||||
|
||||
private const STEPS = [
|
||||
private const array STEPS = [
|
||||
'course.draft' => AccompanyingPeriod::STEP_DRAFT,
|
||||
'course.confirmed' => AccompanyingPeriod::STEP_CONFIRMED,
|
||||
'course.closed' => AccompanyingPeriod::STEP_CLOSED,
|
||||
|
||||
@@ -29,17 +29,17 @@ class StepFilterOnDate implements FilterInterface
|
||||
{
|
||||
use ExportDataNormalizerTrait;
|
||||
|
||||
private const A = 'acp_filter_bystep_stephistories';
|
||||
private const string A = 'acp_filter_bystep_stephistories';
|
||||
|
||||
private const DEFAULT_CHOICE = [
|
||||
private const array DEFAULT_CHOICE = [
|
||||
AccompanyingPeriod::STEP_CONFIRMED,
|
||||
AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_SHORT,
|
||||
AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_LONG,
|
||||
];
|
||||
|
||||
private const P = 'acp_step_filter_date';
|
||||
private const string P = 'acp_step_filter_date';
|
||||
|
||||
private const STEPS = [
|
||||
private const array STEPS = [
|
||||
'course.draft' => AccompanyingPeriod::STEP_DRAFT,
|
||||
'course.confirmed' => AccompanyingPeriod::STEP_CONFIRMED,
|
||||
'course.closed' => AccompanyingPeriod::STEP_CLOSED,
|
||||
|
||||
@@ -33,7 +33,7 @@ final readonly class UserJobFilter implements FilterInterface, DataTransformerIn
|
||||
{
|
||||
use ExportDataNormalizerTrait;
|
||||
|
||||
private const PREFIX = 'acp_filter_user_job';
|
||||
private const string PREFIX = 'acp_filter_user_job';
|
||||
|
||||
public function __construct(
|
||||
private TranslatableStringHelper $translatableStringHelper,
|
||||
|
||||
@@ -31,7 +31,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
final readonly class UserScopeFilter implements FilterInterface, DataTransformerInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const PREFIX = 'acp_filter_main_scope';
|
||||
private const string PREFIX = 'acp_filter_main_scope';
|
||||
|
||||
public function __construct(
|
||||
private ScopeRepositoryInterface $scopeRepository,
|
||||
|
||||
@@ -21,7 +21,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class MaxDateFilter implements FilterInterface
|
||||
{
|
||||
private const MAXDATE_CHOICES = [
|
||||
private const array MAXDATE_CHOICES = [
|
||||
'maxdate is specified' => true,
|
||||
'maxdate is not specified' => false,
|
||||
];
|
||||
|
||||
@@ -111,7 +111,7 @@ final readonly class GeographicalUnitFilter implements \Chill\MainBundle\Export\
|
||||
{
|
||||
$units = array_filter(
|
||||
array_map(
|
||||
fn (int $id) => $this->geographicalUnitRepository->findSimpleGeographicalUnit($id),
|
||||
$this->geographicalUnitRepository->findSimpleGeographicalUnit(...),
|
||||
$formData['units'],
|
||||
),
|
||||
static fn (?SimpleGeographicalUnitDTO $unitDTO) => null !== $unitDTO,
|
||||
|
||||
@@ -24,7 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
final readonly class CreatorFilter implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const PREFIX = 'acpw_filter_creator';
|
||||
private const string PREFIX = 'acpw_filter_creator';
|
||||
|
||||
public function __construct(private UserRepositoryInterface $userRepository) {}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
final readonly class CreatorJobFilter implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const PREFIX = 'acpw_filter_creator_job';
|
||||
private const string PREFIX = 'acpw_filter_creator_job';
|
||||
|
||||
public function __construct(
|
||||
private UserJobRepository $userJobRepository,
|
||||
|
||||
@@ -26,7 +26,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
class CreatorScopeFilter implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const PREFIX = 'acpw_filter_creator_scope';
|
||||
private const string PREFIX = 'acpw_filter_creator_scope';
|
||||
|
||||
public function __construct(
|
||||
private readonly ScopeRepository $scopeRepository,
|
||||
|
||||
@@ -26,7 +26,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
final readonly class JobFilter implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const PREFIX = 'acp_work_action_filter_user_job';
|
||||
private const string PREFIX = 'acp_work_action_filter_user_job';
|
||||
|
||||
public function __construct(
|
||||
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||
|
||||
@@ -25,7 +25,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
final readonly class ReferrerFilter implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const PREFIX = 'acpw_referrer_filter';
|
||||
private const string PREFIX = 'acpw_referrer_filter';
|
||||
|
||||
public function __construct(private RollingDateConverterInterface $rollingDateConverter, private UserRepositoryInterface $userRepository) {}
|
||||
|
||||
@@ -79,7 +79,7 @@ final readonly class ReferrerFilter implements FilterInterface
|
||||
{
|
||||
return [
|
||||
'accepted_agents' => $this->normalizeUserOrMe($formData['accepted_agents']),
|
||||
'agent_at' => array_key_exists('agent_at', $formData) ? $formData['agent_at']?->normalize() : (new RollingDate(RollingDate::T_TODAY))->normalize(),
|
||||
'agent_at' => array_key_exists('agent_at', $formData) ? $formData['agent_at']?->normalize() : new RollingDate(RollingDate::T_TODAY)->normalize(),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
final readonly class ScopeFilter implements FilterInterface
|
||||
{
|
||||
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
|
||||
private const PREFIX = 'acp_work_action_filter_user_scope';
|
||||
private const string PREFIX = 'acp_work_action_filter_user_scope';
|
||||
|
||||
public function __construct(
|
||||
private TranslatableStringHelper $translatableStringHelper,
|
||||
|
||||
@@ -35,7 +35,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final readonly class ListAccompanyingPeriodHelper
|
||||
{
|
||||
public const FIELDS = [
|
||||
public const array FIELDS = [
|
||||
'acpId',
|
||||
'step',
|
||||
'stepSince',
|
||||
@@ -167,7 +167,7 @@ final readonly class ListAccompanyingPeriodHelper
|
||||
return implode(
|
||||
'|',
|
||||
array_map(
|
||||
fn ($s) => $this->translatableStringHelper->localize($s),
|
||||
$this->translatableStringHelper->localize(...),
|
||||
json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -38,7 +38,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
*/
|
||||
final readonly class ListPersonHelper
|
||||
{
|
||||
private const FIELDS = [
|
||||
private const array FIELDS = [
|
||||
'personId',
|
||||
'civility',
|
||||
'firstName',
|
||||
@@ -221,9 +221,8 @@ final readonly class ListPersonHelper
|
||||
|
||||
/**
|
||||
* @return array|string[]
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
#[\Deprecated]
|
||||
public function getAllPossibleFields(): array
|
||||
{
|
||||
return $this->getAllKeys();
|
||||
|
||||
Reference in New Issue
Block a user