Apply rector rules: add annotation for doctrine mapping

This commit is contained in:
2024-04-05 00:19:30 +02:00
parent 72016e1a21
commit a3f775a69b
23 changed files with 39 additions and 93 deletions

View File

@@ -20,11 +20,9 @@ use Symfony\Component\Serializer\Annotation as Serializer;
#[ORM\Table(name: 'chill_main_civility')]
class Civility
{
/**
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
*/
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
private array $abbreviation = [];
#[Serializer\Groups(['read'])]
@@ -38,11 +36,9 @@ class Civility
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null;
/**
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
*/
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
private array $name = [];
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, name: 'ordering', nullable: true, options: ['default' => '0.0'])]

View File

@@ -28,11 +28,9 @@ use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Table(name: 'country')]
class Country
{
/**
* @Context({"is-translatable": true}, groups={"docgen:read"})
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 3)]
#[Context(['is-translatable' => true], groups: ['docgen:read'])]
private string $countryCode = '';
@@ -45,11 +43,10 @@ class Country
/**
* @var array<string, string>
*
*
* @Context({"is-translatable": true}, groups={"docgen:read"})
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
#[Context(['is-translatable' => true], groups: ['docgen:read'])]
private array $name = [];
public function getCountryCode(): string

View File

@@ -36,11 +36,10 @@ class Language
/**
* @var string array
*
*
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
*/
#[Serializer\Groups(['docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
private array $name = [];
/**

View File

@@ -65,11 +65,9 @@ class LocationType
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null;
/**
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
*/
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
private array $title = [];
public function getActive(): ?bool

View File

@@ -38,11 +38,10 @@ class Scope
/**
* translatable names.
*
*
* @Context({"is-translatable": true}, groups={"docgen:read"})
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
#[Context(['is-translatable' => true], groups: ['docgen:read'])]
private array $name = [];
/**

View File

@@ -33,11 +33,10 @@ class UserJob
/**
* @var array<string, string>
*
*
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
*/
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Column(name: 'label', type: \Doctrine\DBAL\Types\Types::JSON)]
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
protected array $label = [];
public function getId(): ?int