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

@@ -24,9 +24,6 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Validator\Constraints as Assert;
/**
*
*
*
* @RelationshipNoDuplicate
*/
#[DiscriminatorMap(typeProperty: 'type', mapping: ['relationship' => Relationship::class])]
@@ -38,26 +35,22 @@ class Relationship implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE)]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)]
private ?User $createdBy = null;
#[Assert\NotNull]
#[Serializer\Groups(['read', 'write'])]
#[ORM\ManyToOne(targetEntity: Person::class)]
#[ORM\JoinColumn(nullable: false)]
private ?Person $fromPerson = null;
#[Serializer\Groups(['read'])]
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null;
#[Assert\NotNull]
#[Serializer\Groups(['read', 'write'])]
#[ORM\ManyToOne(targetEntity: Relation::class)]
@@ -69,7 +62,6 @@ class Relationship implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $reverse;
#[Assert\NotNull]
#[Serializer\Groups(['read', 'write'])]
#[ORM\ManyToOne(targetEntity: Person::class)]