From 8f34c841f3bac3503a699c03c1435065fbc5b89f Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 26 Nov 2024 14:42:04 +0100 Subject: [PATCH] Fix pipeline --- .../ChillActivityBundle/Entity/Activity.php | 4 +- .../ChillCalendarBundle/Entity/Calendar.php | 4 +- .../Context/ContextManager.php | 2 +- .../Entity/StoredObject.php | 2 +- src/Bundle/ChillJobBundle/src/Entity/CV.php | 4 +- .../src/Entity/ProjetProfessionnel.php | 4 +- .../ChillJobBundle/src/Entity/Rome/Metier.php | 2 +- .../DetectTranslationDuplicatesCommand.php | 57 ++++++++++--------- src/Bundle/ChillMainBundle/Entity/User.php | 6 +- .../Entity/Workflow/EntityWorkflow.php | 2 +- .../Entity/Workflow/EntityWorkflowStep.php | 2 +- .../Repository/UserRepository.php | 2 +- .../Repository/UserRepositoryInterface.php | 2 +- .../Resolver/CenterResolverDispatcher.php | 2 +- .../Resolver/CenterResolverManager.php | 2 +- .../Resolver/ScopeResolverDispatcher.php | 2 +- .../Workflow/EntityWorkflowManager.php | 2 +- .../ChillMainBundle/config/services.yaml | 3 + .../Entity/AccompanyingPeriod.php | 4 +- .../AccompanyingPeriodWork.php | 2 +- .../Entity/Household/Household.php | 4 +- .../ChillPersonBundle/Entity/Person.php | 22 +++---- .../Entity/SocialWork/Evaluation.php | 2 +- 23 files changed, 71 insertions(+), 67 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Entity/Activity.php b/src/Bundle/ChillActivityBundle/Entity/Activity.php index 9f557f9b5..4701d2483 100644 --- a/src/Bundle/ChillActivityBundle/Entity/Activity.php +++ b/src/Bundle/ChillActivityBundle/Entity/Activity.php @@ -107,7 +107,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac private ?Person $person = null; /** - * @var Collection + * @var Collection */ #[Groups(['read', 'docgen:read'])] #[ORM\ManyToMany(targetEntity: Person::class)] @@ -132,7 +132,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac private string $sentReceived = ''; /** - * @var Collection + * @var Collection */ #[Groups(['read', 'docgen:read'])] #[ORM\ManyToMany(targetEntity: SocialAction::class)] diff --git a/src/Bundle/ChillCalendarBundle/Entity/Calendar.php b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php index 05d75a9bc..dad302193 100644 --- a/src/Bundle/ChillCalendarBundle/Entity/Calendar.php +++ b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php @@ -103,7 +103,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente private int $dateTimeVersion = 0; /** - * @var Collection + * @var Collection */ #[ORM\OneToMany(mappedBy: 'calendar', targetEntity: CalendarDoc::class, orphanRemoval: true)] private Collection $documents; @@ -120,7 +120,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente private ?int $id = null; /** - * @var \Doctrine\Common\Collections\Collection&Selectable + * @var Collection&Selectable */ #[Serializer\Groups(['read', 'docgen:read'])] #[ORM\OneToMany(mappedBy: 'calendar', targetEntity: Invite::class, cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)] diff --git a/src/Bundle/ChillDocGeneratorBundle/Context/ContextManager.php b/src/Bundle/ChillDocGeneratorBundle/Context/ContextManager.php index afcf6fab1..4aa6b042a 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Context/ContextManager.php +++ b/src/Bundle/ChillDocGeneratorBundle/Context/ContextManager.php @@ -17,7 +17,7 @@ use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate; final readonly class ContextManager implements ContextManagerInterface { /** - * @param \Chill\DocGeneratorBundle\Context\DocGeneratorContextInterface[] $contexts + * @param DocGeneratorContextInterface[] $contexts */ public function __construct(private iterable $contexts) {} diff --git a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php index 06c2e5bd3..d13452f76 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php @@ -272,7 +272,7 @@ class StoredObject implements Document, TrackCreationInterface * * @param 'ASC'|'DESC' $order the sorting order, default is Order::Ascending * - * @return readableCollection&Selectable The ordered collection of versions + * @return ReadableCollection&Selectable The ordered collection of versions */ public function getVersionsOrdered(string $order = 'ASC'): ReadableCollection&Selectable { diff --git a/src/Bundle/ChillJobBundle/src/Entity/CV.php b/src/Bundle/ChillJobBundle/src/Entity/CV.php index 257e4a0d0..12a57baca 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/CV.php +++ b/src/Bundle/ChillJobBundle/src/Entity/CV.php @@ -73,7 +73,7 @@ class CV implements \Stringable /** * @Assert\Valid(traverse=true) * - * @var \Doctrine\Common\Collections\Collection + * @var Collection */ #[ORM\OneToMany(targetEntity: CV\Formation::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)] // #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])] @@ -82,7 +82,7 @@ class CV implements \Stringable /** * @Assert\Valid(traverse=true) * - * @var \Doctrine\Common\Collections\Collection + * @var Collection */ #[ORM\OneToMany(targetEntity: CV\Experience::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)] // #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])] diff --git a/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php b/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php index 58a1fca41..6c808307e 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php +++ b/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php @@ -45,7 +45,7 @@ class ProjetProfessionnel implements \Stringable private ?\DateTimeInterface $reportDate = null; /** - * @var \Doctrine\Common\Collections\Collection + * @var Collection */ #[ORM\JoinTable(name: 'chill_job.projetprofessionnel_souhait')] #[ORM\ManyToMany(targetEntity: Appellation::class, cascade: ['persist'])] @@ -94,7 +94,7 @@ class ProjetProfessionnel implements \Stringable private ?string $enCoursConstruction = null; /** - * @var \Doctrine\Common\Collections\Collection + * @var Collection */ #[ORM\JoinTable(name: 'chill_job.projetprofessionnel_valide')] #[ORM\ManyToMany(targetEntity: Appellation::class)] diff --git a/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php b/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php index ce44a6acf..2df9ff3aa 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php +++ b/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php @@ -33,7 +33,7 @@ class Metier private ?string $code = ''; /** - * @var \Doctrine\Common\Collections\Collection + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(targetEntity: Appellation::class, mappedBy: 'metier')] private \Doctrine\Common\Collections\Collection $appellations; diff --git a/src/Bundle/ChillMainBundle/Command/DetectTranslationDuplicatesCommand.php b/src/Bundle/ChillMainBundle/Command/DetectTranslationDuplicatesCommand.php index 5cae72853..a1b0c6be5 100644 --- a/src/Bundle/ChillMainBundle/Command/DetectTranslationDuplicatesCommand.php +++ b/src/Bundle/ChillMainBundle/Command/DetectTranslationDuplicatesCommand.php @@ -17,15 +17,14 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Contracts\Translation\TranslatorInterface; +use Symfony\Component\Translation\Translator; use Symfony\Component\Console\Helper\Table; - class DetectTranslationDuplicatesCommand extends Command { protected static $defaultName = 'chill:detect-duplicate-translations'; - public function __construct(private readonly TranslatorInterface $translator, private readonly KernelInterface $kernel) + public function __construct(private readonly Translator $translator, private readonly KernelInterface $kernel) { parent::__construct(); } @@ -50,8 +49,8 @@ class DetectTranslationDuplicatesCommand extends Command $bundlePath = $bundle->getPath(); $translationDir = $this->getTranslationDirectory($bundle->getName(), $bundlePath); - if ($translationDir && is_dir($translationDir)) { - foreach (glob($translationDir . '/*.yaml') as $file) { + if (null !== $translationDir && is_dir($translationDir)) { + foreach (glob($translationDir.'/*.yaml') as $file) { $this->translator->addResource('yaml', $file, $locale); } } @@ -64,45 +63,45 @@ class DetectTranslationDuplicatesCommand extends Command // Iterate through each domain in the catalogue foreach ($catalogue->all() as $domain => $translations) { foreach ($translations as $key => $value) { - if ($this->isExcludedNamespace("$domain.$key", $excludedNamespaces)) { + if ($this->isExcludedNamespace("{$domain}.{$key}", $excludedNamespaces)) { continue; } if (is_array($value)) { - $this->flattenTranslation($value, "$domain.$key", $allTranslations); + $this->flattenTranslation($value, "{$domain}.{$key}", $allTranslations); } else { if (!isset($allTranslations[$value])) { $allTranslations[$value] = []; } - $allTranslations[$value][] = "$domain.$key"; + $allTranslations[$value][] = "{$domain}.{$key}"; } } } // Detect values that appear in more than one key - $duplicates = array_filter($allTranslations, function ($keys) { - return count($keys) > 1; - }); + $duplicates = array_filter($allTranslations, fn($keys) => count($keys) > 1); $duplicatesHash = $this->generateDuplicatesHash($duplicates); - if ($expectedHash) { + if ('' !== $expectedHash) { if ($duplicatesHash === $expectedHash) { $output->writeln('Translations are consistent with the expected hash.'); - $output->writeln("Current duplicate hash: $duplicatesHash"); - return Command::SUCCESS; - } else { - $output->writeln('Translation hash mismatch! Potential duplicate added.'); - $this->renderDuplicatesTable($output, $duplicates, $locale); + $output->writeln("Current duplicate hash: {$duplicatesHash}"); - $output->writeln("Current duplicate hash: $duplicatesHash"); - return Command::FAILURE; + return Command::SUCCESS; } + $output->writeln('Translation hash mismatch! Potential duplicate added.'); + $this->renderDuplicatesTable($output, $duplicates, $locale); + + $output->writeln("Current duplicate hash: {$duplicatesHash}"); + + return Command::FAILURE; + } $this->renderDuplicatesTable($output, $duplicates, $locale); - $output->writeln("Current duplicate hash: $duplicatesHash"); + $output->writeln("Current duplicate hash: {$duplicatesHash}"); return Command::SUCCESS; } @@ -110,7 +109,7 @@ class DetectTranslationDuplicatesCommand extends Command private function flattenTranslation(array $translations, string $prefix, array &$allTranslations): void { foreach ($translations as $key => $value) { - $fullKey = "$prefix.$key"; + $fullKey = "{$prefix}.{$key}"; if (is_array($value)) { $this->flattenTranslation($value, $fullKey, $allTranslations); } else { @@ -124,10 +123,10 @@ class DetectTranslationDuplicatesCommand extends Command private function getTranslationDirectory(string $bundleName, string $bundlePath): ?string { - $translationDir = $bundlePath . '/translations'; + $translationDir = $bundlePath.'/translations'; - if ($bundleName === 'ChillAsideActivityBundle') { - $translationDir = $bundlePath . '/src/translations'; + if ('ChillAsideActivityBundle' === $bundleName) { + $translationDir = $bundlePath.'/src/translations'; } return is_dir($translationDir) ? $translationDir : null; @@ -141,10 +140,11 @@ class DetectTranslationDuplicatesCommand extends Command private function isExcludedNamespace(string $key, array $excludedNamespaces): bool { foreach ($excludedNamespaces as $namespace) { - if (str_starts_with($key, $namespace)) { + if (str_starts_with($key, (string) $namespace)) { return true; } } + return false; } @@ -160,12 +160,13 @@ class DetectTranslationDuplicatesCommand extends Command private function renderDuplicatesTable(OutputInterface $output, array $duplicates, string $locale): void { - if (empty($duplicates)) { - $output->writeln("No duplicate translations found for locale '$locale'."); + if ([] === $duplicates) { + $output->writeln("No duplicate translations found for locale '{$locale}'."); + return; } - $output->writeln("Duplicate translations found for locale '$locale':"); + $output->writeln("Duplicate translations found for locale '{$locale}':"); $table = new Table($output); $table->setHeaders(['Translation', 'Used in Keys']); diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php index 0c8c87553..448efbdd1 100644 --- a/src/Bundle/ChillMainBundle/Entity/User.php +++ b/src/Bundle/ChillMainBundle/Entity/User.php @@ -64,7 +64,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter private bool $enabled = true; /** - * @var Collection + * @var Collection */ #[ORM\ManyToMany(targetEntity: GroupCenter::class, inversedBy: 'users')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')] @@ -83,7 +83,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter private ?Location $mainLocation = null; /** - * @var \Doctrine\Common\Collections\Collection&Selectable + * @var Collection&Selectable */ #[ORM\OneToMany(mappedBy: 'user', targetEntity: UserScopeHistory::class, cascade: ['persist', 'remove'], orphanRemoval: true)] private Collection&Selectable $scopeHistories; @@ -98,7 +98,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter private ?string $salt = null; /** - * @var \Doctrine\Common\Collections\Collection&Selectable + * @var Collection&Selectable */ #[ORM\OneToMany(mappedBy: 'user', targetEntity: UserJobHistory::class, cascade: ['persist', 'remove'], orphanRemoval: true)] private Collection&Selectable $jobHistories; diff --git a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php index d5a51af16..1c4413294 100644 --- a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php +++ b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php @@ -36,7 +36,7 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface use TrackUpdateTrait; /** - * @var Collection + * @var Collection */ #[ORM\OneToMany(mappedBy: 'entityWorkflow', targetEntity: EntityWorkflowComment::class, orphanRemoval: true)] private Collection $comments; diff --git a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php index 40a7bc1a2..f9556c33a 100644 --- a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php +++ b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php @@ -107,7 +107,7 @@ class EntityWorkflowStep private ?string $transitionByEmail = null; /** - * @var \Doctrine\Common\Collections\Collection + * @var Collection */ #[ORM\OneToMany(mappedBy: 'step', targetEntity: EntityWorkflowStepHold::class)] private Collection $holdsOnStep; diff --git a/src/Bundle/ChillMainBundle/Repository/UserRepository.php b/src/Bundle/ChillMainBundle/Repository/UserRepository.php index 3ee0828a7..9ac8af9ee 100644 --- a/src/Bundle/ChillMainBundle/Repository/UserRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/UserRepository.php @@ -261,7 +261,7 @@ final readonly class UserRepository implements UserRepositoryInterface * allows to make a first search amongst users based on role and center * and, then filter those users having some flags. * - * @param \Chill\MainBundle\Entity\User[] $amongstUsers + * @param User[] $amongstUsers */ public function findUsersHavingFlags($flag, array $amongstUsers = []): array { diff --git a/src/Bundle/ChillMainBundle/Repository/UserRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/UserRepositoryInterface.php index b7a20f315..f6c74b7dd 100644 --- a/src/Bundle/ChillMainBundle/Repository/UserRepositoryInterface.php +++ b/src/Bundle/ChillMainBundle/Repository/UserRepositoryInterface.php @@ -71,7 +71,7 @@ interface UserRepositoryInterface extends ObjectRepository * allows to make a first search amongst users based on role and center * and, then filter those users having some flags. * - * @param \Chill\MainBundle\Entity\User[] $amongstUsers + * @param User[] $amongstUsers */ public function findUsersHavingFlags(mixed $flag, array $amongstUsers = []): array; } diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverDispatcher.php b/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverDispatcher.php index 903b8c5c5..fcf774505 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverDispatcher.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverDispatcher.php @@ -14,7 +14,7 @@ namespace Chill\MainBundle\Security\Resolver; final readonly class CenterResolverDispatcher implements CenterResolverDispatcherInterface { /** - * @param \Chill\MainBundle\Security\Resolver\CenterResolverInterface[] $resolvers + * @param CenterResolverInterface[] $resolvers */ public function __construct(private iterable $resolvers = []) {} diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverManager.php b/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverManager.php index 813ab1526..b75e1c634 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverManager.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverManager.php @@ -16,7 +16,7 @@ use Chill\MainBundle\Entity\Center; final readonly class CenterResolverManager implements CenterResolverManagerInterface { /** - * @param \Chill\MainBundle\Security\Resolver\CenterResolverInterface[] $resolvers + * @param CenterResolverInterface[] $resolvers */ public function __construct(private iterable $resolvers = []) { diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php index 387bc724e..50cca33d5 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php @@ -17,7 +17,7 @@ use Doctrine\Common\Collections\Collection; final readonly class ScopeResolverDispatcher { /** - * @param \Chill\MainBundle\Security\Resolver\ScopeResolverInterface[] $resolvers + * @param ScopeResolverInterface[] $resolvers */ public function __construct(private iterable $resolvers) {} diff --git a/src/Bundle/ChillMainBundle/Workflow/EntityWorkflowManager.php b/src/Bundle/ChillMainBundle/Workflow/EntityWorkflowManager.php index bfe41f559..50719f4ae 100644 --- a/src/Bundle/ChillMainBundle/Workflow/EntityWorkflowManager.php +++ b/src/Bundle/ChillMainBundle/Workflow/EntityWorkflowManager.php @@ -30,7 +30,7 @@ use Symfony\Component\Workflow\Registry; class EntityWorkflowManager { /** - * @param \Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface[] $handlers + * @param EntityWorkflowHandlerInterface[] $handlers */ public function __construct(private readonly iterable $handlers, private readonly Registry $registry) {} diff --git a/src/Bundle/ChillMainBundle/config/services.yaml b/src/Bundle/ChillMainBundle/config/services.yaml index 86f15097b..a4aa3057b 100644 --- a/src/Bundle/ChillMainBundle/config/services.yaml +++ b/src/Bundle/ChillMainBundle/config/services.yaml @@ -114,3 +114,6 @@ services: Chill\MainBundle\Service\EntityInfo\ViewEntityInfoManager: arguments: $vienEntityInfoProviders: !tagged_iterator chill_main.entity_info_provider + + Symfony\Component\Translation\Translator: + alias: translator.default diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index 85b80faf8..91c8714bb 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -135,7 +135,7 @@ class AccompanyingPeriod implements private ?Location $administrativeLocation = null; /** - * @var \Doctrine\Common\Collections\Collection&Selectable + * @var Collection&Selectable */ #[ORM\OneToMany(mappedBy: 'accompanyingPeriod', targetEntity: Calendar::class)] private Collection&Selectable $calendars; @@ -153,7 +153,7 @@ class AccompanyingPeriod implements private ?ClosingMotive $closingMotive = null; /** - * @var \Doctrine\Common\Collections\Collection + * @var Collection */ #[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_DRAFT])] #[ORM\OneToMany(mappedBy: 'accompanyingPeriod', targetEntity: Comment::class, cascade: ['persist', 'remove'], orphanRemoval: true)] diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php index af012c5ff..9152c96be 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php @@ -112,7 +112,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues private Collection $referrersHistory; /** - * @var Collection + * @var Collection */ #[Serializer\Groups(['read', 'docgen:read', 'accompanying_period_work:edit'])] #[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'accompanyingPeriodWorks')] diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php index 6ecc0366d..dc67f6b93 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php +++ b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php @@ -36,7 +36,7 @@ class Household implements HasCentersInterface /** * Addresses. * - * @var Collection + * @var Collection */ #[Serializer\Groups(['write'])] #[ORM\ManyToMany(targetEntity: Address::class, cascade: ['persist', 'remove', 'merge', 'detach'])] @@ -48,7 +48,7 @@ class Household implements HasCentersInterface private CommentEmbeddable $commentMembers; /** - * @var \Doctrine\Common\Collections\Collection&Selectable + * @var Collection&Selectable */ #[Assert\Valid(groups: ['household_composition'], traverse: true)] #[ORM\OneToMany(mappedBy: 'household', targetEntity: HouseholdComposition::class, cascade: ['persist'], orphanRemoval: true)] diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index 4a0664652..74b4a2ef5 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -83,7 +83,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI /** * The person's accompanying periods (when the person was accompanied by the center). * - * @var Collection + * @var Collection */ #[ORM\OneToMany(targetEntity: AccompanyingPeriodParticipation::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'])] #[ORM\OrderBy(['startDate' => Criteria::DESC])] @@ -92,7 +92,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI /** * The accompanying period requested by the Person. * - * @var Collection + * @var Collection */ #[ORM\OneToMany(targetEntity: AccompanyingPeriod::class, mappedBy: 'requestorPerson')] private Collection $accompanyingPeriodRequested; @@ -100,7 +100,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI /** * Addresses. * - * @var Collection + * @var Collection */ #[ORM\ManyToMany(targetEntity: Address::class, cascade: ['persist', 'remove', 'merge', 'detach'])] #[ORM\JoinTable(name: 'chill_person_persons_to_addresses')] @@ -108,7 +108,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI private Collection $addresses; /** - * @var Collection + * @var Collection */ #[ORM\OneToMany(targetEntity: PersonAltName::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)] private Collection $altNames; @@ -121,7 +121,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI private ?\DateTime $birthdate = null; /** - * @var Collection + * @var Collection */ #[ORM\OneToMany(targetEntity: Charge::class, mappedBy: 'person')] private Collection $budgetCharges; @@ -150,7 +150,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI private ?PersonCenterCurrent $centerCurrent = null; /** - * @var \Doctrine\Common\Collections\Collection&Selectable + * @var Collection&Selectable */ #[ORM\OneToMany(mappedBy: 'person', targetEntity: PersonCenterHistory::class, cascade: ['persist', 'remove'])] private Collection&Selectable $centerHistory; @@ -252,13 +252,13 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI /** * Read-only field, computed by the database. * - * @var Collection + * @var Collection */ #[ORM\OneToMany(targetEntity: PersonHouseholdAddress::class, mappedBy: 'person')] private Collection $householdAddresses; /** - * @var Collection + * @var Collection */ #[ORM\OneToMany(targetEntity: HouseholdMember::class, mappedBy: 'person')] private Collection $householdParticipations; @@ -325,14 +325,14 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI private ?int $numberOfChildren = null; /** - * @var Collection + * @var Collection */ #[Assert\Valid(traverse: true)] #[ORM\OneToMany(targetEntity: PersonPhone::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)] private Collection $otherPhoneNumbers; /** - * @var Collection + * @var Collection */ #[ORM\OneToMany(targetEntity: AccompanyingPeriod::class, mappedBy: 'personLocation')] private Collection $periodLocatedOn; @@ -356,7 +356,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] private bool $proxyAccompanyingPeriodOpenState = false; // TO-DELETE ? /** - * @var Collection + * @var Collection */ #[ORM\OneToMany(targetEntity: PersonResource::class, mappedBy: 'personOwner')] private Collection $resources; diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php index 8a1fc1c9b..757dd9354 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php @@ -39,7 +39,7 @@ class Evaluation private ?\DateInterval $notificationDelay = null; /** - * @var \Doctrine\Common\Collections\Collection + * @var Collection */ #[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'evaluations')] private Collection $socialActions;