mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Apply rector rules: symfony up to 54
This commit is contained in:
@@ -57,60 +57,52 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=AddressReference::class)
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private ?AddressReference $addressReference = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private string $buildingName = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default": false})
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private bool $confidential = false;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private string $corridor = '';
|
||||
|
||||
/**
|
||||
* used for the CEDEX information.
|
||||
*
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private string $distribution = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private string $extra = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private string $flat = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private string $floor = '';
|
||||
|
||||
/**
|
||||
@@ -140,19 +132,17 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*
|
||||
* @readonly
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* True if the address is a "no address", aka homeless person, ...
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*
|
||||
* @ORM\Column(type="boolean", options={"default": false})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private bool $isNoAddress = false;
|
||||
|
||||
/**
|
||||
@@ -160,28 +150,25 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty")
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*
|
||||
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private ?ThirdParty $linkedToThirdParty = null;
|
||||
|
||||
/**
|
||||
* A geospatial field storing the coordinates of the Address.
|
||||
*
|
||||
* @ORM\Column(type="point", nullable=true)
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private ?Point $point = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
|
||||
*
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private ?PostalCode $postcode = null;
|
||||
|
||||
/**
|
||||
@@ -198,23 +185,20 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private string $steps = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private string $street = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private string $streetNumber = '';
|
||||
|
||||
/**
|
||||
@@ -222,9 +206,8 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
* of address. By default, the current date.
|
||||
*
|
||||
* @ORM\Column(type="date")
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private \DateTime $validFrom;
|
||||
|
||||
/**
|
||||
@@ -232,9 +215,8 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
* of address.
|
||||
*
|
||||
* @ORM\Column(type="date", nullable=true)
|
||||
*
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
private ?\DateTime $validTo = null;
|
||||
|
||||
public function __construct()
|
||||
|
@@ -42,16 +42,14 @@ class AddressReference
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true)
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private ?\DateTimeImmutable $createdAt = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true)
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private ?\DateTimeImmutable $deletedAt = null;
|
||||
|
||||
/**
|
||||
@@ -60,67 +58,58 @@ class AddressReference
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private string $municipalityCode = '';
|
||||
|
||||
/**
|
||||
* A geospatial field storing the coordinates of the Address.
|
||||
*
|
||||
* @ORM\Column(type="point")
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private ?Point $point = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private ?PostalCode $postcode = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private string $refId = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private string $source = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private string $street = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private string $streetNumber = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true)
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private ?\DateTimeImmutable $updatedAt = null;
|
||||
|
||||
public function getCreatedAt(): ?\DateTimeImmutable
|
||||
|
@@ -39,16 +39,14 @@ class Center implements HasCenterInterface, \Stringable
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['docgen:read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
*
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['docgen:read'])]
|
||||
private string $name = '';
|
||||
|
||||
/**
|
||||
|
@@ -18,25 +18,22 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
* @ORM\Table(name="chill_main_civility")
|
||||
*
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={"chill_main_civility": Civility::class})
|
||||
*/
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['chill_main_civility' => Civility::class])]
|
||||
class Civility
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
private array $abbreviation = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private bool $active = true;
|
||||
|
||||
/**
|
||||
@@ -45,18 +42,16 @@ class Civility
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
private array $name = [];
|
||||
|
||||
/**
|
||||
|
@@ -31,10 +31,9 @@ class Country
|
||||
/**
|
||||
* @ORM\Column(type="string", length=3)
|
||||
*
|
||||
* @groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
private string $countryCode = '';
|
||||
|
||||
/**
|
||||
@@ -43,9 +42,8 @@ class Country
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
@@ -53,10 +51,9 @@ class Country
|
||||
*
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
private array $name = [];
|
||||
|
||||
public function getCountryCode(): string
|
||||
|
@@ -28,27 +28,22 @@ class DashboardConfigItem
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Serializer\Groups({"dashboardConfigItem:read", "read"})
|
||||
*/
|
||||
#[Serializer\Groups(['dashboardConfigItem:read', 'read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string")
|
||||
*
|
||||
* @Serializer\Groups({"dashboardConfigItem:read", "read"})
|
||||
*
|
||||
* @Assert\NotNull
|
||||
*/
|
||||
#[Serializer\Groups(['dashboardConfigItem:read', 'read'])]
|
||||
#[Assert\NotNull]
|
||||
private string $type = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string")
|
||||
*
|
||||
* @Serializer\Groups({"dashboardConfigItem:read", "read"})
|
||||
*
|
||||
* @Assert\NotNull
|
||||
*/
|
||||
#[Serializer\Groups(['dashboardConfigItem:read', 'read'])]
|
||||
#[Assert\NotNull]
|
||||
private string $position = '';
|
||||
|
||||
/**
|
||||
@@ -58,9 +53,8 @@ class DashboardConfigItem
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json", options={"default": "[]", "jsonb": true})
|
||||
*
|
||||
* @Serializer\Groups({"dashboardConfigItem:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['dashboardConfigItem:read'])]
|
||||
private array $metadata = [];
|
||||
|
||||
public function getId(): ?int
|
||||
|
@@ -25,33 +25,29 @@ class SimpleGeographicalUnitDTO
|
||||
* @readonly
|
||||
*
|
||||
* @psalm-readonly
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
public int $id,
|
||||
/**
|
||||
* @readonly
|
||||
*
|
||||
* @psalm-readonly
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
public string $unitName,
|
||||
/**
|
||||
* @readonly
|
||||
*
|
||||
* @psalm-readonly
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
public string $unitRefId,
|
||||
/**
|
||||
* @readonly
|
||||
*
|
||||
* @psalm-readonly
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
public int $layerId
|
||||
) {}
|
||||
}
|
||||
|
@@ -32,23 +32,20 @@ class GeographicalUnitLayer
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json", nullable=false, options={"default": "[]"})
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private array $name = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private string $refId = '';
|
||||
|
||||
/**
|
||||
|
@@ -31,9 +31,8 @@ class Language
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\Column(type="string")
|
||||
*
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['docgen:read'])]
|
||||
private ?string $id = null;
|
||||
|
||||
/**
|
||||
@@ -41,10 +40,9 @@ class Language
|
||||
*
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['docgen:read'])]
|
||||
private array $name = [];
|
||||
|
||||
/**
|
||||
|
@@ -24,55 +24,46 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
* @ORM\Table(name="chill_main_location")
|
||||
*
|
||||
* @ORM\Entity(repositoryClass=LocationRepository::class)
|
||||
*
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "location": Location::class
|
||||
* })
|
||||
*/
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['location' => Location::class])]
|
||||
class Location implements TrackCreationInterface, TrackUpdateInterface
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="boolean", nullable=true)
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private bool $active = true;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Address::class, cascade={"persist"})
|
||||
*
|
||||
* @ORM\JoinColumn(nullable=true)
|
||||
*
|
||||
* @Serializer\Groups({"read", "write", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
|
||||
private ?Address $address = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private bool $availableForUsers = false;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true)
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private ?\DateTimeImmutable $createdAt = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=User::class)
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private ?User $createdBy = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*
|
||||
* @Serializer\Groups({"read", "write", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
|
||||
private ?string $email = null;
|
||||
|
||||
/**
|
||||
@@ -81,57 +72,50 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=LocationType::class)
|
||||
*
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*
|
||||
* @Serializer\Groups({"read", "write", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
|
||||
private ?LocationType $locationType = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*
|
||||
* @Serializer\Groups({"read", "write", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
|
||||
private ?string $name = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="phone_number", nullable=true)
|
||||
*
|
||||
* @Serializer\Groups({"read", "write", "docgen:read"})
|
||||
*
|
||||
* @PhonenumberConstraint(type="any")
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
|
||||
private ?PhoneNumber $phonenumber1 = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="phone_number", nullable=true)
|
||||
*
|
||||
* @Serializer\Groups({"read", "write", "docgen:read"})
|
||||
*
|
||||
* @PhonenumberConstraint(type="any")
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
|
||||
private ?PhoneNumber $phonenumber2 = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true)
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private ?\DateTimeImmutable $updatedAt = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=User::class)
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private ?User $updatedBy = null;
|
||||
|
||||
public function getActive(): ?bool
|
||||
|
@@ -21,13 +21,9 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
* @ORM\Table(name="chill_main_location_type")
|
||||
*
|
||||
* @ORM\Entity(repositoryClass=LocationTypeRepository::class)
|
||||
*
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "location-type": LocationType::class
|
||||
* })
|
||||
*
|
||||
* @UniqueEntity({"defaultFor"})
|
||||
*/
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['location-type' => LocationType::class])]
|
||||
#[UniqueEntity(['defaultFor'])]
|
||||
class LocationType
|
||||
{
|
||||
final public const DEFAULT_FOR_3PARTY = 'thirdparty';
|
||||
@@ -42,44 +38,38 @@ class LocationType
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", nullable=true)
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private bool $active = true;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=32, options={"default": "optional"})
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private string $addressRequired = self::STATUS_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private bool $availableForUsers = true;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=32, options={"default": "optional"})
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private string $contactData = self::STATUS_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=true, length=32, unique=true)
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private ?string $defaultFor = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
private bool $editableByUsers = true;
|
||||
|
||||
/**
|
||||
@@ -88,18 +78,16 @@ class LocationType
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
private array $title = [];
|
||||
|
||||
public function getActive(): ?bool
|
||||
|
@@ -36,49 +36,38 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text")
|
||||
*
|
||||
* @Groups({"read"})
|
||||
*
|
||||
* @Assert\NotBlank
|
||||
*
|
||||
* @Assert\NotNull
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
#[Assert\NotBlank]
|
||||
#[Assert\NotNull]
|
||||
private string $title = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text")
|
||||
*
|
||||
* @Groups({"read"})
|
||||
*
|
||||
* @Assert\NotBlank
|
||||
*
|
||||
* @Assert\NotNull
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
#[Assert\NotBlank]
|
||||
#[Assert\NotNull]
|
||||
private string $content = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="date_immutable", nullable=false)
|
||||
*
|
||||
* @Assert\NotNull
|
||||
*
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
#[Assert\NotNull]
|
||||
#[Groups(['read'])]
|
||||
private ?\DateTimeImmutable $startDate = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
|
||||
*
|
||||
* @Assert\GreaterThanOrEqual(propertyPath="startDate")
|
||||
*
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
#[Assert\GreaterThanOrEqual(propertyPath: 'startDate')]
|
||||
#[Groups(['read'])]
|
||||
private ?\DateTimeImmutable $endDate = null;
|
||||
|
||||
public function getTitle(): string
|
||||
|
@@ -116,9 +116,8 @@ class Notification implements TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", options={"default": ""})
|
||||
*
|
||||
* @Assert\NotBlank(message="notification.Title must be defined")
|
||||
*/
|
||||
#[Assert\NotBlank(message: 'notification.Title must be defined')]
|
||||
private string $title = '';
|
||||
|
||||
/**
|
||||
@@ -187,10 +186,9 @@ class Notification implements TrackUpdateInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @Assert\Callback
|
||||
*
|
||||
* @param array $payload
|
||||
*/
|
||||
#[Assert\Callback]
|
||||
public function assertCountAddresses(ExecutionContextInterface $context, $payload): void
|
||||
{
|
||||
if (0 === (\count($this->getAddressesEmails()) + \count($this->getAddressees()))) {
|
||||
|
@@ -29,9 +29,8 @@ class NotificationComment implements TrackCreationInterface, TrackUpdateInterfac
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="text")
|
||||
*
|
||||
* @Assert\NotBlank(message="notification.Comment content might not be blank")
|
||||
*/
|
||||
#[Assert\NotBlank(message: 'notification.Comment content might not be blank')]
|
||||
private string $content = '';
|
||||
|
||||
/**
|
||||
|
@@ -56,23 +56,20 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="point", nullable=true)
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private ?Point $center = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=100)
|
||||
*
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
#[Groups(['write', 'read'])]
|
||||
private ?string $code = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country")
|
||||
*
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
#[Groups(['write', 'read'])]
|
||||
private ?Country $country = null;
|
||||
|
||||
/**
|
||||
@@ -86,37 +83,32 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
#[Groups(['write', 'read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, name="label")
|
||||
*
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
#[Groups(['write', 'read'])]
|
||||
private ?string $name = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="origin", type="integer", nullable=true)
|
||||
*
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
#[Groups(['write', 'read'])]
|
||||
private int $origin = 0;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private ?string $postalCodeSource = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
private ?string $refPostalCodeId = null;
|
||||
|
||||
public function getCenter(): ?Point
|
||||
|
@@ -33,9 +33,8 @@ class SavedExport implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Assert\NotBlank
|
||||
*/
|
||||
#[Assert\NotBlank]
|
||||
private string $description = '';
|
||||
|
||||
/**
|
||||
@@ -59,9 +58,8 @@ class SavedExport implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @Assert\NotBlank
|
||||
*/
|
||||
#[Assert\NotBlank]
|
||||
private string $title = '';
|
||||
|
||||
/**
|
||||
|
@@ -24,11 +24,8 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
||||
* @ORM\Table(name="scopes")
|
||||
*
|
||||
* @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="acl_cache_region")
|
||||
*
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "scope": Scope::class
|
||||
* })
|
||||
*/
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['scope' => Scope::class])]
|
||||
class Scope
|
||||
{
|
||||
/**
|
||||
@@ -42,9 +39,8 @@ class Scope
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
@@ -52,10 +48,9 @@ class Scope
|
||||
*
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
private array $name = [];
|
||||
|
||||
/**
|
||||
|
@@ -33,11 +33,8 @@ use Chill\MainBundle\Validation\Constraint\PhonenumberConstraint;
|
||||
* @ORM\Table(name="users")
|
||||
*
|
||||
* @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="acl_cache_region")
|
||||
*
|
||||
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "user": User::class
|
||||
* })
|
||||
*/
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['user' => User::class])]
|
||||
class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInterface
|
||||
{
|
||||
/**
|
||||
|
@@ -18,11 +18,8 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table("chill_main_user_job")
|
||||
*
|
||||
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "user_job": UserJob::class
|
||||
* })
|
||||
*/
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['user_job' => UserJob::class])]
|
||||
class UserJob
|
||||
{
|
||||
/**
|
||||
@@ -36,9 +33,8 @@ class UserJob
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
protected ?int $id = null;
|
||||
|
||||
/**
|
||||
@@ -46,10 +42,9 @@ class UserJob
|
||||
*
|
||||
* @ORM\Column(name="label", type="json")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
protected array $label = [];
|
||||
|
||||
public function getId(): ?int
|
||||
|
@@ -29,11 +29,8 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
* @ORM\Table("chill_main_workflow_entity")
|
||||
*
|
||||
* @EntityWorkflowCreation(groups={"creation"})
|
||||
*
|
||||
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "entity_workflow": EntityWorkflow::class
|
||||
* })
|
||||
*/
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['entity_workflow' => EntityWorkflow::class])]
|
||||
class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
{
|
||||
use TrackCreationTrait;
|
||||
@@ -100,10 +97,9 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
*
|
||||
* @ORM\OrderBy({"transitionAt": "ASC", "id": "ASC"})
|
||||
*
|
||||
* @Assert\Valid(traverse=true)
|
||||
*
|
||||
* @var Collection<EntityWorkflowStep>
|
||||
*/
|
||||
#[Assert\Valid(traverse: true)]
|
||||
private Collection $steps;
|
||||
|
||||
/**
|
||||
|
@@ -413,9 +413,7 @@ class EntityWorkflowStep
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Assert\Callback
|
||||
*/
|
||||
#[Assert\Callback]
|
||||
public function validateOnCreation(ExecutionContextInterface $context, mixed $payload): void
|
||||
{
|
||||
return;
|
||||
|
Reference in New Issue
Block a user