mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Apply rector changes to Collection typing
This commit is contained in:
@@ -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)]
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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')]
|
||||
|
@@ -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'])]
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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')]
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user