mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -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'])]
|
||||
|
@@ -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
|
||||
|
@@ -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 = [];
|
||||
|
||||
/**
|
||||
|
@@ -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
|
||||
|
@@ -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 = [];
|
||||
|
||||
/**
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user