Apply rector changes to Collection typing

This commit is contained in:
Julie Lenaerts 2024-08-27 16:20:30 +02:00
parent 85e2466611
commit ad47804c91
31 changed files with 86 additions and 85 deletions

View File

@ -80,7 +80,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private \DateTime $date;
/**
* @var Collection<StoredObject>
* @var Collection<int, StoredObject>
*/
#[Assert\Valid(traverse: true)]
#[ORM\ManyToMany(targetEntity: StoredObject::class, cascade: ['persist'])]
@ -107,7 +107,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private ?Person $person = null;
/**
* @var Collection<Person>
* @var Collection<int, \Chill\PersonBundle\Entity\Person>
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: Person::class)]
@ -117,7 +117,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private PrivateCommentEmbeddable $privateComment;
/**
* @var Collection<ActivityReason>
* @var Collection<int, ActivityReason>
*/
#[Groups(['docgen:read'])]
#[ORM\ManyToMany(targetEntity: ActivityReason::class)]
@ -132,7 +132,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private string $sentReceived = '';
/**
* @var Collection<SocialAction>
* @var Collection<int, \Chill\PersonBundle\Entity\SocialWork\SocialAction>
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: SocialAction::class)]
@ -140,7 +140,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private Collection $socialActions;
/**
* @var Collection<SocialIssue>
* @var Collection<int, SocialIssue>
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: SocialIssue::class)]
@ -148,7 +148,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private Collection $socialIssues;
/**
* @var Collection<ThirdParty>
* @var Collection<int, ThirdParty>
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: ThirdParty::class)]
@ -162,7 +162,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private ?User $user = null;
/**
* @var Collection<User>
* @var Collection<int, User>
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: User::class)]

View File

@ -40,9 +40,9 @@ class ActivityReasonCategory implements \Stringable
/**
* Array of ActivityReason.
*
* @var Collection<ActivityReason>
* @var Collection<int, ActivityReason>
*/
#[ORM\OneToMany(targetEntity: ActivityReason::class, mappedBy: 'category')]
#[ORM\OneToMany(mappedBy: 'category', targetEntity: ActivityReason::class)]
private Collection $reasons;
/**

View File

@ -22,9 +22,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
class AsideActivityCategory
{
/**
* @var Collection<AsideActivityCategory>
* @var Collection<int, AsideActivityCategory>
*/
#[ORM\OneToMany(targetEntity: AsideActivityCategory::class, mappedBy: 'parent')]
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: AsideActivityCategory::class)]
private Collection $children;
#[ORM\Id]

View File

@ -125,7 +125,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\OneToMany(mappedBy: 'calendar', targetEntity: Invite::class, cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)]
#[ORM\JoinTable(name: 'chill_calendar.calendar_to_invites')]
private Collection $invites;
private ArrayCollection $invites;
#[Serializer\Groups(['read', 'docgen:read'])]
#[Assert\NotNull(message: 'calendar.A location is required')]

View File

@ -23,9 +23,9 @@ class Option
private bool $active = true;
/**
* @var Collection<Option>
* @var Collection<int, Option>
*/
#[ORM\OneToMany(targetEntity: Option::class, mappedBy: 'parent')]
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: Option::class)]
private Collection $children;
#[ORM\Id]

View File

@ -32,9 +32,9 @@ class CustomFieldsGroup
* The custom fields of the group.
* The custom fields are asc-ordered regarding to their property "ordering".
*
* @var Collection<CustomField>
* @var Collection<int, CustomField>
*/
#[ORM\OneToMany(targetEntity: CustomField::class, mappedBy: 'customFieldGroup')]
#[ORM\OneToMany(mappedBy: 'customFieldGroup', targetEntity: CustomField::class)]
#[ORM\OrderBy(['ordering' => \Doctrine\Common\Collections\Criteria::ASC])]
private Collection $customFields;

View File

@ -62,9 +62,9 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
private ?string $name = null;
/**
* @var Collection<Participation>
* @var Collection<int, Participation>
*/
#[ORM\OneToMany(targetEntity: Participation::class, mappedBy: 'event')]
#[ORM\OneToMany(mappedBy: 'event', targetEntity: Participation::class)]
private Collection $participations;
#[Assert\NotNull]
@ -79,7 +79,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
private ?Location $location = null;
/**
* @var Collection<StoredObject>
* @var Collection<int, StoredObject>
*/
#[ORM\ManyToMany(targetEntity: StoredObject::class, cascade: ['persist', 'refresh'])]
#[ORM\JoinTable('chill_event_event_documents')]

View File

@ -38,13 +38,13 @@ class EventType
private $name;
/**
* @var Collection<Role>
* @var Collection<int, Role>
*/
#[ORM\OneToMany(targetEntity: Role::class, mappedBy: 'type')]
#[ORM\OneToMany(mappedBy: 'type', targetEntity: Role::class)]
private Collection $roles;
/**
* @var Collection<Status>
* @var Collection<int, Status>
*/
#[ORM\OneToMany(targetEntity: Status::class, mappedBy: 'type')]
private Collection $statuses;

View File

@ -92,7 +92,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
* This list is computed by a materialized view. It won't be populated until a refresh is done
* on the materialized view.
*
* @var Collection<GeographicalUnit>
* @var Collection<int, GeographicalUnit>
*
* @readonly
*/

View File

@ -21,9 +21,9 @@ use Symfony\Component\Serializer\Annotation as Serializer;
class Center implements HasCenterInterface, \Stringable
{
/**
* @var Collection<GroupCenter>
* @var Collection<int, GroupCenter>
*/
#[ORM\OneToMany(targetEntity: GroupCenter::class, mappedBy: 'center')]
#[ORM\OneToMany(mappedBy: 'center', targetEntity: GroupCenter::class)]
private Collection $groupCenters;
#[Serializer\Groups(['docgen:read'])]
@ -40,7 +40,7 @@ class Center implements HasCenterInterface, \Stringable
private bool $isActive = true;
/**
* @var Collection<Regroupment>
* @var Collection<int, Regroupment>
*/
#[ORM\ManyToMany(targetEntity: Regroupment::class, mappedBy: 'centers')]
private Collection $regroupments;

View File

@ -36,9 +36,9 @@ class GeographicalUnitLayer
private string $refId = '';
/**
* @var Collection<GeographicalUnit>
* @var Collection<int, GeographicalUnit>
*/
#[ORM\OneToMany(targetEntity: GeographicalUnit::class, mappedBy: 'layer')]
#[ORM\OneToMany(mappedBy: 'layer', targetEntity: GeographicalUnit::class)]
private Collection $units;
public function __construct()

View File

@ -34,7 +34,7 @@ class GroupCenter
private ?PermissionsGroup $permissionsGroup = null;
/**
* @var Collection<User::class>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class, mappedBy: 'groupCenters')]
private Collection $users;

View File

@ -30,7 +30,7 @@ class Notification implements TrackUpdateInterface
private array $addedAddresses = [];
/**
* @var Collection<User>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_notification_addresses_user')]
@ -54,9 +54,9 @@ class Notification implements TrackUpdateInterface
private ?ArrayCollection $addressesOnLoad = null;
/**
* @var Collection<NotificationComment>
* @var Collection<int, NotificationComment>
*/
#[ORM\OneToMany(targetEntity: NotificationComment::class, mappedBy: 'notification', orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'notification', targetEntity: NotificationComment::class, orphanRemoval: true)]
#[ORM\OrderBy(['createdAt' => \Doctrine\Common\Collections\Criteria::ASC])]
private Collection $comments;
@ -88,7 +88,7 @@ class Notification implements TrackUpdateInterface
private string $title = '';
/**
* @var Collection<User>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_notification_addresses_unread')]

View File

@ -28,9 +28,9 @@ class PermissionsGroup
private array $flags = [];
/**
* @var Collection<GroupCenter>
* @var Collection<int, GroupCenter>
*/
#[ORM\OneToMany(targetEntity: GroupCenter::class, mappedBy: 'permissionsGroup')]
#[ORM\OneToMany(mappedBy: 'permissionsGroup', targetEntity: GroupCenter::class)]
private Collection $groupCenters;
#[ORM\Id]
@ -42,7 +42,7 @@ class PermissionsGroup
private string $name = '';
/**
* @var Collection<RoleScope>
* @var Collection<int, RoleScope>
*/
#[ORM\ManyToMany(targetEntity: RoleScope::class, inversedBy: 'permissionsGroups', cascade: ['persist'])]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]

View File

@ -20,7 +20,7 @@ use Doctrine\ORM\Mapping as ORM;
class Regroupment
{
/**
* @var Collection<Center>
* @var Collection<int, Center>
*/
#[ORM\ManyToMany(targetEntity: Center::class, inversedBy: 'regroupments')]
#[ORM\Id]

View File

@ -26,7 +26,7 @@ class RoleScope
private ?int $id = null;
/**
* @var Collection<PermissionsGroup>
* @var Collection<int, PermissionsGroup>
*/
#[ORM\ManyToMany(targetEntity: PermissionsGroup::class, mappedBy: 'roleScopes')]
private Collection $permissionsGroups;

View File

@ -42,9 +42,9 @@ class Scope
private array $name = [];
/**
* @var Collection<RoleScope>
* @var Collection<int, RoleScope>
*/
#[ORM\OneToMany(targetEntity: RoleScope::class, mappedBy: 'scope')]
#[ORM\OneToMany(mappedBy: 'scope', targetEntity: RoleScope::class)]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
private Collection $roleScopes;

View File

@ -82,12 +82,12 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
private int $relatedEntityId;
/**
* @var ArrayCollection<int, EntityWorkflowStep>
* @var Collection<int, EntityWorkflowStep>
*/
#[Assert\Valid(traverse: true)]
#[ORM\OneToMany(mappedBy: 'entityWorkflow', targetEntity: EntityWorkflowStep::class, cascade: ['persist'], orphanRemoval: true)]
#[ORM\OrderBy(['transitionAt' => \Doctrine\Common\Collections\Criteria::ASC, 'id' => 'ASC'])]
private ArrayCollection $steps;
private Collection $steps;
/**
* @var array|EntityWorkflowStep[]|null

View File

@ -26,7 +26,7 @@ class EntityWorkflowStep
private string $accessKey;
/**
* @var Collection<User>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_workflow_entity_step_cc_user')]
@ -42,14 +42,14 @@ class EntityWorkflowStep
private array $destEmail = [];
/**
* @var Collection<User>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_workflow_entity_step_user')]
private Collection $destUser;
/**
* @var Collection<User>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_workflow_entity_step_user_by_accesskey')]

View File

@ -40,13 +40,13 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
private ?AccompanyingPeriod $accompanyingPeriod = null;
/**
* @var Collection<AccompanyingPeriodWorkEvaluation>
* @var Collection<int, AccompanyingPeriodWorkEvaluation>
*
* @internal the serialization for write evaluations is handled in `accompanyingperiodworkdenormalizer`
* @internal the serialization for context docgen:read is handled in `accompanyingperiodworknormalizer`
*/
#[Serializer\Groups(['read'])]
#[ORM\OneToMany(targetEntity: AccompanyingPeriodWorkEvaluation::class, mappedBy: 'accompanyingPeriodWork', cascade: ['remove', 'persist'], orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'accompanyingPeriodWork', targetEntity: AccompanyingPeriodWorkEvaluation::class, cascade: ['remove', 'persist'], orphanRemoval: true)]
#[ORM\OrderBy(['startDate' => \Doctrine\Common\Collections\Criteria::DESC, 'id' => 'DESC'])]
private Collection $accompanyingPeriodWorkEvaluations;
@ -73,10 +73,10 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
private ?\DateTimeImmutable $endDate = null;
/**
* @var Collection<AccompanyingPeriodWorkGoal>
* @var Collection<int, AccompanyingPeriodWorkGoal>
*/
#[Serializer\Groups(['read', 'docgen:read', 'accompanying_period_work:edit'])]
#[ORM\OneToMany(targetEntity: AccompanyingPeriodWorkGoal::class, mappedBy: 'accompanyingPeriodWork', cascade: ['persist'], orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'accompanyingPeriodWork', targetEntity: AccompanyingPeriodWorkGoal::class, cascade: ['persist'], orphanRemoval: true)]
private Collection $goals;
#[Serializer\Groups(['read', 'docgen:read', 'accompanying_period_work:edit'])]
@ -94,7 +94,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
private string $note = '';
/**
* @var Collection<Person>
* @var Collection<int, Person>
*/
#[Serializer\Groups(['read', 'docgen:read', 'read:accompanyingPeriodWork:light', 'accompanying_period_work:edit', 'accompanying_period_work:create'])]
#[ORM\ManyToMany(targetEntity: Person::class)]
@ -112,7 +112,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
private Collection $referrersHistory;
/**
* @var Collection<Result>
* @var Collection<int, \Chill\PersonBundle\Entity\SocialWork\Result>
*/
#[Serializer\Groups(['read', 'docgen:read', 'accompanying_period_work:edit'])]
#[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'accompanyingPeriodWorks')]
@ -129,7 +129,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
private ?\DateTimeImmutable $startDate = null;
/**
* @var Collection<ThirdParty>
* @var Collection<int, ThirdParty>
*/
#[Serializer\Groups(['read', 'docgen:read', 'accompanying_period_work:edit'])]
#[ORM\ManyToMany(targetEntity: ThirdParty::class)]

View File

@ -47,10 +47,10 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
*
* @see{Chill\PersonBundle\Serializer\Normalizer\AccompanyingPeriodWorkEvaluationDenormalizer}
*
* @var Collection<AccompanyingPeriodWorkEvaluationDocument>
* @var Collection<int, AccompanyingPeriodWorkEvaluationDocument>
*/
#[Serializer\Groups(['read'])]
#[ORM\OneToMany(targetEntity: AccompanyingPeriodWorkEvaluationDocument::class, mappedBy: 'accompanyingPeriodWorkEvaluation', cascade: ['remove', 'persist'], orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'accompanyingPeriodWorkEvaluation', targetEntity: AccompanyingPeriodWorkEvaluationDocument::class, cascade: ['remove', 'persist'], orphanRemoval: true)]
#[ORM\OrderBy(['createdAt' => \Doctrine\Common\Collections\Criteria::DESC, 'id' => 'DESC'])]
private Collection $documents;

View File

@ -41,7 +41,7 @@ class AccompanyingPeriodWorkGoal
private string $note = '';
/**
* @var Collection<Result>
* @var Collection<int, Result>
*/
#[Serializer\Groups(['accompanying_period_work:edit', 'read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'accompanyingPeriodWorkGoals')]

View File

@ -29,9 +29,9 @@ class ClosingMotive
/**
* Child Accompanying periods.
*
* @var Collection<ClosingMotive>
* @var Collection<int, ClosingMotive>
*/
#[ORM\OneToMany(targetEntity: ClosingMotive::class, mappedBy: 'parent')]
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: ClosingMotive::class)]
private Collection $children;
#[Serializer\Groups(['docgen:read'])]

View File

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

View File

@ -31,14 +31,14 @@ class Goal
private ?int $id = null;
/**
* @var Collection<Result>
* @var Collection<int, Result>
*/
#[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'goals')]
#[ORM\JoinTable(name: 'chill_person_social_work_goal_result')]
private Collection $results;
/**
* @var Collection<SocialAction>
* @var Collection<int, SocialAction>
*/
#[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'goals')]
private Collection $socialActions;

View File

@ -24,13 +24,13 @@ use Symfony\Component\Serializer\Annotation as Serializer;
class Result
{
/**
* @var Collection<AccompanyingPeriodWorkGoal>
* @var Collection<int, AccompanyingPeriodWorkGoal>
*/
#[ORM\ManyToMany(targetEntity: AccompanyingPeriodWorkGoal::class, mappedBy: 'results')]
private Collection $accompanyingPeriodWorkGoals;
/**
* @var Collection<AccompanyingPeriodWork>
* @var Collection<int, AccompanyingPeriodWork>
*/
#[ORM\ManyToMany(targetEntity: AccompanyingPeriodWork::class, mappedBy: 'results')]
private Collection $accompanyingPeriodWorks;
@ -39,7 +39,7 @@ class Result
private ?\DateTime $desactivationDate = null;
/**
* @var Collection<Goal>
* @var Collection<int, Goal>
*/
#[ORM\ManyToMany(targetEntity: Goal::class, mappedBy: 'results')]
private Collection $goals;
@ -51,7 +51,7 @@ class Result
private ?int $id = null;
/**
* @var Collection<SocialAction>
* @var Collection<int, SocialAction>
*/
#[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'results')]
private Collection $socialActions;

View File

@ -23,9 +23,9 @@ use Symfony\Component\Serializer\Annotation as Serializer;
class SocialAction
{
/**
* @var Collection<SocialAction>
* @var Collection<int, SocialAction>
*/
#[ORM\OneToMany(targetEntity: SocialAction::class, mappedBy: 'parent')]
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: SocialAction::class)]
private Collection $children;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATEINTERVAL, nullable: true)]
@ -35,14 +35,14 @@ class SocialAction
private ?\DateTimeInterface $desactivationDate = null;
/**
* @var Collection<Evaluation>
* @var Collection<int, Evaluation>
*/
#[ORM\ManyToMany(targetEntity: Evaluation::class, inversedBy: 'socialActions')]
#[ORM\JoinTable(name: 'chill_person_social_work_evaluation_action')]
private Collection $evaluations;
/**
* @var Collection<Goal>
* @var Collection<int, Goal>
*/
#[ORM\ManyToMany(targetEntity: Goal::class, inversedBy: 'socialActions')]
#[ORM\JoinTable(name: 'chill_person_social_action_goal')]
@ -63,7 +63,7 @@ class SocialAction
private ?SocialAction $parent = null;
/**
* @var Collection<Result>
* @var Collection<int, Result>
*/
#[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'socialActions')]
#[ORM\JoinTable(name: 'chill_person_social_action_result')]

View File

@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Entity\SocialWork;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
@ -23,33 +24,33 @@ use Symfony\Component\Serializer\Annotation\Groups;
class SocialIssue
{
/**
* @var Collection<SocialIssue>
* @var Collection<int, SocialIssue>
*/
#[ORM\OneToMany(targetEntity: SocialIssue::class, mappedBy: 'parent')]
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: SocialIssue::class)]
private Collection $children;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true)]
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $desactivationDate = null;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\Column(type: Types::INTEGER)]
private ?int $id = null;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, name: 'ordering', options: ['default' => '0.0'])]
#[ORM\Column(name: 'ordering', type: Types::FLOAT, options: ['default' => '0.0'])]
private float $ordering = 0.0;
#[ORM\ManyToOne(targetEntity: SocialIssue::class, inversedBy: 'children')]
private ?SocialIssue $parent = null;
/**
* @var Collection<SocialAction>
* @var Collection<int, SocialAction>
*/
#[ORM\OneToMany(targetEntity: SocialAction::class, mappedBy: 'issue')]
#[ORM\OneToMany(mappedBy: 'issue', targetEntity: SocialAction::class)]
private Collection $socialActions;
#[Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
#[ORM\Column(type: Types::JSON)]
private array $title = [];
public function __construct()

View File

@ -43,9 +43,9 @@ class RecurringTask extends AbstractTask
private $occurenceWarningInterval;
/**
* @var Collection<SingleTask>
* @var Collection<int, SingleTask>
*/
#[ORM\OneToMany(targetEntity: SingleTask::class, mappedBy: 'recurringTask')]
#[ORM\OneToMany(mappedBy: 'recurringTask', targetEntity: SingleTask::class)]
private Collection $singleTasks;
public function __construct()

View File

@ -49,9 +49,9 @@ class SingleTask extends AbstractTask
private ?\DateTime $startDate = null;
/**
* @var Collection<SingleTaskPlaceEvent>
* @var Collection<int, SingleTaskPlaceEvent>
*/
#[ORM\OneToMany(targetEntity: SingleTaskPlaceEvent::class, mappedBy: 'task', cascade: ['remove'])]
#[ORM\OneToMany(mappedBy: 'task', targetEntity: SingleTaskPlaceEvent::class, cascade: ['remove'])]
private Collection $taskPlaceEvents;
#[Serializer\Groups(['read'])]

View File

@ -110,7 +110,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
private ?string $canonicalized = '';
/**
* @var Collection<ThirdPartyCategory>
* @var Collection<int, ThirdPartyCategory>
*/
#[Groups(['docgen:read', 'docgen:read:3party:parent'])]
#[ORM\ManyToMany(targetEntity: ThirdPartyCategory::class)]
@ -119,7 +119,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
private Collection $categories;
/**
* @var Collection<Center>
* @var Collection<int, Center>
*/
#[ORM\ManyToMany(targetEntity: Center::class)]
#[ORM\JoinTable(name: 'chill_3party.party_center')]
@ -128,10 +128,10 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
/**
* Contact Persons: One Institutional ThirdParty has Many Contact Persons.
*
* @var Collection<ThirdParty>
* @var Collection<int, ThirdParty>
*/
#[Assert\Valid(traverse: true)]
#[ORM\OneToMany(targetEntity: ThirdParty::class, mappedBy: 'parent', cascade: ['persist'], orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: ThirdParty::class, cascade: ['persist'], orphanRemoval: true)]
private Collection $children;
#[Context(normalizationContext: ['groups' => 'docgen:read'], groups: ['docgen:read:3party:parent'])]