diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php b/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php
index f9db5c158..2b015b123 100644
--- a/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php
+++ b/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php
@@ -172,7 +172,7 @@ final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepos
return $qb->getQuery()->getResult();
}
- public function findUserJobByAssociated(Person|AccompanyingPeriod $associated): array
+ public function findUserJobByAssociated(AccompanyingPeriod|Person $associated): array
{
$in = $this->em->createQueryBuilder();
$in->select('IDENTITY(u.userJob)')
diff --git a/src/Bundle/ChillBudgetBundle/Repository/ChargeRepository.php b/src/Bundle/ChillBudgetBundle/Repository/ChargeRepository.php
index 9b89010dc..475657f68 100644
--- a/src/Bundle/ChillBudgetBundle/Repository/ChargeRepository.php
+++ b/src/Bundle/ChillBudgetBundle/Repository/ChargeRepository.php
@@ -34,7 +34,7 @@ class ChargeRepository extends ServiceEntityRepository
/**
* @return Charge[]
*/
- public function findAllByEntity(Person|Household $entity): array
+ public function findAllByEntity(Household|Person $entity): array
{
$qb = $this->createQueryBuilder('c');
diff --git a/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php b/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php
index 836f13e4b..6ecf13d28 100644
--- a/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php
+++ b/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php
@@ -35,7 +35,7 @@ class ResourceRepository extends ServiceEntityRepository
/**
* @return Resource[]
*/
- public function findAllByEntity(Person|Household $entity): array
+ public function findAllByEntity(Household|Person $entity): array
{
$qb = $this->createQueryBuilder('r');
@@ -47,7 +47,7 @@ class ResourceRepository extends ServiceEntityRepository
return $qb->getQuery()->getResult();
}
- public function findByEntityAndDate(Person|Household $entity, DateTime $date, $sort = null)
+ public function findByEntityAndDate(Household|Person $entity, DateTime $date, $sort = null)
{
$qb = $this->createQueryBuilder('c');
diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php
index a81ef34c3..740666cd6 100644
--- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php
+++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php
@@ -33,7 +33,7 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface
/**
* @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft
*/
- public function isUserAbsent(User $user): bool|null
+ public function isUserAbsent(User $user): null|bool
{
$id = $this->mapCalendarToUser->getUserId($user);
diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php
index a918bb7ea..f67562e27 100644
--- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php
+++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php
@@ -18,5 +18,5 @@ interface MSUserAbsenceReaderInterface
/**
* @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft
*/
- public function isUserAbsent(User $user): bool|null;
+ public function isUserAbsent(User $user): null|bool;
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php
index 27a4f930f..2ee0a9c48 100644
--- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php
+++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php
@@ -366,7 +366,7 @@ class CustomFieldChoice extends AbstractCustomField
* If the value had an 'allow_other' = true option, the returned value
* **is not** the content of the _other field, but the `_other` string.
*/
- private function guessValue(array|string|null $value)
+ private function guessValue(null|array|string $value)
{
if (null === $value) {
return null;
diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php
index 7ede1a08a..41fc535fe 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php
@@ -138,7 +138,7 @@ class CustomFieldsGroup
/**
* Get name.
*/
- public function getName(?string $language = null): string|array
+ public function getName(?string $language = null): array|string
{
//TODO set this in a service, PLUS twig function
if (null !== $language) {
diff --git a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php
index 126178a9e..54dc763ef 100644
--- a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php
+++ b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php
@@ -44,7 +44,7 @@ class ParticipationController extends AbstractController
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/create", name="chill_event_participation_create")
*/
- public function createAction(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
+ public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
// test the request is correct
try {
@@ -162,7 +162,7 @@ class ParticipationController extends AbstractController
/**
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
*/
- public function createMultiple(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
+ public function createMultiple(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$participations = $this->handleRequest($request, new Participation(), true);
@@ -205,7 +205,7 @@ class ParticipationController extends AbstractController
/**
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
*/
- public function createSingle(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
+ public function createSingle(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$participation = $this->handleRequest($request, new Participation(), false);
@@ -249,7 +249,7 @@ class ParticipationController extends AbstractController
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/{participation_id}/delete", name="chill_event_participation_delete", requirements={"participation_id"="\d+"}, methods={"GET", "DELETE"})
*/
- public function deleteAction($participation_id, Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
+ public function deleteAction($participation_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->getDoctrine()->getManager();
$participation = $em->getRepository(\Chill\EventBundle\Entity\Participation::class)->findOneBy([
@@ -330,7 +330,7 @@ class ParticipationController extends AbstractController
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/{event_id}/edit_multiple", name="chill_event_participation_edit_multiple")
*/
- public function editMultipleAction($event_id): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
+ public function editMultipleAction($event_id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$event = $this->getDoctrine()->getRepository(\Chill\EventBundle\Entity\Event::class)
->find($event_id);
@@ -388,7 +388,7 @@ class ParticipationController extends AbstractController
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/new", name="chill_event_participation_new")
*/
- public function newAction(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
+ public function newAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
// test the request is correct
try {
@@ -560,7 +560,7 @@ class ParticipationController extends AbstractController
Request $request,
Participation $participation,
bool $multiple = false
- ): \Chill\EventBundle\Entity\Participation|array {
+ ): array|\Chill\EventBundle\Entity\Participation {
$em = $this->getDoctrine()->getManager();
if ($em->contains($participation)) {
@@ -637,7 +637,7 @@ class ParticipationController extends AbstractController
*
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
*/
- protected function newMultiple(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
+ protected function newMultiple(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$participations = $this->handleRequest($request, new Participation(), true);
$ignoredParticipations = $newParticipations = [];
diff --git a/src/Bundle/ChillEventBundle/Entity/Event.php b/src/Bundle/ChillEventBundle/Entity/Event.php
index 17f7899fc..b2e00c24e 100644
--- a/src/Bundle/ChillEventBundle/Entity/Event.php
+++ b/src/Bundle/ChillEventBundle/Entity/Event.php
@@ -135,7 +135,7 @@ class Event implements HasCenterInterface, HasScopeInterface
return $this->id;
}
- public function getModerator(): User|null
+ public function getModerator(): null|User
{
return $this->moderator;
}
diff --git a/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php b/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php
index 6b6bfa8e0..c68cf6762 100644
--- a/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php
@@ -96,7 +96,7 @@ class LoadPostalCodesCommand extends Command
try {
$this->addPostalCode($row, $output);
++$num;
- } catch (ExistingPostalCodeException|CountryCodeNotFoundException|PostalCodeNotValidException $ex) {
+ } catch (CountryCodeNotFoundException|ExistingPostalCodeException|PostalCodeNotValidException $ex) {
$output->writeln(' on line ' . $line . ' : ' . $ex->getMessage() . '');
}
++$line;
diff --git a/src/Bundle/ChillMainBundle/Controller/PasswordController.php b/src/Bundle/ChillMainBundle/Controller/PasswordController.php
index 1c1d11f84..dc0856cc0 100644
--- a/src/Bundle/ChillMainBundle/Controller/PasswordController.php
+++ b/src/Bundle/ChillMainBundle/Controller/PasswordController.php
@@ -99,7 +99,7 @@ class PasswordController extends AbstractController
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
* @\Symfony\Component\Routing\Annotation\Route(path="/public/{_locale}/password/recover", name="password_recover")
*/
- public function recoverAction(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
+ public function recoverAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
if (false === $this->isGranted(PasswordRecoverVoter::ASK_TOKEN)) {
return new Response($this->translator->trans('You are not allowed '
@@ -168,7 +168,7 @@ class PasswordController extends AbstractController
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
* @\Symfony\Component\Routing\Annotation\Route(path="/public/{_locale}/password/request-recover", name="password_request_recover")
*/
- public function requestRecoverAction(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
+ public function requestRecoverAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
if (false === $this->isGranted(PasswordRecoverVoter::ASK_TOKEN)) {
return new Response($this->translator->trans('You are not allowed '
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php
index a63f04164..6fc763c6d 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php
@@ -29,7 +29,7 @@ class Extract extends FunctionNode
{
private string $field;
- private \Doctrine\ORM\Query\AST\Node|string|null $value = null;
+ private null|\Doctrine\ORM\Query\AST\Node|string $value = null;
//private PathExpression $value;
//private FunctionNode $value;
//private DateDiffFunction $value;
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php
index 95d851790..7d93071b7 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php
@@ -18,7 +18,7 @@ use Doctrine\ORM\Query\SqlWalker;
class JsonExtract extends FunctionNode
{
- private \Doctrine\ORM\Query\AST\Node|string|null $element = null;
+ private null|\Doctrine\ORM\Query\AST\Node|string $element = null;
private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $keyToExtract = null;
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php
index ef150867e..a5e73209d 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php
@@ -23,7 +23,7 @@ class ToChar extends FunctionNode
{
private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $datetime = null;
- private \Doctrine\ORM\Query\AST\Node|string|null $fmt = null;
+ private null|\Doctrine\ORM\Query\AST\Node|string $fmt = null;
public function getSql(SqlWalker $sqlWalker)
{
diff --git a/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php b/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php
index e21ea7f4d..8d9320424 100644
--- a/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php
+++ b/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php
@@ -28,7 +28,7 @@ final readonly class ExportFormHelper
private FormFactoryInterface $formFactory,
) {}
- public function getDefaultData(string $step, ExportInterface|DirectExportInterface $export, array $options = []): array
+ public function getDefaultData(string $step, DirectExportInterface|ExportInterface $export, array $options = []): array
{
return match ($step) {
'centers', 'generate_centers' => ['centers' => $this->authorizationHelper->getReachableCenters($export->requiredRole())],
@@ -45,7 +45,7 @@ final readonly class ExportFormHelper
return $formatter->getFormDefaultData($options['aggregator_aliases']);
}
- private function getDefaultDataStepExport(ExportInterface|DirectExportInterface $export, array $options): array
+ private function getDefaultDataStepExport(DirectExportInterface|ExportInterface $export, array $options): array
{
$data = [
ExportType::EXPORT_KEY => $export->getFormDefaultData(),
diff --git a/src/Bundle/ChillMainBundle/Export/ExportManager.php b/src/Bundle/ChillMainBundle/Export/ExportManager.php
index 612ff4140..dae3f7de3 100644
--- a/src/Bundle/ChillMainBundle/Export/ExportManager.php
+++ b/src/Bundle/ChillMainBundle/Export/ExportManager.php
@@ -101,7 +101,7 @@ class ExportManager
*
* @return FilterInterface[] a \Generator that contains filters. The key is the filter's alias
*/
- public function &getFiltersApplyingOn(ExportInterface|DirectExportInterface $export, ?array $centers = null): iterable
+ public function &getFiltersApplyingOn(DirectExportInterface|ExportInterface $export, ?array $centers = null): iterable
{
if ($export instanceof DirectExportInterface) {
return;
@@ -124,7 +124,7 @@ class ExportManager
*
* @return null|iterable a \Generator that contains aggretagors. The key is the filter's alias
*/
- public function &getAggregatorsApplyingOn(ExportInterface|DirectExportInterface $export, ?array $centers = null): ?iterable
+ public function &getAggregatorsApplyingOn(DirectExportInterface|ExportInterface $export, ?array $centers = null): ?iterable
{
if ($export instanceof ListInterface || $export instanceof DirectExportInterface) {
return;
@@ -307,7 +307,7 @@ class ExportManager
*
* @throws RuntimeException
*/
- public function getExport($alias): ExportInterface|DirectExportInterface
+ public function getExport($alias): DirectExportInterface|ExportInterface
{
if (!array_key_exists($alias, $this->exports)) {
throw new RuntimeException("The export with alias {$alias} is not known.");
@@ -453,7 +453,7 @@ class ExportManager
*
*/
public function isGrantedForElement(
- ExportInterface|DirectExportInterface|ModifierInterface $element,
+ DirectExportInterface|ExportInterface|ModifierInterface $element,
\Chill\MainBundle\Export\DirectExportInterface|\Chill\MainBundle\Export\ExportInterface $export = null,
?array $centers = null
): bool {
diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
index 574d98b90..413492915 100644
--- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
+++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
@@ -66,7 +66,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
*
* @return User[]
*/
- public function findUsersReaching(string $role, array|\Chill\MainBundle\Entity\Center $center, array|\Chill\MainBundle\Entity\Scope|null $scope = null, bool $onlyEnabled = true): array
+ public function findUsersReaching(string $role, array|\Chill\MainBundle\Entity\Center $center, null|array|\Chill\MainBundle\Entity\Scope $scope = null, bool $onlyEnabled = true): array
{
return $this->userACLAwareRepository
->findUsersByReachedACL($role, $center, $scope, $onlyEnabled);
@@ -130,7 +130,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
* @param Center|Center[] $center
* @return Scope[]
*/
- public function getReachableCircles(UserInterface $user, string $role, \Chill\MainBundle\Entity\Center|array $center)
+ public function getReachableCircles(UserInterface $user, string $role, array|\Chill\MainBundle\Entity\Center $center)
{
$scopes = [];
@@ -162,7 +162,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
/**
* Return all reachable scope for a given user, center and role.
*/
- public function getReachableScopes(UserInterface $user, string $role, Center|array $center): array
+ public function getReachableScopes(UserInterface $user, string $role, array|Center $center): array
{
return $this->getReachableCircles($user, $role, $center);
}
@@ -172,7 +172,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
*
* @param Center|Center[] $center May be an array of center
*/
- public function userCanReachCenter(User $user, \Chill\MainBundle\Entity\Center|array $center): bool
+ public function userCanReachCenter(User $user, array|\Chill\MainBundle\Entity\Center $center): bool
{
if ($center instanceof Traversable) {
foreach ($center as $c) {
diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php
index 1dc9668ec..2a8c6587c 100644
--- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php
+++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php
@@ -29,5 +29,5 @@ interface AuthorizationHelperInterface
* @param Center|array $center
* @return list
*/
- public function getReachableScopes(UserInterface $user, string $role, Center|array $center): array;
+ public function getReachableScopes(UserInterface $user, string $role, array|Center $center): array;
}
diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php
index 93dec24da..f2ff14e1c 100644
--- a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php
+++ b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php
@@ -33,11 +33,10 @@ final readonly class ScopeResolverDispatcher
}
/**
- * @param mixed $entity
* @param array|null $options
* @return iterable|Scope|null
*/
- public function resolveScope(mixed $entity, ?array $options = []): iterable|\Chill\MainBundle\Entity\Scope|null
+ public function resolveScope(mixed $entity, ?array $options = []): null|\Chill\MainBundle\Entity\Scope|iterable
{
foreach ($this->resolvers as $resolver) {
if ($resolver->supports($entity, $options)) {
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php
index 58dc7e839..4149e387b 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php
@@ -45,7 +45,7 @@ class DiscriminatedObjectDenormalizer implements ContextAwareDenormalizerInterfa
if ($this->denormalizer->supportsDenormalization($data, $localType, $format)) {
try {
return $this->denormalizer->denormalize($data, $localType, $format, $context);
- } catch (RuntimeException|NotNormalizableValueException $e) {
+ } catch (NotNormalizableValueException|RuntimeException $e) {
$lastException = $e;
}
}
diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php
index 229a69f2c..38d13ea43 100644
--- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php
+++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php
@@ -40,7 +40,7 @@ abstract class AddressPart extends FunctionNode
'country_id',
];
- private \Doctrine\ORM\Query\AST\Node|string|null $date = null;
+ private null|\Doctrine\ORM\Query\AST\Node|string $date = null;
/**
* @var \Doctrine\ORM\Query\AST\Node
diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
index 2224f307b..e074f53ef 100644
--- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
+++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
@@ -977,7 +977,7 @@ class AccompanyingPeriod implements
/**
* @Groups({"read"})
*/
- public function getRequestor(): Person|ThirdParty|null
+ public function getRequestor(): null|Person|ThirdParty
{
return $this->requestorPerson ?? $this->requestorThirdParty;
}
diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php
index c9f1e9279..abe171df1 100644
--- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php
+++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php
@@ -96,7 +96,7 @@ class Resource
/**
* @Groups({"read"})
*/
- public function getResource(): \Chill\PersonBundle\Entity\Person|\Chill\ThirdPartyBundle\Entity\ThirdParty|null
+ public function getResource(): null|\Chill\PersonBundle\Entity\Person|\Chill\ThirdPartyBundle\Entity\ThirdParty
{
return $this->person ?? $this->thirdParty;
}
diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php
index 832afb987..3265f09e1 100644
--- a/src/Bundle/ChillPersonBundle/Entity/Person.php
+++ b/src/Bundle/ChillPersonBundle/Entity/Person.php
@@ -619,7 +619,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* @return true | array True if the accompanying periods are not collapsing,
* an array with data for displaying the error
*/
- public function checkAccompanyingPeriodsAreNotCollapsing(): bool|array
+ public function checkAccompanyingPeriodsAreNotCollapsing(): array|bool
{
$periods = $this->getAccompanyingPeriodsOrdered();
$periodsNbr = count($periods);
diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php
index a5475263e..f98964fcb 100644
--- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php
+++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php
@@ -156,7 +156,7 @@ class SocialAction
*
* @return Collection|SocialAction[] a list with the elements of the given list which are parent of other elements in the given list
*/
- public static function findAncestorSocialActions(\Doctrine\Common\Collections\Collection|array $socialActions): Collection
+ public static function findAncestorSocialActions(array|\Doctrine\Common\Collections\Collection $socialActions): Collection
{
$ancestors = new ArrayCollection();
@@ -236,7 +236,7 @@ class SocialAction
/**
* @param Collection|SocialAction[] $socialActions
*/
- public static function getDescendantsWithThisForActions(\Doctrine\Common\Collections\Collection|array $socialActions): Collection
+ public static function getDescendantsWithThisForActions(array|\Doctrine\Common\Collections\Collection $socialActions): Collection
{
$unique = [];
@@ -420,7 +420,7 @@ class SocialAction
return $this;
}
- public static function filterRemoveDeactivatedActions(ReadableCollection|array $actions, \DateTime $comparisonDate): ReadableCollection|array
+ public static function filterRemoveDeactivatedActions(array|ReadableCollection $actions, \DateTime $comparisonDate): array|ReadableCollection
{
$filterFn = fn (SocialAction $socialAction) => !$socialAction->isDesactivated($comparisonDate);
diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php
index 5c9f1a9c4..000d83397 100644
--- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php
+++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php
@@ -110,7 +110,7 @@ class SocialIssue
*
* @return Collection|SocialIssue[]
*/
- public static function findAncestorSocialIssues(\Doctrine\Common\Collections\Collection|array $socialIssues): Collection
+ public static function findAncestorSocialIssues(array|\Doctrine\Common\Collections\Collection $socialIssues): Collection
{
$ancestors = new ArrayCollection();
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php
index 46489069d..8449eb60c 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php
@@ -41,7 +41,7 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface
public function getLabels($key, array $values, $data): \Closure
{
- return function (int|string|null $jobId) {
+ return function (null|int|string $jobId) {
if (null === $jobId || '' === $jobId) {
return '';
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php
index a5b2f10f0..586df3d8f 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php
@@ -42,7 +42,7 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa
public function getLabels($key, array $values, $data): \Closure
{
- return function (int|string|null $scopeId) {
+ return function (null|int|string $scopeId) {
if (null === $scopeId || '' === $scopeId) {
return '';
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php
index 862a2de79..b36795cdd 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php
@@ -41,7 +41,7 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac
public function getLabels($key, array $values, $data): \Closure
{
- return function (int|string|null $userId) {
+ return function (null|int|string $userId) {
if (null === $userId || '' === $userId) {
return '';
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php
index 99187264a..c6d8cfae0 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php
@@ -46,7 +46,7 @@ final readonly class CenterAggregator implements AggregatorInterface
public function getLabels($key, array $values, $data): Closure
{
- return function (int|string|null $value) {
+ return function (null|int|string $value) {
if (null === $value || '' === $value) {
return '';
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php
index 0fea8d940..398e3c1dd 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php
@@ -28,9 +28,7 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface
{
public function __construct(private readonly EntityManagerInterface $entityManager) {}
- public function buildForm(FormBuilderInterface $builder)
- {
- }
+ public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{
return [];
diff --git a/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php b/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php
index 251044e9e..aa2f06afe 100644
--- a/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php
+++ b/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php
@@ -26,11 +26,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class ClosingMotiveType extends AbstractType
{
- private TranslatorInterface $translator;
-
- public function __construct(TranslatorInterface $translator)
+ public function __construct(private readonly TranslatorInterface $translator)
{
- $this->translator = $translator;
}
public function buildForm(FormBuilderInterface $builder, array $options)
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php
index f6faeed12..86e94f52e 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php
@@ -37,7 +37,7 @@ class AccompanyingPeriodWorkNormalizer implements ContextAwareNormalizerInterfac
*
* @throws ExceptionInterface
*/
- public function normalize($object, ?string $format = null, array $context = []): array|\ArrayObject|bool|float|int|string|null
+ public function normalize($object, ?string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string
{
$initial = $this->normalizer->normalize($object, $format, array_merge(
$context,
diff --git a/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php b/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php
index 050a839e6..83335c02a 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php
@@ -518,7 +518,7 @@ class AccompanyingPeriodACLAwareRepositoryTest extends KernelTestCase
/**
* @param array $scopes
*/
- private function buildPeriod(Person $person, array $scopes, User|null $creator, bool $confirm): AccompanyingPeriod
+ private function buildPeriod(Person $person, array $scopes, null|User $creator, bool $confirm): AccompanyingPeriod
{
$period = new AccompanyingPeriod();
$period->addPerson($person);
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
index 35c4416d4..a08031951 100644
--- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
@@ -349,7 +349,7 @@ Period closed!: Parcours clôturé!
Pediod closing form is not valide: Le formulaire de fermeture n'est pas valide
Consider canceled: Permet de considérer les parcours comme annulés
Canceled parcours help: Si coché, les parcours avec ce motif de cloture seront considérés comme annulés et ne seront pas pris en compte pour les statistiques. La modification se reflétera pour tous les motifs enfants
-( Canceled period ): ( annulé )
+( Canceled period ): (annulé)
#widget
diff --git a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php
index 80c1edd87..3593b612c 100644
--- a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php
+++ b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php
@@ -165,7 +165,7 @@ final class LoadReports extends AbstractFixture implements OrderedFixtureInterfa
*
* @return string|string[]
*/
- private function getRandomChoice(CustomField $field): string|array
+ private function getRandomChoice(CustomField $field): array|string
{
$choices = $field->getOptions()['choices'];
$multiple = $field->getOptions()['multiple'];
diff --git a/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php b/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php
index 203963d80..de8b52c4c 100644
--- a/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php
+++ b/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php
@@ -27,7 +27,7 @@ class AuthorizationEvent extends \Symfony\Contracts\EventDispatcher\Event
protected $vote;
public function __construct(
- private readonly Person|AbstractTask|AccompanyingPeriod|null $subject,
+ private readonly null|AbstractTask|AccompanyingPeriod|Person $subject,
private readonly string $attribute,
private readonly TokenInterface $token
) {}
diff --git a/src/Bundle/ChillWopiBundle/src/Controller/Convert.php b/src/Bundle/ChillWopiBundle/src/Controller/Convert.php
index 665386ffe..c4702c2b2 100644
--- a/src/Bundle/ChillWopiBundle/src/Controller/Convert.php
+++ b/src/Bundle/ChillWopiBundle/src/Controller/Convert.php
@@ -78,7 +78,7 @@ class Convert
return new Response($response->getContent(), Response::HTTP_OK, [
'Content-Type' => 'application/pdf',
]);
- } catch (ClientExceptionInterface|TransportExceptionInterface|RedirectionExceptionInterface|ServerExceptionInterface $exception) {
+ } catch (ClientExceptionInterface|RedirectionExceptionInterface|ServerExceptionInterface|TransportExceptionInterface $exception) {
return $this->onConversionFailed($url, $exception->getResponse());
}
}