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

@@ -20,7 +20,6 @@ use libphonenumber\PhoneNumber;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
#[DiscriminatorMap(typeProperty: 'type', mapping: ['location' => Location::class])]
#[ORM\Entity(repositoryClass: LocationRepository::class)]
#[ORM\Table(name: 'chill_main_location')]
@@ -30,7 +29,6 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: true)]
private bool $active = true;
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: Address::class, cascade: ['persist'])]
#[ORM\JoinColumn(nullable: true)]
@@ -52,14 +50,12 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255, nullable: true)]
private ?string $email = null;
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null;
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: LocationType::class)]
#[ORM\JoinColumn(nullable: false)]