Apply rector rules: add annotation for doctrine mapping

This commit is contained in:
2024-04-05 13:11:42 +02:00
parent a3f775a69b
commit 0ff4593863
118 changed files with 143 additions and 658 deletions

View File

@@ -11,13 +11,11 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Entity\SocialWork;
use DateInterval;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['social_work_evaluation' => Evaluation::class])]
#[ORM\Entity]
#[ORM\Table(name: 'chill_person_social_work_evaluation')]
@@ -30,7 +28,6 @@ class Evaluation
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATEINTERVAL, nullable: true, options: ['default' => null])]
private ?\DateInterval $delay = null;
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id]
#[ORM\GeneratedValue]

View File

@@ -16,7 +16,6 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['social_work_goal' => Goal::class])]
#[ORM\Entity]
#[ORM\Table(name: 'chill_person_social_work_goal')]
@@ -25,7 +24,6 @@ class Goal
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $desactivationDate = null;
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id]
#[ORM\GeneratedValue]
@@ -34,8 +32,6 @@ class Goal
/**
* @var Collection<Result>
*
*
*/
#[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'goals')]
#[ORM\JoinTable(name: 'chill_person_social_work_goal_result')]

View File

@@ -13,13 +13,11 @@ namespace Chill\PersonBundle\Entity\SocialWork;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkGoal;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['social_work_result' => Result::class])]
#[ORM\Entity]
#[ORM\Table(name: 'chill_person_social_work_result')]
@@ -46,7 +44,6 @@ class Result
#[ORM\ManyToMany(targetEntity: Goal::class, mappedBy: 'results')]
private Collection $goals;
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id]
#[ORM\GeneratedValue]

View File

@@ -11,14 +11,12 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Entity\SocialWork;
use DateInterval;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['social_work_social_action' => SocialAction::class])]
#[ORM\Entity]
#[ORM\Table(name: 'chill_person_social_action')]
@@ -38,8 +36,6 @@ class SocialAction
/**
* @var Collection<Evaluation>
*
*
*/
#[ORM\ManyToMany(targetEntity: Evaluation::class, inversedBy: 'socialActions')]
#[ORM\JoinTable(name: 'chill_person_social_work_evaluation_action')]
@@ -47,14 +43,11 @@ class SocialAction
/**
* @var Collection<Goal>
*
*
*/
#[ORM\ManyToMany(targetEntity: Goal::class, inversedBy: 'socialActions')]
#[ORM\JoinTable(name: 'chill_person_social_action_goal')]
private Collection $goals;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
@@ -71,8 +64,6 @@ class SocialAction
/**
* @var Collection<Result>
*
*
*/
#[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'socialActions')]
#[ORM\JoinTable(name: 'chill_person_social_action_result')]

View File

@@ -17,7 +17,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
#[DiscriminatorMap(typeProperty: 'type', mapping: ['social_issue' => SocialIssue::class])]
#[ORM\Entity]
#[ORM\Table(name: 'chill_person_social_issue')]
@@ -32,7 +31,6 @@ class SocialIssue
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $desactivationDate = null;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]