From 27ce322690e45ccf7f6ea9705d5b1f21b3f84c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 22 Jan 2024 12:14:39 +0100 Subject: [PATCH] upgrade php-cs-fixer to 3.47.0 --- .../src/Entity/AsideActivity.php | 8 ++++---- .../ChillCustomFieldsBundle/Entity/CustomField.php | 2 +- .../Entity/CustomFieldLongChoice/Option.php | 2 +- .../Entity/CustomFieldsDefaultGroup.php | 2 +- .../Tests/Service/CustomFieldsHelperTest.php | 2 +- src/Bundle/ChillDocStoreBundle/Entity/Document.php | 6 +++--- .../ChillDocStoreBundle/Entity/PersonDocument.php | 2 +- .../Controller/ParticipationController.php | 2 +- src/Bundle/ChillEventBundle/Entity/Event.php | 8 ++++---- .../ChillEventBundle/Entity/Participation.php | 8 ++++---- src/Bundle/ChillEventBundle/Entity/Role.php | 2 +- src/Bundle/ChillEventBundle/Entity/Status.php | 2 +- .../CRUD/Controller/ApiController.php | 2 +- .../ChillUserSendRenewPasswordCodeCommand.php | 4 ++-- .../DataFixtures/ORM/LoadAddressReferences.php | 2 +- .../DataFixtures/ORM/LoadCountries.php | 2 +- .../DataFixtures/ORM/LoadLanguages.php | 2 +- .../DataFixtures/ORM/LoadLocationType.php | 2 +- .../ChillMainBundle/DataFixtures/ORM/LoadUsers.php | 2 +- .../DependencyInjection/ChillMainExtension.php | 2 +- src/Bundle/ChillMainBundle/Entity/PostalCode.php | 4 ++-- .../ChillMainBundle/Entity/User/UserJobHistory.php | 4 ++-- .../Entity/User/UserScopeHistory.php | 4 ++-- .../Form/Type/ComposedRoleScopeType.php | 2 +- .../Phonenumber/PhonenumberHelper.php | 2 +- src/Bundle/ChillMainBundle/Routing/MenuTwig.php | 2 +- .../Security/Authorization/AuthorizationHelper.php | 6 +++--- .../Security/Resolver/ScopeResolverDispatcher.php | 2 +- .../Tests/Search/SearchProviderTest.php | 2 +- .../Normalizer/PhonenumberNormalizerTest.php | 2 +- .../DataFixtures/ORM/LoadCustomFields.php | 4 ++-- .../DependencyInjection/ChillPersonExtension.php | 12 ++++++------ .../AccompanyingPeriodLocationHistory.php | 10 +++++----- .../AccompanyingPeriodStepHistory.php | 2 +- .../AccompanyingPeriod/AccompanyingPeriodWork.php | 14 +++++++------- .../AccompanyingPeriodWorkGoal.php | 2 +- .../Entity/AccompanyingPeriod/Resource.php | 2 +- .../Entity/AccompanyingPeriod/UserHistory.php | 2 +- .../Entity/Household/PersonHouseholdAddress.php | 6 +++--- src/Bundle/ChillPersonBundle/Entity/Person.php | 14 +++++++------- .../Entity/Person/PersonCenterCurrent.php | 2 +- .../Entity/Person/PersonResource.php | 6 +++--- .../ChillPersonBundle/Entity/PersonAltName.php | 2 +- .../Entity/PersonNotDuplicate.php | 6 +++--- .../Entity/SocialWork/SocialAction.php | 8 ++++---- .../Entity/SocialWork/SocialIssue.php | 4 ++-- .../CreatorJobAggregator.php | 3 +-- .../Export/Helper/ListAccompanyingPeriodHelper.php | 2 ++ .../PersonControllerUpdateWithHiddenFieldsTest.php | 2 +- .../PersonControllerViewWithHiddenFieldsTest.php | 2 +- ...mpanyingPeriodWorkAssociatePersonOnWorkTest.php | 2 +- src/Bundle/ChillReportBundle/Entity/Report.php | 8 ++++---- .../Tests/Timeline/TimelineProviderTest.php | 2 +- .../migrations/Version20150622233319.php | 2 +- src/Bundle/ChillTaskBundle/Entity/AbstractTask.php | 8 ++++---- src/Bundle/ChillTaskBundle/Entity/SingleTask.php | 2 +- .../Entity/Task/AbstractTaskPlaceEvent.php | 2 +- .../Entity/Task/SingleTaskPlaceEvent.php | 2 +- 58 files changed, 114 insertions(+), 113 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 2bb8a985d..f43a0fdfb 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -32,7 +32,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface * * @Assert\NotBlank */ - private \Chill\MainBundle\Entity\User $agent; + private User $agent; /** * @ORM\Column(type="datetime") @@ -44,7 +44,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface * * @ORM\JoinColumn(nullable=false) */ - private \Chill\MainBundle\Entity\User $createdBy; + private User $createdBy; /** * @ORM\Column(type="datetime") @@ -82,7 +82,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface * * @ORM\JoinColumn(nullable=false) */ - private ?\Chill\AsideActivityBundle\Entity\AsideActivityCategory $type = null; + private ?AsideActivityCategory $type = null; /** * @ORM\Column(type="datetime", nullable=true) @@ -92,7 +92,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface /** * @ORM\ManyToOne(targetEntity=User::class) */ - private \Chill\MainBundle\Entity\User $updatedBy; + private User $updatedBy; public function getAgent(): ?User { diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php index b75d23e5e..93eeafdea 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php @@ -38,7 +38,7 @@ class CustomField * targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup", * inversedBy="customFields") */ - private ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup = null; + private ?CustomFieldsGroup $customFieldGroup = null; /** * @ORM\Id diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php index b6f371c8e..a17bb5aaf 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php @@ -63,7 +63,7 @@ class Option * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option $parent = null; + private ?Option $parent = null; /** * A json representation of text (multilingual). diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php index fbf100a95..cb5f8da7a 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php @@ -33,7 +33,7 @@ class CustomFieldsDefaultGroup * * sf4 check: option inversedBy="customFields" return inconsistent error mapping !! */ - private ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldsGroup = null; + private ?CustomFieldsGroup $customFieldsGroup = null; /** * @ORM\Column(type="string", length=255) diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php index 310e64b62..6d3abbc66 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php @@ -25,7 +25,7 @@ final class CustomFieldsHelperTest extends KernelTestCase { private ?object $cfHelper = null; - private \Chill\CustomFieldsBundle\Entity\CustomField $randomCFText; + private CustomField $randomCFText; protected function setUp(): void { diff --git a/src/Bundle/ChillDocStoreBundle/Entity/Document.php b/src/Bundle/ChillDocStoreBundle/Entity/Document.php index e4990b1b8..d4d6dc945 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/Document.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/Document.php @@ -37,7 +37,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface * @ORM\JoinColumn(name="category_id_inside_bundle", referencedColumnName="id_inside_bundle") * }) */ - private ?\Chill\DocStoreBundle\Entity\DocumentCategory $category = null; + private ?DocumentCategory $category = null; /** * @ORM\Column(type="datetime") @@ -61,12 +61,12 @@ class Document implements TrackCreationInterface, TrackUpdateInterface * message="Upload a document" * ) */ - private ?\Chill\DocStoreBundle\Entity\StoredObject $object = null; + private ?StoredObject $object = null; /** * @ORM\ManyToOne(targetEntity="Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate") */ - private ?\Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate $template = null; + private ?DocGeneratorTemplate $template = null; /** * @ORM\Column(type="text") diff --git a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php index 40b1a73b8..84056a3b9 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php @@ -43,7 +43,7 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt * * @var Scope The document's center */ - private ?\Chill\MainBundle\Entity\Scope $scope = null; + private ?Scope $scope = null; public function getCenter() { diff --git a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php index b0ce372ff..9785c20b0 100644 --- a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php +++ b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php @@ -548,7 +548,7 @@ class ParticipationController extends AbstractController Request $request, Participation $participation, bool $multiple = false - ): array|\Chill\EventBundle\Entity\Participation { + ): array|Participation { $em = $this->getDoctrine()->getManager(); if ($em->contains($participation)) { diff --git a/src/Bundle/ChillEventBundle/Entity/Event.php b/src/Bundle/ChillEventBundle/Entity/Event.php index 5ecc97afd..9d7b4d935 100644 --- a/src/Bundle/ChillEventBundle/Entity/Event.php +++ b/src/Bundle/ChillEventBundle/Entity/Event.php @@ -35,12 +35,12 @@ class Event implements HasCenterInterface, HasScopeInterface /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Center") */ - private ?\Chill\MainBundle\Entity\Center $center = null; + private ?Center $center = null; /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope") */ - private ?\Chill\MainBundle\Entity\Scope $circle = null; + private ?Scope $circle = null; /** * @ORM\Column(type="datetime") @@ -59,7 +59,7 @@ class Event implements HasCenterInterface, HasScopeInterface /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User") */ - private ?\Chill\MainBundle\Entity\User $moderator = null; + private ?User $moderator = null; /** * @ORM\Column(type="string", length=150) @@ -78,7 +78,7 @@ class Event implements HasCenterInterface, HasScopeInterface /** * @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\EventType") */ - private ?\Chill\EventBundle\Entity\EventType $type = null; + private ?EventType $type = null; /** * Event constructor. diff --git a/src/Bundle/ChillEventBundle/Entity/Participation.php b/src/Bundle/ChillEventBundle/Entity/Participation.php index 8dda85c99..37899262f 100644 --- a/src/Bundle/ChillEventBundle/Entity/Participation.php +++ b/src/Bundle/ChillEventBundle/Entity/Participation.php @@ -37,7 +37,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa * targetEntity="Chill\EventBundle\Entity\Event", * inversedBy="participations") */ - private ?\Chill\EventBundle\Entity\Event $event = null; + private ?Event $event = null; /** * @ORM\Id @@ -56,17 +56,17 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa /** * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") */ - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Role") */ - private ?\Chill\EventBundle\Entity\Role $role = null; + private ?Role $role = null; /** * @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Status") */ - private ?\Chill\EventBundle\Entity\Status $status = null; + private ?Status $status = null; /** * @return Center diff --git a/src/Bundle/ChillEventBundle/Entity/Role.php b/src/Bundle/ChillEventBundle/Entity/Role.php index 3d2264d2f..d0e07021e 100644 --- a/src/Bundle/ChillEventBundle/Entity/Role.php +++ b/src/Bundle/ChillEventBundle/Entity/Role.php @@ -50,7 +50,7 @@ class Role * targetEntity="Chill\EventBundle\Entity\EventType", * inversedBy="roles") */ - private ?\Chill\EventBundle\Entity\EventType $type = null; + private ?EventType $type = null; /** * Get active. diff --git a/src/Bundle/ChillEventBundle/Entity/Status.php b/src/Bundle/ChillEventBundle/Entity/Status.php index 22fe8e3ed..3c4237eb5 100644 --- a/src/Bundle/ChillEventBundle/Entity/Status.php +++ b/src/Bundle/ChillEventBundle/Entity/Status.php @@ -50,7 +50,7 @@ class Status * targetEntity="Chill\EventBundle\Entity\EventType", * inversedBy="statuses") */ - private ?\Chill\EventBundle\Entity\EventType $type = null; + private ?EventType $type = null; /** * Get active. diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php index 345da5bc5..78bdc96d5 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php @@ -175,7 +175,7 @@ class ApiController extends AbstractCRUDController public function indexApi(Request $request, string $_format) { return match ($request->getMethod()) { - Request::METHOD_GET, REQUEST::METHOD_HEAD => $this->indexApiAction('_index', $request, $_format), + Request::METHOD_GET, Request::METHOD_HEAD => $this->indexApiAction('_index', $request, $_format), default => throw $this->createNotFoundException('This method is not supported'), }; } diff --git a/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php b/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php index 0c68798f9..da14d85ff 100644 --- a/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php +++ b/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php @@ -57,12 +57,12 @@ class ChillUserSendRenewPasswordCodeCommand extends Command /** * The current input interface. */ - private ?\Symfony\Component\Console\Input\InputInterface $input = null; + private ?InputInterface $input = null; /** * The current output interface. */ - private ?\Symfony\Component\Console\Output\OutputInterface $output = null; + private ?OutputInterface $output = null; public function __construct( LoggerInterface $logger, diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php index f95a3cf66..68f16cd01 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php @@ -26,7 +26,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt { protected $faker; - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; public function __construct() { diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php index 4f0d24501..9f36a315e 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php @@ -23,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; */ class LoadCountries extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface { - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; public function getOrder() { diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php index 54025cc2f..70c7e90a9 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php @@ -27,7 +27,7 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface, private array $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga', 'dum', 'enm', 'frm', 'gmh', 'mga', 'akk', 'phn', 'zxx', 'got', 'und', ]; - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; // The regional version of language are language with _ in the code // This array contains regional code to not exclude diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php index 946632513..3058ed635 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php @@ -23,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; */ class LoadLocationType extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface { - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; public function getOrder() { diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php index d22da6b78..766d2246b 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php @@ -53,7 +53,7 @@ class LoadUsers extends AbstractFixture implements ContainerAwareInterface, Orde ], ]; - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; public function getOrder() { diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index 5c33ef1b3..b62f1f2d7 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -261,7 +261,7 @@ class ChillMainExtension extends Extension implements 'ST_X' => STX::class, 'ST_Y' => STY::class, 'GREATEST' => Greatest::class, - 'LEAST' => LEAST::class, + 'LEAST' => Least::class, ], 'datetime_functions' => [ 'EXTRACT' => Extract::class, diff --git a/src/Bundle/ChillMainBundle/Entity/PostalCode.php b/src/Bundle/ChillMainBundle/Entity/PostalCode.php index 5aba8030c..b4c246bd5 100644 --- a/src/Bundle/ChillMainBundle/Entity/PostalCode.php +++ b/src/Bundle/ChillMainBundle/Entity/PostalCode.php @@ -59,7 +59,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface * * @groups({"read"}) */ - private ?\Chill\MainBundle\Doctrine\Model\Point $center = null; + private ?Point $center = null; /** * @ORM\Column(type="string", length=100) @@ -73,7 +73,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface * * @groups({"write", "read"}) */ - private ?\Chill\MainBundle\Entity\Country $country = null; + private ?Country $country = null; /** * @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null}) diff --git a/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php b/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php index 7916d9891..6bda2afec 100644 --- a/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php +++ b/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php @@ -84,7 +84,7 @@ class UserJobHistory return $this; } - public function setJob(?UserJob $job): UserJobHistory + public function setJob(?UserJob $job): User\UserJobHistory { $this->job = $job; @@ -98,7 +98,7 @@ class UserJobHistory return $this; } - public function setUser(User $user): UserJobHistory + public function setUser(User $user): User\UserJobHistory { $this->user = $user; diff --git a/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php b/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php index 6ac768de2..a82599ed6 100644 --- a/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php +++ b/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php @@ -84,7 +84,7 @@ class UserScopeHistory return $this; } - public function setScope(?Scope $scope): UserScopeHistory + public function setScope(?Scope $scope): User\UserScopeHistory { $this->scope = $scope; @@ -98,7 +98,7 @@ class UserScopeHistory return $this; } - public function setUser(User $user): UserScopeHistory + public function setUser(User $user): User\UserScopeHistory { $this->user = $user; diff --git a/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php b/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php index 6b87ed6ef..f4b4da609 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php @@ -26,7 +26,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; */ class ComposedRoleScopeType extends AbstractType { - private readonly \Chill\MainBundle\Security\RoleProvider $roleProvider; + private readonly RoleProvider $roleProvider; /** * @var string[] diff --git a/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php b/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php index 462f379cf..9006268bd 100644 --- a/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php +++ b/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php @@ -33,7 +33,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface private bool $isConfigured = false; - private readonly PhonenumberUtil $phoneNumberUtil; + private readonly PhoneNumberUtil $phoneNumberUtil; private Client $twilioClient; diff --git a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php index 39e35c040..2989187a8 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php @@ -22,7 +22,7 @@ use Twig\TwigFunction; */ class MenuTwig extends AbstractExtension implements ContainerAwareInterface { - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; /** * the default parameters for chillMenu. diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php index 6d9454fe0..7e5d8a325 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php @@ -61,7 +61,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface * * @return User[] */ - public function findUsersReaching(string $role, array|\Chill\MainBundle\Entity\Center $center, array|\Chill\MainBundle\Entity\Scope $scope = null, bool $onlyEnabled = true): array + public function findUsersReaching(string $role, array|Center $center, array|Scope $scope = null, bool $onlyEnabled = true): array { return $this->userACLAwareRepository ->findUsersByReachedACL($role, $center, $scope, $onlyEnabled); @@ -126,7 +126,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface * * @return Scope[] */ - public function getReachableCircles(UserInterface $user, string $role, array|\Chill\MainBundle\Entity\Center $center) + public function getReachableCircles(UserInterface $user, string $role, array|Center $center) { $scopes = []; @@ -168,7 +168,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface * * @param Center|Center[] $center May be an array of center */ - public function userCanReachCenter(User $user, array|\Chill\MainBundle\Entity\Center $center): bool + public function userCanReachCenter(User $user, array|Center $center): bool { if ($center instanceof \Traversable) { foreach ($center as $c) { diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php index a3298eab5..ce1e16862 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php @@ -37,7 +37,7 @@ final readonly class ScopeResolverDispatcher /** * @return Scope|iterable|Scope|null */ - public function resolveScope(mixed $entity, ?array $options = []): null|\Chill\MainBundle\Entity\Scope|iterable + public function resolveScope(mixed $entity, ?array $options = []): null|iterable|Scope { foreach ($this->resolvers as $resolver) { if ($resolver->supports($entity, $options)) { diff --git a/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php b/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php index b8ce37fff..d1602f7e2 100644 --- a/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php @@ -25,7 +25,7 @@ use PHPUnit\Framework\TestCase; */ final class SearchProviderTest extends TestCase { - private \Chill\MainBundle\Search\SearchProvider $search; + private SearchProvider $search; protected function setUp(): void { diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php index eda761dc1..583dfc4cc 100644 --- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php @@ -40,7 +40,7 @@ final class PhonenumberNormalizerTest extends TestCase /** * @dataProvider dataProviderNormalizePhonenumber */ - public function testNormalize(?Phonenumber $phonenumber, mixed $format, mixed $context, mixed $expected) + public function testNormalize(?PhoneNumber $phonenumber, mixed $format, mixed $context, mixed $expected) { $parameterBag = $this->prophesize(ParameterBagInterface::class); $parameterBag->get(Argument::exact('chill_main'))->willReturn(['phone_helper' => ['default_carrier_code' => 'BE']]); diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php index 47548ff2c..baf18cebc 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php @@ -25,9 +25,9 @@ use Doctrine\Persistence\ObjectManager; class LoadCustomFields extends AbstractFixture implements OrderedFixtureInterface { - private ?\Chill\CustomFieldsBundle\Entity\CustomField $cfText = null; + private ?CustomField $cfText = null; - private ?\Chill\CustomFieldsBundle\Entity\CustomField $cfChoice = null; + private ?CustomField $cfChoice = null; /** * /** diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index 18861e01f..3d5c0bc64 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -147,7 +147,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac $container->prependExtensionConfig('chill_main', [ 'cruds' => [ [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive::class, + 'class' => AccompanyingPeriod\ClosingMotive::class, 'name' => 'closing_motive', 'base_path' => '/admin/person/closing-motive', 'form_class' => \Chill\PersonBundle\Form\ClosingMotiveType::class, @@ -168,7 +168,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ], [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\Origin::class, + 'class' => AccompanyingPeriod\Origin::class, 'name' => 'origin', 'base_path' => '/admin/person/origin', 'form_class' => \Chill\PersonBundle\Form\OriginType::class, @@ -535,7 +535,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ], [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\Comment::class, + 'class' => AccompanyingPeriod\Comment::class, 'name' => 'accompanying_period_comment', 'base_path' => '/api/1.0/person/accompanying-period/comment', 'base_role' => 'ROLE_USER', @@ -554,7 +554,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ], [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\Resource::class, + 'class' => AccompanyingPeriod\Resource::class, 'name' => 'accompanying_period_resource', 'base_path' => '/api/1.0/person/accompanying-period/resource', 'base_role' => 'ROLE_USER', @@ -573,7 +573,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ], [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\Origin::class, + 'class' => AccompanyingPeriod\Origin::class, 'name' => 'accompanying_period_origin', 'base_path' => '/api/1.0/person/accompanying-period/origin', 'controller' => \Chill\PersonBundle\Controller\OpeningApiController::class, @@ -718,7 +718,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ], [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork::class, + 'class' => AccompanyingPeriod\AccompanyingPeriodWork::class, 'name' => 'accompanying_period_work', 'base_path' => '/api/1.0/person/accompanying-course/work', 'controller' => \Chill\PersonBundle\Controller\AccompanyingCourseWorkApiController::class, diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php index 700076506..ab6e66f1c 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php @@ -91,14 +91,14 @@ class AccompanyingPeriodLocationHistory implements TrackCreationInterface return $this->startDate; } - public function setAddressLocation(?Address $addressLocation): AccompanyingPeriodLocationHistory + public function setAddressLocation(?Address $addressLocation): AccompanyingPeriod\AccompanyingPeriodLocationHistory { $this->addressLocation = $addressLocation; return $this; } - public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriodLocationHistory + public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriod\AccompanyingPeriodLocationHistory { $this->endDate = $endDate; @@ -108,21 +108,21 @@ class AccompanyingPeriodLocationHistory implements TrackCreationInterface /** * @internal use AccompanyingPeriod::addLocationHistory */ - public function setPeriod(AccompanyingPeriod $period): AccompanyingPeriodLocationHistory + public function setPeriod(AccompanyingPeriod $period): AccompanyingPeriod\AccompanyingPeriodLocationHistory { $this->period = $period; return $this; } - public function setPersonLocation(?Person $personLocation): AccompanyingPeriodLocationHistory + public function setPersonLocation(?Person $personLocation): AccompanyingPeriod\AccompanyingPeriodLocationHistory { $this->personLocation = $personLocation; return $this; } - public function setStartDate(?\DateTimeImmutable $startDate): AccompanyingPeriodLocationHistory + public function setStartDate(?\DateTimeImmutable $startDate): AccompanyingPeriod\AccompanyingPeriodLocationHistory { $this->startDate = $startDate; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php index 15b2f0d2e..5a3ed774c 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php @@ -108,7 +108,7 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda return $this; } - public function setStep(string $step): AccompanyingPeriodStepHistory + public function setStep(string $step): AccompanyingPeriod\AccompanyingPeriodStepHistory { $this->step = $step; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php index a35dc3abf..afb4b1c82 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php @@ -255,7 +255,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues $this->referrersHistory = new ArrayCollection(); } - public function addAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self + public function addAccompanyingPeriodWorkEvaluation(AccompanyingPeriod\AccompanyingPeriodWorkEvaluation $evaluation): self { if (!$this->accompanyingPeriodWorkEvaluations->contains($evaluation)) { $this->accompanyingPeriodWorkEvaluations[] = $evaluation; @@ -265,7 +265,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this; } - public function addGoal(AccompanyingPeriodWorkGoal $goal): self + public function addGoal(AccompanyingPeriod\AccompanyingPeriodWorkGoal $goal): self { if (!$this->goals->contains($goal)) { $this->goals[] = $goal; @@ -288,7 +288,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues { if (!$this->getReferrers()->contains($referrer)) { $this->referrersHistory[] = - new AccompanyingPeriodWorkReferrerHistory($this, $referrer, new \DateTimeImmutable('today')); + new AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory($this, $referrer, new \DateTimeImmutable('today')); } return $this; @@ -393,8 +393,8 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues public function getReferrers(): ReadableCollection { $users = $this->referrersHistory - ->filter(fn (AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate()) - ->map(fn (AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser()) + ->filter(fn (AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate()) + ->map(fn (AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser()) ->getValues() ; @@ -452,7 +452,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this->updatedBy; } - public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self + public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriod\AccompanyingPeriodWorkEvaluation $evaluation): self { $this->accompanyingPeriodWorkEvaluations ->removeElement($evaluation); @@ -461,7 +461,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this; } - public function removeGoal(AccompanyingPeriodWorkGoal $goal): self + public function removeGoal(AccompanyingPeriod\AccompanyingPeriodWorkGoal $goal): self { if ($this->goals->removeElement($goal)) { // set the owning side to null (unless already changed) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php index a569f3a9d..c0a1528ad 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php @@ -35,7 +35,7 @@ class AccompanyingPeriodWorkGoal /** * @ORM\ManyToOne(targetEntity=AccompanyingPeriodWork::class, inversedBy="goals") */ - private ?\Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork $accompanyingPeriodWork = null; + private ?AccompanyingPeriodWork $accompanyingPeriodWork = null; /** * @ORM\ManyToOne(targetEntity=Goal::class) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php index 515816637..99ef4f7da 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php @@ -107,7 +107,7 @@ class Resource /** * @Groups({"read"}) */ - public function getResource(): null|\Chill\PersonBundle\Entity\Person|\Chill\ThirdPartyBundle\Entity\ThirdParty + public function getResource(): null|Person|ThirdParty { return $this->person ?? $this->thirdParty; } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php index 41b798a3f..29696cfe1 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php @@ -86,7 +86,7 @@ class UserHistory implements TrackCreationInterface return $this->user; } - public function setEndDate(?\DateTimeImmutable $endDate): UserHistory + public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriod\UserHistory { $this->endDate = $endDate; diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php b/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php index 453176334..529f3e0a6 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php +++ b/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php @@ -52,7 +52,7 @@ class PersonHouseholdAddress * * @ORM\JoinColumn(nullable=false) */ - private ?\Chill\MainBundle\Entity\Address $address = null; + private ?Address $address = null; /** * @ORM\Id @@ -61,7 +61,7 @@ class PersonHouseholdAddress * * @ORM\JoinColumn(nullable=false) */ - private ?\Chill\PersonBundle\Entity\Household\Household $household = null; + private ?Household $household = null; /** * @ORM\Id @@ -70,7 +70,7 @@ class PersonHouseholdAddress * * @ORM\JoinColumn(nullable=false) */ - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @ORM\Column(type="date_immutable") diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index db06be0f4..050be3260 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -227,7 +227,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\MainBundle\Entity\Civility $civility = null; + private ?Civility $civility = null; /** * Contact information for contacting the person. @@ -245,7 +245,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\MainBundle\Entity\Country $countryOfBirth = null; + private ?Country $countryOfBirth = null; /** * @ORM\Column(type="datetime", nullable=true, options={"default": NULL}) @@ -257,7 +257,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\MainBundle\Entity\User $createdBy = null; + private ?User $createdBy = null; /** * Cache the computation of household. @@ -390,7 +390,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\PersonBundle\Entity\MaritalStatus $maritalStatus = null; + private ?MaritalStatus $maritalStatus = null; /** * Comment on marital status. @@ -433,7 +433,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\MainBundle\Entity\Country $nationality = null; + private ?Country $nationality = null; /** * Number of children. @@ -525,7 +525,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * targetEntity=User::class * ) */ - private ?\Chill\MainBundle\Entity\User $updatedBy = null; + private ?User $updatedBy = null; /** * Person constructor. @@ -1356,7 +1356,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI /** * @return PersonResource[]|Collection */ - public function getResources(): array|\Doctrine\Common\Collections\Collection + public function getResources(): array|Collection { return $this->resources; } diff --git a/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php b/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php index 551f8fd03..3cc618af4 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php @@ -63,7 +63,7 @@ class PersonCenterCurrent * * @internal Should not be instantied, unless inside Person entity */ - public function __construct(PersonCenterHistory $history) + public function __construct(Person\PersonCenterHistory $history) { $this->person = $history->getPerson(); $this->center = $history->getCenter(); diff --git a/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php b/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php index c5c2c8d08..7f0a3e978 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php @@ -71,7 +71,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface * * @Groups({"read", "docgen:read"}) */ - private ?PersonResourceKind $kind = null; + private ?Person\PersonResourceKind $kind = null; /** * The person which host the owner of this resource. @@ -127,7 +127,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface return $this->id; } - public function getKind(): ?PersonResourceKind + public function getKind(): ?Person\PersonResourceKind { return $this->kind; } @@ -196,7 +196,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface return $this; } - public function setKind(?PersonResourceKind $kind): self + public function setKind(?Person\PersonResourceKind $kind): self { $this->kind = $kind; diff --git a/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php b/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php index 9b6b24621..78d820298 100644 --- a/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php +++ b/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php @@ -52,7 +52,7 @@ class PersonAltName * inversedBy="altNames" * ) */ - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * Get id. diff --git a/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php b/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php index ad0f4236f..7d296576c 100644 --- a/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php +++ b/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php @@ -43,17 +43,17 @@ class PersonNotDuplicate /** * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") */ - private ?\Chill\PersonBundle\Entity\Person $person1 = null; + private ?Person $person1 = null; /** * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") */ - private ?\Chill\PersonBundle\Entity\Person $person2 = null; + private ?Person $person2 = null; /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User") */ - private ?\Chill\MainBundle\Entity\User $user = null; + private ?User $user = null; public function __construct() { diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php index 8361399f5..19fd7395b 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php @@ -79,7 +79,7 @@ class SocialAction /** * @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="socialActions") */ - private ?\Chill\PersonBundle\Entity\SocialWork\SocialIssue $issue = null; + private ?SocialIssue $issue = null; /** * @ORM\Column(type="float", name="ordering", options={"default": 0.0}) @@ -89,7 +89,7 @@ class SocialAction /** * @ORM\ManyToOne(targetEntity=SocialAction::class, inversedBy="children") */ - private ?\Chill\PersonBundle\Entity\SocialWork\SocialAction $parent = null; + private ?SocialAction $parent = null; /** * @var Collection @@ -166,7 +166,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(array|\Doctrine\Common\Collections\Collection $socialActions): Collection + public static function findAncestorSocialActions(array|Collection $socialActions): Collection { $ancestors = new ArrayCollection(); @@ -246,7 +246,7 @@ class SocialAction /** * @param Collection|SocialAction[] $socialActions */ - public static function getDescendantsWithThisForActions(array|\Doctrine\Common\Collections\Collection $socialActions): Collection + public static function getDescendantsWithThisForActions(array|Collection $socialActions): Collection { $unique = []; diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php index 12e1c1742..397e5a826 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php @@ -57,7 +57,7 @@ class SocialIssue /** * @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="children") */ - private ?\Chill\PersonBundle\Entity\SocialWork\SocialIssue $parent = null; + private ?SocialIssue $parent = null; /** * @var Collection @@ -115,7 +115,7 @@ class SocialIssue * * @return Collection|SocialIssue[] */ - public static function findAncestorSocialIssues(array|\Doctrine\Common\Collections\Collection $socialIssues): Collection + public static function findAncestorSocialIssues(array|Collection $socialIssues): Collection { $ancestors = new ArrayCollection(); diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php index 53906931a..bc2232a65 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php @@ -16,7 +16,6 @@ use Chill\MainBundle\Export\AggregatorInterface; use Chill\MainBundle\Repository\UserJobRepository; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Export\Declarations; -use Doctrine\ORM\Query\Expr; use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; @@ -59,7 +58,7 @@ class CreatorJobAggregator implements AggregatorInterface ->leftJoin( UserJobHistory::class, "{$p}_jobHistory", - Expr\Join::WITH, + Join::WITH, $qb->expr()->andX( $qb->expr()->eq("{$p}_jobHistory.user", "{$p}_userHistory.createdBy"), // et si il est null ? $qb->expr()->andX( diff --git a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php index 5865bb4da..9b8902ba6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php +++ b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php @@ -110,6 +110,8 @@ final readonly class ListAccompanyingPeriodHelper return $this->translatableStringHelper->localize(json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR)); }, 'acpCreatedBy', 'acpUpdatedBy', 'referrer' => $this->userHelper->getLabel($key, $values, 'export.list.acp.'.$key), + 'acpParticipantsPersons' => function ($value) { + }, 'locationPersonName', 'requestorPerson' => function ($value) use ($key) { if ('_header' === $value) { return 'export.list.acp.'.$key; diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php index a89f5adc7..db77c5672 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php @@ -34,7 +34,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase private ?object $em = null; - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @var string The url using for seeing the person's information diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php index 3fbbf667b..6463c246b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php @@ -23,7 +23,7 @@ final class PersonControllerViewWithHiddenFieldsTest extends WebTestCase { private ?object $em = null; - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @var string The url to view the person details diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php index 6b6e7b7b4..6eb058f2c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php @@ -33,7 +33,7 @@ final class CountAccompanyingPeriodWorkAssociatePersonOnWorkTest extends Abstrac $em = self::$container->get(EntityManagerInterface::class); yield new CountAccompanyingPeriodWorkAssociatePersonOnWork($em, $this->getParameters(true)); - yield new CountAccompanyingPeriodWorkAssociatePersonOnwork($em, $this->getParameters(false)); + yield new CountAccompanyingPeriodWorkAssociatePersonOnWork($em, $this->getParameters(false)); } public function getFormData(): array diff --git a/src/Bundle/ChillReportBundle/Entity/Report.php b/src/Bundle/ChillReportBundle/Entity/Report.php index 1db2ed080..53878aa10 100644 --- a/src/Bundle/ChillReportBundle/Entity/Report.php +++ b/src/Bundle/ChillReportBundle/Entity/Report.php @@ -41,7 +41,7 @@ class Report implements HasCenterInterface, HasScopeInterface * @ORM\ManyToOne( * targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup") */ - private ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $cFGroup = null; + private ?CustomFieldsGroup $cFGroup = null; /** * @ORM\Column(type="datetime") @@ -60,17 +60,17 @@ class Report implements HasCenterInterface, HasScopeInterface /** * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") */ - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope") */ - private ?\Chill\MainBundle\Entity\Scope $scope = null; + private ?Scope $scope = null; /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User") */ - private ?\Chill\MainBundle\Entity\User $user = null; + private ?User $user = null; /** * @return Center diff --git a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php index ad6a16e57..d7a4054f7 100644 --- a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php @@ -28,7 +28,7 @@ final class TimelineProviderTest extends WebTestCase { private static ?object $em = null; - private \Chill\PersonBundle\Entity\Person $person; + private Person $person; /** * @var Report diff --git a/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php b/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php index 15827738e..268335cbc 100644 --- a/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php +++ b/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php @@ -22,7 +22,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; */ class Version20150622233319 extends AbstractMigration implements ContainerAwareInterface { - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; public function down(Schema $schema): void { diff --git a/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php b/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php index 51ab8166d..948f9a81a 100644 --- a/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php @@ -39,14 +39,14 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface * * @Serializer\Groups({"read"}) */ - private ?\Chill\MainBundle\Entity\User $assignee = null; + private ?User $assignee = null; /** * @ORM\ManyToOne( * targetEntity="\Chill\MainBundle\Entity\Scope" * ) */ - private ?\Chill\MainBundle\Entity\Scope $circle = null; + private ?Scope $circle = null; /** * @ORM\Column(name="closed", type="boolean", options={ "default": false }) @@ -60,7 +60,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface * * @Serializer\Groups({"read"}) */ - private ?\Chill\PersonBundle\Entity\AccompanyingPeriod $course = null; + private ?AccompanyingPeriod $course = null; /** * @ORM\Column(name="current_states", type="json", options={"jsonb"=true, "default"="[]"}) @@ -83,7 +83,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface * * @Serializer\Groups({"read"}) */ - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @ORM\Column(name="title", type="text") diff --git a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php index 91dfeaf61..f5ed0d3b0 100644 --- a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php @@ -71,7 +71,7 @@ class SingleTask extends AbstractTask * inversedBy="singleTasks" * ) */ - private ?\Chill\TaskBundle\Entity\RecurringTask $recurringTask = null; + private ?RecurringTask $recurringTask = null; /** * @ORM\Column(name="start_date", type="date", nullable=true) diff --git a/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php b/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php index 8a47eda19..367bfbfb8 100644 --- a/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php +++ b/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php @@ -26,7 +26,7 @@ class AbstractTaskPlaceEvent * targetEntity="\Chill\MainBundle\Entity\User" * ) */ - private ?\Chill\MainBundle\Entity\User $author = null; + private ?User $author = null; /** * @ORM\Column(name="data", type="json") diff --git a/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php b/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php index 47e3eabfb..50f1dce64 100644 --- a/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php +++ b/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php @@ -48,7 +48,7 @@ class SingleTaskPlaceEvent extends AbstractTaskPlaceEvent * inversedBy="taskPlaceEvents" * ) */ - protected ?\Chill\TaskBundle\Entity\SingleTask $task = null; + protected ?SingleTask $task = null; public function getTask(): SingleTask {