Fix pipeline

This commit is contained in:
Julie Lenaerts 2024-11-26 14:42:04 +01:00
parent e339623e2d
commit 8f34c841f3
23 changed files with 71 additions and 67 deletions

View File

@ -107,7 +107,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private ?Person $person = null; private ?Person $person = null;
/** /**
* @var Collection<int, \Chill\PersonBundle\Entity\Person> * @var Collection<int, Person>
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: Person::class)] #[ORM\ManyToMany(targetEntity: Person::class)]
@ -132,7 +132,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private string $sentReceived = ''; private string $sentReceived = '';
/** /**
* @var Collection<int, \Chill\PersonBundle\Entity\SocialWork\SocialAction> * @var Collection<int, SocialAction>
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: SocialAction::class)] #[ORM\ManyToMany(targetEntity: SocialAction::class)]

View File

@ -103,7 +103,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
private int $dateTimeVersion = 0; private int $dateTimeVersion = 0;
/** /**
* @var Collection<int, \Chill\CalendarBundle\Entity\CalendarDoc> * @var Collection<int, CalendarDoc>
*/ */
#[ORM\OneToMany(mappedBy: 'calendar', targetEntity: CalendarDoc::class, orphanRemoval: true)] #[ORM\OneToMany(mappedBy: 'calendar', targetEntity: CalendarDoc::class, orphanRemoval: true)]
private Collection $documents; private Collection $documents;
@ -120,7 +120,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
private ?int $id = null; private ?int $id = null;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\CalendarBundle\Entity\Invite>&Selectable * @var Collection<int, Invite>&Selectable
*/ */
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\OneToMany(mappedBy: 'calendar', targetEntity: Invite::class, cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)] #[ORM\OneToMany(mappedBy: 'calendar', targetEntity: Invite::class, cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)]

View File

@ -17,7 +17,7 @@ use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
final readonly class ContextManager implements ContextManagerInterface final readonly class ContextManager implements ContextManagerInterface
{ {
/** /**
* @param \Chill\DocGeneratorBundle\Context\DocGeneratorContextInterface[] $contexts * @param DocGeneratorContextInterface[] $contexts
*/ */
public function __construct(private iterable $contexts) {} public function __construct(private iterable $contexts) {}

View File

@ -272,7 +272,7 @@ class StoredObject implements Document, TrackCreationInterface
* *
* @param 'ASC'|'DESC' $order the sorting order, default is Order::Ascending * @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 public function getVersionsOrdered(string $order = 'ASC'): ReadableCollection&Selectable
{ {

View File

@ -73,7 +73,7 @@ class CV implements \Stringable
/** /**
* @Assert\Valid(traverse=true) * @Assert\Valid(traverse=true)
* *
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\CV\Formation> * @var Collection<int, CV\Formation>
*/ */
#[ORM\OneToMany(targetEntity: CV\Formation::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)] #[ORM\OneToMany(targetEntity: CV\Formation::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)]
// #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])] // #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])]
@ -82,7 +82,7 @@ class CV implements \Stringable
/** /**
* @Assert\Valid(traverse=true) * @Assert\Valid(traverse=true)
* *
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\CV\Experience> * @var Collection<int, CV\Experience>
*/ */
#[ORM\OneToMany(targetEntity: CV\Experience::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)] #[ORM\OneToMany(targetEntity: CV\Experience::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)]
// #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])] // #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])]

View File

@ -45,7 +45,7 @@ class ProjetProfessionnel implements \Stringable
private ?\DateTimeInterface $reportDate = null; private ?\DateTimeInterface $reportDate = null;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\Rome\Appellation> * @var Collection<int, Appellation>
*/ */
#[ORM\JoinTable(name: 'chill_job.projetprofessionnel_souhait')] #[ORM\JoinTable(name: 'chill_job.projetprofessionnel_souhait')]
#[ORM\ManyToMany(targetEntity: Appellation::class, cascade: ['persist'])] #[ORM\ManyToMany(targetEntity: Appellation::class, cascade: ['persist'])]
@ -94,7 +94,7 @@ class ProjetProfessionnel implements \Stringable
private ?string $enCoursConstruction = null; private ?string $enCoursConstruction = null;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\Rome\Appellation> * @var Collection<int, Appellation>
*/ */
#[ORM\JoinTable(name: 'chill_job.projetprofessionnel_valide')] #[ORM\JoinTable(name: 'chill_job.projetprofessionnel_valide')]
#[ORM\ManyToMany(targetEntity: Appellation::class)] #[ORM\ManyToMany(targetEntity: Appellation::class)]

View File

@ -33,7 +33,7 @@ class Metier
private ?string $code = ''; private ?string $code = '';
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\Rome\Appellation> * @var \Doctrine\Common\Collections\Collection<int, Appellation>
*/ */
#[ORM\OneToMany(targetEntity: Appellation::class, mappedBy: 'metier')] #[ORM\OneToMany(targetEntity: Appellation::class, mappedBy: 'metier')]
private \Doctrine\Common\Collections\Collection $appellations; private \Doctrine\Common\Collections\Collection $appellations;

View File

@ -17,15 +17,14 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Component\Translation\Translator;
use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Helper\Table;
class DetectTranslationDuplicatesCommand extends Command class DetectTranslationDuplicatesCommand extends Command
{ {
protected static $defaultName = 'chill:detect-duplicate-translations'; 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(); parent::__construct();
} }
@ -50,8 +49,8 @@ class DetectTranslationDuplicatesCommand extends Command
$bundlePath = $bundle->getPath(); $bundlePath = $bundle->getPath();
$translationDir = $this->getTranslationDirectory($bundle->getName(), $bundlePath); $translationDir = $this->getTranslationDirectory($bundle->getName(), $bundlePath);
if ($translationDir && is_dir($translationDir)) { if (null !== $translationDir && is_dir($translationDir)) {
foreach (glob($translationDir . '/*.yaml') as $file) { foreach (glob($translationDir.'/*.yaml') as $file) {
$this->translator->addResource('yaml', $file, $locale); $this->translator->addResource('yaml', $file, $locale);
} }
} }
@ -64,45 +63,45 @@ class DetectTranslationDuplicatesCommand extends Command
// Iterate through each domain in the catalogue // Iterate through each domain in the catalogue
foreach ($catalogue->all() as $domain => $translations) { foreach ($catalogue->all() as $domain => $translations) {
foreach ($translations as $key => $value) { foreach ($translations as $key => $value) {
if ($this->isExcludedNamespace("$domain.$key", $excludedNamespaces)) { if ($this->isExcludedNamespace("{$domain}.{$key}", $excludedNamespaces)) {
continue; continue;
} }
if (is_array($value)) { if (is_array($value)) {
$this->flattenTranslation($value, "$domain.$key", $allTranslations); $this->flattenTranslation($value, "{$domain}.{$key}", $allTranslations);
} else { } else {
if (!isset($allTranslations[$value])) { if (!isset($allTranslations[$value])) {
$allTranslations[$value] = []; $allTranslations[$value] = [];
} }
$allTranslations[$value][] = "$domain.$key"; $allTranslations[$value][] = "{$domain}.{$key}";
} }
} }
} }
// Detect values that appear in more than one key // Detect values that appear in more than one key
$duplicates = array_filter($allTranslations, function ($keys) { $duplicates = array_filter($allTranslations, fn($keys) => count($keys) > 1);
return count($keys) > 1;
});
$duplicatesHash = $this->generateDuplicatesHash($duplicates); $duplicatesHash = $this->generateDuplicatesHash($duplicates);
if ($expectedHash) { if ('' !== $expectedHash) {
if ($duplicatesHash === $expectedHash) { if ($duplicatesHash === $expectedHash) {
$output->writeln('<info>Translations are consistent with the expected hash.</info>'); $output->writeln('<info>Translations are consistent with the expected hash.</info>');
$output->writeln("<info>Current duplicate hash: $duplicatesHash</info>"); $output->writeln("<info>Current duplicate hash: {$duplicatesHash}</info>");
return Command::SUCCESS;
} else {
$output->writeln('<error>Translation hash mismatch! Potential duplicate added.</error>');
$this->renderDuplicatesTable($output, $duplicates, $locale);
$output->writeln("<info>Current duplicate hash: $duplicatesHash</info>"); return Command::SUCCESS;
return Command::FAILURE;
} }
$output->writeln('<error>Translation hash mismatch! Potential duplicate added.</error>');
$this->renderDuplicatesTable($output, $duplicates, $locale);
$output->writeln("<info>Current duplicate hash: {$duplicatesHash}</info>");
return Command::FAILURE;
} }
$this->renderDuplicatesTable($output, $duplicates, $locale); $this->renderDuplicatesTable($output, $duplicates, $locale);
$output->writeln("<info>Current duplicate hash: $duplicatesHash</info>"); $output->writeln("<info>Current duplicate hash: {$duplicatesHash}</info>");
return Command::SUCCESS; return Command::SUCCESS;
} }
@ -110,7 +109,7 @@ class DetectTranslationDuplicatesCommand extends Command
private function flattenTranslation(array $translations, string $prefix, array &$allTranslations): void private function flattenTranslation(array $translations, string $prefix, array &$allTranslations): void
{ {
foreach ($translations as $key => $value) { foreach ($translations as $key => $value) {
$fullKey = "$prefix.$key"; $fullKey = "{$prefix}.{$key}";
if (is_array($value)) { if (is_array($value)) {
$this->flattenTranslation($value, $fullKey, $allTranslations); $this->flattenTranslation($value, $fullKey, $allTranslations);
} else { } else {
@ -124,10 +123,10 @@ class DetectTranslationDuplicatesCommand extends Command
private function getTranslationDirectory(string $bundleName, string $bundlePath): ?string private function getTranslationDirectory(string $bundleName, string $bundlePath): ?string
{ {
$translationDir = $bundlePath . '/translations'; $translationDir = $bundlePath.'/translations';
if ($bundleName === 'ChillAsideActivityBundle') { if ('ChillAsideActivityBundle' === $bundleName) {
$translationDir = $bundlePath . '/src/translations'; $translationDir = $bundlePath.'/src/translations';
} }
return is_dir($translationDir) ? $translationDir : null; return is_dir($translationDir) ? $translationDir : null;
@ -141,10 +140,11 @@ class DetectTranslationDuplicatesCommand extends Command
private function isExcludedNamespace(string $key, array $excludedNamespaces): bool private function isExcludedNamespace(string $key, array $excludedNamespaces): bool
{ {
foreach ($excludedNamespaces as $namespace) { foreach ($excludedNamespaces as $namespace) {
if (str_starts_with($key, $namespace)) { if (str_starts_with($key, (string) $namespace)) {
return true; return true;
} }
} }
return false; return false;
} }
@ -160,12 +160,13 @@ class DetectTranslationDuplicatesCommand extends Command
private function renderDuplicatesTable(OutputInterface $output, array $duplicates, string $locale): void private function renderDuplicatesTable(OutputInterface $output, array $duplicates, string $locale): void
{ {
if (empty($duplicates)) { if ([] === $duplicates) {
$output->writeln("<info>No duplicate translations found for locale '$locale'.</info>"); $output->writeln("<info>No duplicate translations found for locale '{$locale}'.</info>");
return; return;
} }
$output->writeln("<comment>Duplicate translations found for locale '$locale':</comment>"); $output->writeln("<comment>Duplicate translations found for locale '{$locale}':</comment>");
$table = new Table($output); $table = new Table($output);
$table->setHeaders(['Translation', 'Used in Keys']); $table->setHeaders(['Translation', 'Used in Keys']);

View File

@ -64,7 +64,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
private bool $enabled = true; private bool $enabled = true;
/** /**
* @var Collection<int, \Chill\MainBundle\Entity\GroupCenter> * @var Collection<int, GroupCenter>
*/ */
#[ORM\ManyToMany(targetEntity: GroupCenter::class, inversedBy: 'users')] #[ORM\ManyToMany(targetEntity: GroupCenter::class, inversedBy: 'users')]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
@ -83,7 +83,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
private ?Location $mainLocation = null; private ?Location $mainLocation = null;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\MainBundle\Entity\User\UserScopeHistory>&Selectable * @var Collection<int, UserScopeHistory>&Selectable
*/ */
#[ORM\OneToMany(mappedBy: 'user', targetEntity: UserScopeHistory::class, cascade: ['persist', 'remove'], orphanRemoval: true)] #[ORM\OneToMany(mappedBy: 'user', targetEntity: UserScopeHistory::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
private Collection&Selectable $scopeHistories; private Collection&Selectable $scopeHistories;
@ -98,7 +98,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
private ?string $salt = null; private ?string $salt = null;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\MainBundle\Entity\User\UserJobHistory>&Selectable * @var Collection<int, UserJobHistory>&Selectable
*/ */
#[ORM\OneToMany(mappedBy: 'user', targetEntity: UserJobHistory::class, cascade: ['persist', 'remove'], orphanRemoval: true)] #[ORM\OneToMany(mappedBy: 'user', targetEntity: UserJobHistory::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
private Collection&Selectable $jobHistories; private Collection&Selectable $jobHistories;

View File

@ -36,7 +36,7 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
use TrackUpdateTrait; use TrackUpdateTrait;
/** /**
* @var Collection<int, \Chill\MainBundle\Entity\Workflow\EntityWorkflowComment> * @var Collection<int, EntityWorkflowComment>
*/ */
#[ORM\OneToMany(mappedBy: 'entityWorkflow', targetEntity: EntityWorkflowComment::class, orphanRemoval: true)] #[ORM\OneToMany(mappedBy: 'entityWorkflow', targetEntity: EntityWorkflowComment::class, orphanRemoval: true)]
private Collection $comments; private Collection $comments;

View File

@ -107,7 +107,7 @@ class EntityWorkflowStep
private ?string $transitionByEmail = null; private ?string $transitionByEmail = null;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\MainBundle\Entity\Workflow\EntityWorkflowStepHold> * @var Collection<int, EntityWorkflowStepHold>
*/ */
#[ORM\OneToMany(mappedBy: 'step', targetEntity: EntityWorkflowStepHold::class)] #[ORM\OneToMany(mappedBy: 'step', targetEntity: EntityWorkflowStepHold::class)]
private Collection $holdsOnStep; private Collection $holdsOnStep;

View File

@ -261,7 +261,7 @@ final readonly class UserRepository implements UserRepositoryInterface
* allows to make a first search amongst users based on role and center * allows to make a first search amongst users based on role and center
* and, then filter those users having some flags. * and, then filter those users having some flags.
* *
* @param \Chill\MainBundle\Entity\User[] $amongstUsers * @param User[] $amongstUsers
*/ */
public function findUsersHavingFlags($flag, array $amongstUsers = []): array public function findUsersHavingFlags($flag, array $amongstUsers = []): array
{ {

View File

@ -71,7 +71,7 @@ interface UserRepositoryInterface extends ObjectRepository
* allows to make a first search amongst users based on role and center * allows to make a first search amongst users based on role and center
* and, then filter those users having some flags. * 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; public function findUsersHavingFlags(mixed $flag, array $amongstUsers = []): array;
} }

View File

@ -14,7 +14,7 @@ namespace Chill\MainBundle\Security\Resolver;
final readonly class CenterResolverDispatcher implements CenterResolverDispatcherInterface final readonly class CenterResolverDispatcher implements CenterResolverDispatcherInterface
{ {
/** /**
* @param \Chill\MainBundle\Security\Resolver\CenterResolverInterface[] $resolvers * @param CenterResolverInterface[] $resolvers
*/ */
public function __construct(private iterable $resolvers = []) {} public function __construct(private iterable $resolvers = []) {}

View File

@ -16,7 +16,7 @@ use Chill\MainBundle\Entity\Center;
final readonly class CenterResolverManager implements CenterResolverManagerInterface final readonly class CenterResolverManager implements CenterResolverManagerInterface
{ {
/** /**
* @param \Chill\MainBundle\Security\Resolver\CenterResolverInterface[] $resolvers * @param CenterResolverInterface[] $resolvers
*/ */
public function __construct(private iterable $resolvers = []) public function __construct(private iterable $resolvers = [])
{ {

View File

@ -17,7 +17,7 @@ use Doctrine\Common\Collections\Collection;
final readonly class ScopeResolverDispatcher final readonly class ScopeResolverDispatcher
{ {
/** /**
* @param \Chill\MainBundle\Security\Resolver\ScopeResolverInterface[] $resolvers * @param ScopeResolverInterface[] $resolvers
*/ */
public function __construct(private iterable $resolvers) {} public function __construct(private iterable $resolvers) {}

View File

@ -30,7 +30,7 @@ use Symfony\Component\Workflow\Registry;
class EntityWorkflowManager class EntityWorkflowManager
{ {
/** /**
* @param \Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface[] $handlers * @param EntityWorkflowHandlerInterface[] $handlers
*/ */
public function __construct(private readonly iterable $handlers, private readonly Registry $registry) {} public function __construct(private readonly iterable $handlers, private readonly Registry $registry) {}

View File

@ -114,3 +114,6 @@ services:
Chill\MainBundle\Service\EntityInfo\ViewEntityInfoManager: Chill\MainBundle\Service\EntityInfo\ViewEntityInfoManager:
arguments: arguments:
$vienEntityInfoProviders: !tagged_iterator chill_main.entity_info_provider $vienEntityInfoProviders: !tagged_iterator chill_main.entity_info_provider
Symfony\Component\Translation\Translator:
alias: translator.default

View File

@ -135,7 +135,7 @@ class AccompanyingPeriod implements
private ?Location $administrativeLocation = null; private ?Location $administrativeLocation = null;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\CalendarBundle\Entity\Calendar>&Selectable * @var Collection<int, Calendar>&Selectable
*/ */
#[ORM\OneToMany(mappedBy: 'accompanyingPeriod', targetEntity: Calendar::class)] #[ORM\OneToMany(mappedBy: 'accompanyingPeriod', targetEntity: Calendar::class)]
private Collection&Selectable $calendars; private Collection&Selectable $calendars;
@ -153,7 +153,7 @@ class AccompanyingPeriod implements
private ?ClosingMotive $closingMotive = null; private ?ClosingMotive $closingMotive = null;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\PersonBundle\Entity\AccompanyingPeriod\Comment> * @var Collection<int, Comment>
*/ */
#[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_DRAFT])] #[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_DRAFT])]
#[ORM\OneToMany(mappedBy: 'accompanyingPeriod', targetEntity: Comment::class, cascade: ['persist', 'remove'], orphanRemoval: true)] #[ORM\OneToMany(mappedBy: 'accompanyingPeriod', targetEntity: Comment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]

View File

@ -112,7 +112,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
private Collection $referrersHistory; private Collection $referrersHistory;
/** /**
* @var Collection<int, \Chill\PersonBundle\Entity\SocialWork\Result> * @var Collection<int, Result>
*/ */
#[Serializer\Groups(['read', 'docgen:read', 'accompanying_period_work:edit'])] #[Serializer\Groups(['read', 'docgen:read', 'accompanying_period_work:edit'])]
#[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'accompanyingPeriodWorks')] #[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'accompanyingPeriodWorks')]

View File

@ -36,7 +36,7 @@ class Household implements HasCentersInterface
/** /**
* Addresses. * Addresses.
* *
* @var Collection<int, \Chill\MainBundle\Entity\Address> * @var Collection<int, Address>
*/ */
#[Serializer\Groups(['write'])] #[Serializer\Groups(['write'])]
#[ORM\ManyToMany(targetEntity: Address::class, cascade: ['persist', 'remove', 'merge', 'detach'])] #[ORM\ManyToMany(targetEntity: Address::class, cascade: ['persist', 'remove', 'merge', 'detach'])]
@ -48,7 +48,7 @@ class Household implements HasCentersInterface
private CommentEmbeddable $commentMembers; private CommentEmbeddable $commentMembers;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\PersonBundle\Entity\Household\HouseholdComposition>&Selectable * @var Collection<int, HouseholdComposition>&Selectable
*/ */
#[Assert\Valid(groups: ['household_composition'], traverse: true)] #[Assert\Valid(groups: ['household_composition'], traverse: true)]
#[ORM\OneToMany(mappedBy: 'household', targetEntity: HouseholdComposition::class, cascade: ['persist'], orphanRemoval: true)] #[ORM\OneToMany(mappedBy: 'household', targetEntity: HouseholdComposition::class, cascade: ['persist'], orphanRemoval: true)]

View File

@ -83,7 +83,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The person's accompanying periods (when the person was accompanied by the center). * The person's accompanying periods (when the person was accompanied by the center).
* *
* @var Collection<int, \Chill\PersonBundle\Entity\AccompanyingPeriodParticipation> * @var Collection<int, AccompanyingPeriodParticipation>
*/ */
#[ORM\OneToMany(targetEntity: AccompanyingPeriodParticipation::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'])] #[ORM\OneToMany(targetEntity: AccompanyingPeriodParticipation::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'])]
#[ORM\OrderBy(['startDate' => Criteria::DESC])] #[ORM\OrderBy(['startDate' => Criteria::DESC])]
@ -92,7 +92,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The accompanying period requested by the Person. * The accompanying period requested by the Person.
* *
* @var Collection<int, \Chill\PersonBundle\Entity\AccompanyingPeriod> * @var Collection<int, AccompanyingPeriod>
*/ */
#[ORM\OneToMany(targetEntity: AccompanyingPeriod::class, mappedBy: 'requestorPerson')] #[ORM\OneToMany(targetEntity: AccompanyingPeriod::class, mappedBy: 'requestorPerson')]
private Collection $accompanyingPeriodRequested; private Collection $accompanyingPeriodRequested;
@ -100,7 +100,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* Addresses. * Addresses.
* *
* @var Collection<int, \Chill\MainBundle\Entity\Address> * @var Collection<int, Address>
*/ */
#[ORM\ManyToMany(targetEntity: Address::class, cascade: ['persist', 'remove', 'merge', 'detach'])] #[ORM\ManyToMany(targetEntity: Address::class, cascade: ['persist', 'remove', 'merge', 'detach'])]
#[ORM\JoinTable(name: 'chill_person_persons_to_addresses')] #[ORM\JoinTable(name: 'chill_person_persons_to_addresses')]
@ -108,7 +108,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
private Collection $addresses; private Collection $addresses;
/** /**
* @var Collection<int, \Chill\PersonBundle\Entity\PersonAltName> * @var Collection<int, PersonAltName>
*/ */
#[ORM\OneToMany(targetEntity: PersonAltName::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)] #[ORM\OneToMany(targetEntity: PersonAltName::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)]
private Collection $altNames; private Collection $altNames;
@ -121,7 +121,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
private ?\DateTime $birthdate = null; private ?\DateTime $birthdate = null;
/** /**
* @var Collection<int, \Chill\BudgetBundle\Entity\Charge> * @var Collection<int, Charge>
*/ */
#[ORM\OneToMany(targetEntity: Charge::class, mappedBy: 'person')] #[ORM\OneToMany(targetEntity: Charge::class, mappedBy: 'person')]
private Collection $budgetCharges; private Collection $budgetCharges;
@ -150,7 +150,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
private ?PersonCenterCurrent $centerCurrent = null; private ?PersonCenterCurrent $centerCurrent = null;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\PersonBundle\Entity\Person\PersonCenterHistory>&Selectable * @var Collection<int, PersonCenterHistory>&Selectable
*/ */
#[ORM\OneToMany(mappedBy: 'person', targetEntity: PersonCenterHistory::class, cascade: ['persist', 'remove'])] #[ORM\OneToMany(mappedBy: 'person', targetEntity: PersonCenterHistory::class, cascade: ['persist', 'remove'])]
private Collection&Selectable $centerHistory; private Collection&Selectable $centerHistory;
@ -252,13 +252,13 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* Read-only field, computed by the database. * Read-only field, computed by the database.
* *
* @var Collection<int, \Chill\PersonBundle\Entity\Household\PersonHouseholdAddress> * @var Collection<int, PersonHouseholdAddress>
*/ */
#[ORM\OneToMany(targetEntity: PersonHouseholdAddress::class, mappedBy: 'person')] #[ORM\OneToMany(targetEntity: PersonHouseholdAddress::class, mappedBy: 'person')]
private Collection $householdAddresses; private Collection $householdAddresses;
/** /**
* @var Collection<int, \Chill\PersonBundle\Entity\Household\HouseholdMember> * @var Collection<int, HouseholdMember>
*/ */
#[ORM\OneToMany(targetEntity: HouseholdMember::class, mappedBy: 'person')] #[ORM\OneToMany(targetEntity: HouseholdMember::class, mappedBy: 'person')]
private Collection $householdParticipations; private Collection $householdParticipations;
@ -325,14 +325,14 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
private ?int $numberOfChildren = null; private ?int $numberOfChildren = null;
/** /**
* @var Collection<int, \Chill\PersonBundle\Entity\PersonPhone> * @var Collection<int, PersonPhone>
*/ */
#[Assert\Valid(traverse: true)] #[Assert\Valid(traverse: true)]
#[ORM\OneToMany(targetEntity: PersonPhone::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)] #[ORM\OneToMany(targetEntity: PersonPhone::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)]
private Collection $otherPhoneNumbers; private Collection $otherPhoneNumbers;
/** /**
* @var Collection<int, \Chill\PersonBundle\Entity\AccompanyingPeriod> * @var Collection<int, AccompanyingPeriod>
*/ */
#[ORM\OneToMany(targetEntity: AccompanyingPeriod::class, mappedBy: 'personLocation')] #[ORM\OneToMany(targetEntity: AccompanyingPeriod::class, mappedBy: 'personLocation')]
private Collection $periodLocatedOn; private Collection $periodLocatedOn;
@ -356,7 +356,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $proxyAccompanyingPeriodOpenState = false; // TO-DELETE ? private bool $proxyAccompanyingPeriodOpenState = false; // TO-DELETE ?
/** /**
* @var Collection<int, \Chill\PersonBundle\Entity\Person\PersonResource> * @var Collection<int, PersonResource>
*/ */
#[ORM\OneToMany(targetEntity: PersonResource::class, mappedBy: 'personOwner')] #[ORM\OneToMany(targetEntity: PersonResource::class, mappedBy: 'personOwner')]
private Collection $resources; private Collection $resources;

View File

@ -39,7 +39,7 @@ class Evaluation
private ?\DateInterval $notificationDelay = null; private ?\DateInterval $notificationDelay = null;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\PersonBundle\Entity\SocialWork\SocialAction> * @var Collection<int, SocialAction>
*/ */
#[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'evaluations')] #[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'evaluations')]
private Collection $socialActions; private Collection $socialActions;