mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
apply rector rules: php up to php82
This commit is contained in:
@@ -24,7 +24,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class PersonAddressMoveEventSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
public function __construct(private EngineInterface $engine, private NotificationPersisterInterface $notificationPersister, private Security $security, private TranslatorInterface $translator)
|
||||
public function __construct(private readonly EngineInterface $engine, private readonly NotificationPersisterInterface $notificationPersister, private readonly Security $security, private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class UserRefEventSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
public function __construct(private Security $security, private TranslatorInterface $translator, private EngineInterface $engine, private NotificationPersisterInterface $notificationPersister)
|
||||
public function __construct(private readonly Security $security, private readonly TranslatorInterface $translator, private readonly EngineInterface $engine, private readonly NotificationPersisterInterface $notificationPersister)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,8 +21,8 @@ class AccompanyingPeriodStepChangeMessageHandler implements MessageHandlerInterf
|
||||
private const LOG_PREFIX = '[accompanying period step change message handler] ';
|
||||
|
||||
public function __construct(
|
||||
private AccompanyingPeriodRepository $accompanyingPeriodRepository,
|
||||
private AccompanyingPeriodStepChanger $changer,
|
||||
private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository,
|
||||
private readonly AccompanyingPeriodStepChanger $changer,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ class AccompanyingPeriodStepChangeRequestMessage
|
||||
|
||||
public function __construct(
|
||||
AccompanyingPeriod|int $period,
|
||||
private string $transition,
|
||||
private readonly string $transition,
|
||||
) {
|
||||
if (is_int($period)) {
|
||||
$this->periodId = $period;
|
||||
|
@@ -23,16 +23,16 @@ use Symfony\Component\Messenger\MessageBusInterface;
|
||||
*/
|
||||
class AccompanyingPeriodStepChangeRequestor
|
||||
{
|
||||
private \DateInterval $intervalForShortInactive;
|
||||
private readonly \DateInterval $intervalForShortInactive;
|
||||
|
||||
private \DateInterval $intervalForLongInactive;
|
||||
private readonly \DateInterval $intervalForLongInactive;
|
||||
|
||||
private bool $isMarkInactive;
|
||||
private readonly bool $isMarkInactive;
|
||||
|
||||
public function __construct(
|
||||
private AccompanyingPeriodInfoRepositoryInterface $accompanyingPeriodInfoRepository,
|
||||
private LoggerInterface $logger,
|
||||
private MessageBusInterface $messageBus,
|
||||
private readonly AccompanyingPeriodInfoRepositoryInterface $accompanyingPeriodInfoRepository,
|
||||
private readonly LoggerInterface $logger,
|
||||
private readonly MessageBusInterface $messageBus,
|
||||
ParameterBagInterface $parameterBag,
|
||||
) {
|
||||
$config = $parameterBag->get('chill_person')['accompanying_period_lifecycle_delays'];
|
||||
|
@@ -27,9 +27,9 @@ class AccompanyingPeriodStepChanger
|
||||
private const LOG_PREFIX = '[AccompanyingPeriodStepChanger] ';
|
||||
|
||||
public function __construct(
|
||||
private EntityManagerInterface $entityManager,
|
||||
private LoggerInterface $logger,
|
||||
private Registry $workflowRegistry,
|
||||
private readonly EntityManagerInterface $entityManager,
|
||||
private readonly LoggerInterface $logger,
|
||||
private readonly Registry $workflowRegistry,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -18,9 +18,9 @@ use Symfony\Component\EventDispatcher\Event;
|
||||
*/
|
||||
class ActionEvent extends Event
|
||||
{
|
||||
public const DELETE = 'CHILL_PERSON.DELETE_ASSOCIATED_ENTITY';
|
||||
final public const DELETE = 'CHILL_PERSON.DELETE_ASSOCIATED_ENTITY';
|
||||
|
||||
public const MOVE = 'CHILL_PERSON.MOVE_ASSOCIATED_ENTITY';
|
||||
final public const MOVE = 'CHILL_PERSON.MOVE_ASSOCIATED_ENTITY';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
|
@@ -22,7 +22,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class OneToOneEntityPersonCRUDController extends CRUDController
|
||||
{
|
||||
protected function generateRedirectOnCreateRoute($action, Request $request, $entity)
|
||||
protected function generateRedirectOnCreateRoute($action, Request $request, $entity): never
|
||||
{
|
||||
throw new BadMethodCallException('Not implemented yet.');
|
||||
}
|
||||
|
@@ -26,9 +26,9 @@ use function ctype_digit;
|
||||
final class ChillPersonMoveCommand extends Command
|
||||
{
|
||||
public function __construct(
|
||||
private PersonMove $mover,
|
||||
private EntityManagerInterface $em,
|
||||
private LoggerInterface $chillLogger
|
||||
private readonly PersonMove $mover,
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly LoggerInterface $chillLogger
|
||||
) {
|
||||
parent::__construct('chill:person:move');
|
||||
}
|
||||
@@ -116,7 +116,7 @@ final class ChillPersonMoveCommand extends Command
|
||||
}
|
||||
$id = $input->getOption($name);
|
||||
|
||||
if (ctype_digit($id) === false) {
|
||||
if (ctype_digit((string) $id) === false) {
|
||||
throw new RuntimeException("The id in \"{$name}\" field does not contains "
|
||||
. "only digits: {$id}");
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class RemoveOldDraftAccompanyingPeriodCommand extends Command
|
||||
{
|
||||
public function __construct(private LoggerInterface $logger, private OldDraftAccompanyingPeriodRemoverInterface $remover)
|
||||
public function __construct(private readonly LoggerInterface $logger, private readonly OldDraftAccompanyingPeriodRemoverInterface $remover)
|
||||
{
|
||||
parent::__construct('chill:person:remove-old-draft-period');
|
||||
}
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class AccompanyingCourseWorkEvaluationDocumentController extends AbstractController
|
||||
{
|
||||
public function __construct(private Security $security)
|
||||
public function __construct(private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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'];
|
||||
|
@@ -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
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -86,7 +86,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();
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ use Doctrine\Persistence\ObjectManager;
|
||||
*/
|
||||
class LoadAccompanyingPeriodOrigin extends AbstractFixture implements OrderedFixtureInterface
|
||||
{
|
||||
public const ACCOMPANYING_PERIOD_ORIGIN = 'accompanying_period_origin';
|
||||
final public const ACCOMPANYING_PERIOD_ORIGIN = 'accompanying_period_origin';
|
||||
|
||||
public static $references = [];
|
||||
|
||||
|
@@ -31,7 +31,7 @@ class LoadAccompanyingPeriodWork extends \Doctrine\Bundle\FixturesBundle\Fixture
|
||||
*/
|
||||
private array $cacheEvaluations = [];
|
||||
|
||||
public function __construct(private AccompanyingPeriodRepository $periodRepository, private EvaluationRepository $evaluationRepository)
|
||||
public function __construct(private readonly AccompanyingPeriodRepository $periodRepository, private readonly EvaluationRepository $evaluationRepository)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -49,7 +49,7 @@ class LoadCustomFields extends AbstractFixture implements
|
||||
/**
|
||||
* LoadCustomFields constructor.
|
||||
*/
|
||||
public function __construct(private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator)
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -37,11 +37,11 @@ class LoadHousehold extends Fixture implements DependentFixtureInterface
|
||||
{
|
||||
private const NUMBER_OF_HOUSEHOLD = 10;
|
||||
|
||||
private NativeLoader $loader;
|
||||
private readonly NativeLoader $loader;
|
||||
|
||||
private array $personIds;
|
||||
|
||||
public function __construct(private MembersEditorFactory $editorFactory, private EntityManagerInterface $em)
|
||||
public function __construct(private readonly MembersEditorFactory $editorFactory, private readonly EntityManagerInterface $em)
|
||||
{
|
||||
$this->loader = new NativeLoader();
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ use Doctrine\Persistence\ObjectManager;
|
||||
|
||||
class LoadHouseholdCompositionType extends AbstractFixture implements FixtureGroupInterface
|
||||
{
|
||||
public const TYPES = [
|
||||
final public const TYPES = [
|
||||
['fr' => 'Couple avec enfant(s)'],
|
||||
['fr' => 'Couple sans enfant'],
|
||||
['fr' => 'Mère seule'],
|
||||
|
@@ -17,13 +17,13 @@ use Doctrine\Persistence\ObjectManager;
|
||||
|
||||
class LoadHouseholdPosition extends Fixture
|
||||
{
|
||||
public const ADULT = 'position_adulte';
|
||||
final public const ADULT = 'position_adulte';
|
||||
|
||||
public const CHILD = 'position_enfant';
|
||||
final public const CHILD = 'position_enfant';
|
||||
|
||||
public const CHILD_OUT = 'position_enfant_hors';
|
||||
final public const CHILD_OUT = 'position_enfant_hors';
|
||||
|
||||
public const POSITIONS_DATA = [
|
||||
final public const POSITIONS_DATA = [
|
||||
['Adulte', true, true, 1.0, self::ADULT],
|
||||
['Enfant', true, false, 2.0, self::CHILD],
|
||||
['Enfant hors ménage', false, false, 3.0, self::CHILD_OUT],
|
||||
|
@@ -54,7 +54,7 @@ class LoadPeople extends AbstractFixture implements ContainerAwareInterface, Ord
|
||||
{
|
||||
use \Symfony\Component\DependencyInjection\ContainerAwareTrait;
|
||||
|
||||
public const PERSON = 'person';
|
||||
final public const PERSON = 'person';
|
||||
|
||||
/**
|
||||
* @var array|Center[]
|
||||
|
@@ -18,9 +18,9 @@ use Doctrine\Persistence\ObjectManager;
|
||||
|
||||
class LoadRelations extends Fixture implements FixtureGroupInterface
|
||||
{
|
||||
public const RELATION_KEY = 'relations';
|
||||
final public const RELATION_KEY = 'relations';
|
||||
|
||||
public const RELATIONS = [
|
||||
final public const RELATIONS = [
|
||||
['title' => ['fr' => 'Parent'], 'reverseTitle' => ['fr' => 'Enfant']],
|
||||
['title' => ['fr' => 'En couple'], 'reverseTitle' => ['fr' => 'En couple']],
|
||||
['title' => ['fr' => 'Beau parent'], 'reverseTitle' => ['fr' => 'Belle-fille·beau-fils']],
|
||||
|
@@ -28,7 +28,7 @@ class LoadRelationships extends Fixture implements DependentFixtureInterface
|
||||
{
|
||||
use PersonRandomHelper;
|
||||
|
||||
public function __construct(private EntityManagerInterface $em)
|
||||
public function __construct(private readonly EntityManagerInterface $em)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ use Throwable;
|
||||
|
||||
class LoadSocialWorkMetadata extends Fixture implements OrderedFixtureInterface
|
||||
{
|
||||
public function __construct(private SocialWorkMetadata $importer)
|
||||
public function __construct(private readonly SocialWorkMetadata $importer)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -79,21 +79,21 @@ class AccompanyingPeriod implements
|
||||
TrackCreationInterface,
|
||||
TrackUpdateInterface
|
||||
{
|
||||
public const INTENSITIES = [self::INTENSITY_OCCASIONAL, self::INTENSITY_REGULAR];
|
||||
final public const INTENSITIES = [self::INTENSITY_OCCASIONAL, self::INTENSITY_REGULAR];
|
||||
|
||||
/**
|
||||
* Mark an accompanying period as "occasional".
|
||||
*
|
||||
* used in INTENSITY
|
||||
*/
|
||||
public const INTENSITY_OCCASIONAL = 'occasional';
|
||||
final public const INTENSITY_OCCASIONAL = 'occasional';
|
||||
|
||||
/**
|
||||
* Mark an accompanying period as "regular".
|
||||
*
|
||||
* used in INTENSITY
|
||||
*/
|
||||
public const INTENSITY_REGULAR = 'regular';
|
||||
final public const INTENSITY_REGULAR = 'regular';
|
||||
|
||||
/**
|
||||
* Mark an accompanying period as "closed".
|
||||
@@ -101,7 +101,7 @@ class AccompanyingPeriod implements
|
||||
* This means that the accompanying period **is**
|
||||
* closed by the creator
|
||||
*/
|
||||
public const STEP_CLOSED = 'CLOSED';
|
||||
final public const STEP_CLOSED = 'CLOSED';
|
||||
|
||||
/**
|
||||
* Mark an accompanying period as "confirmed".
|
||||
@@ -109,7 +109,7 @@ class AccompanyingPeriod implements
|
||||
* This means that the accompanying period **is**
|
||||
* confirmed by the creator
|
||||
*/
|
||||
public const STEP_CONFIRMED = 'CONFIRMED';
|
||||
final public const STEP_CONFIRMED = 'CONFIRMED';
|
||||
|
||||
/**
|
||||
* Mark an accompanying period as confirmed, but inactive
|
||||
@@ -118,7 +118,7 @@ class AccompanyingPeriod implements
|
||||
* confirmed, but no activity (Activity, AccompanyingPeriod, ...)
|
||||
* has been associated, or updated, within this accompanying period.
|
||||
*/
|
||||
public const STEP_CONFIRMED_INACTIVE_SHORT = 'CONFIRMED_INACTIVE_SHORT';
|
||||
final public const STEP_CONFIRMED_INACTIVE_SHORT = 'CONFIRMED_INACTIVE_SHORT';
|
||||
|
||||
/**
|
||||
* Mark an accompanying period as confirmed, but inactive
|
||||
@@ -127,7 +127,7 @@ class AccompanyingPeriod implements
|
||||
* confirmed, but no activity (Activity, AccompanyingPeriod, ...)
|
||||
* has been associated, or updated, within this accompanying period.
|
||||
*/
|
||||
public const STEP_CONFIRMED_INACTIVE_LONG = 'CONFIRMED_INACTIVE_LONG';
|
||||
final public const STEP_CONFIRMED_INACTIVE_LONG = 'CONFIRMED_INACTIVE_LONG';
|
||||
|
||||
/**
|
||||
* Mark an accompanying period as "draft".
|
||||
@@ -135,7 +135,7 @@ class AccompanyingPeriod implements
|
||||
* This means that the accompanying period is not yet
|
||||
* confirmed by the creator
|
||||
*/
|
||||
public const STEP_DRAFT = 'DRAFT';
|
||||
final public const STEP_DRAFT = 'DRAFT';
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(
|
||||
|
@@ -38,23 +38,19 @@ class UserHistory implements TrackCreationInterface
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=false)
|
||||
*/
|
||||
private DateTimeImmutable $startDate;
|
||||
|
||||
public function __construct(/**
|
||||
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="userHistories")
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
private ?\Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingPeriod, /**
|
||||
* @ORM\ManyToOne(targetEntity=User::class)
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
public function __construct(
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="userHistories")
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
private ?\Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingPeriod,
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=User::class)
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
private User $user,
|
||||
?DateTimeImmutable $startDate = null
|
||||
private DateTimeImmutable $startDate = new DateTimeImmutable('now')
|
||||
) {
|
||||
$this->startDate = $startDate ?? new DateTimeImmutable('now');
|
||||
}
|
||||
|
||||
public function getAccompanyingPeriod(): AccompanyingPeriod
|
||||
|
@@ -78,18 +78,18 @@ use function in_array;
|
||||
*/
|
||||
class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateInterface, \Stringable
|
||||
{
|
||||
public const BOTH_GENDER = 'both';
|
||||
final public const BOTH_GENDER = 'both';
|
||||
|
||||
// have days in commun
|
||||
public const ERROR_ADDIND_PERIOD_AFTER_AN_OPEN_PERIOD = 2; // where there exist
|
||||
final public const ERROR_ADDIND_PERIOD_AFTER_AN_OPEN_PERIOD = 2; // where there exist
|
||||
|
||||
public const ERROR_PERIODS_ARE_COLLAPSING = 1; // when two different periods
|
||||
final public const ERROR_PERIODS_ARE_COLLAPSING = 1; // when two different periods
|
||||
|
||||
public const FEMALE_GENDER = 'woman';
|
||||
final public const FEMALE_GENDER = 'woman';
|
||||
|
||||
public const MALE_GENDER = 'man';
|
||||
final public const MALE_GENDER = 'man';
|
||||
|
||||
public const NO_INFORMATION = 'unknown';
|
||||
final public const NO_INFORMATION = 'unknown';
|
||||
|
||||
/**
|
||||
* Accept receiving email.
|
||||
|
@@ -21,7 +21,7 @@ use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
class PersonAddressMoveEvent extends Event
|
||||
{
|
||||
public const PERSON_MOVE_POST = 'chill_person.person_move_post';
|
||||
final public const PERSON_MOVE_POST = 'chill_person.person_move_post';
|
||||
|
||||
private ?Address $nextAddress = null;
|
||||
|
||||
@@ -31,7 +31,7 @@ class PersonAddressMoveEvent extends Event
|
||||
|
||||
private ?HouseholdMember $previousMembership = null;
|
||||
|
||||
public function __construct(private Person $person)
|
||||
public function __construct(private readonly Person $person)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class AccompanyingPeriodWorkEventListener
|
||||
{
|
||||
public function __construct(private Security $security)
|
||||
public function __construct(private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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',
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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';
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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';
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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';
|
||||
}
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user