mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 04:23:49 +00:00
Apply rector rules: symfony up to 54
This commit is contained in:
@@ -92,11 +92,9 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
* [fr] Sigle.
|
||||
*
|
||||
* @ORM\Column(name="acronym", type="string", length=64, nullable=true)
|
||||
*
|
||||
* @Assert\Length(min="2")
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Assert\Length(min: 2)]
|
||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private ?string $acronym = '';
|
||||
|
||||
/**
|
||||
@@ -112,10 +110,9 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
*
|
||||
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*
|
||||
* @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private ?Address $address = null;
|
||||
|
||||
/**
|
||||
@@ -136,10 +133,9 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
* joinColumns={@ORM\JoinColumn(name="thirdparty_id", referencedColumnName="id")},
|
||||
* inverseJoinColumns={@ORM\JoinColumn(name="category_id", referencedColumnName="id")})
|
||||
*
|
||||
* @Groups({"docgen:read", "docgen:read:3party:parent"})
|
||||
*
|
||||
* @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Groups(['docgen:read', 'docgen:read:3party:parent'])]
|
||||
private Collection $categories;
|
||||
|
||||
/**
|
||||
@@ -158,33 +154,29 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
* cascade={"persist"}, orphanRemoval=true)
|
||||
*
|
||||
* @var Collection<ThirdParty>
|
||||
*
|
||||
* @Assert\Valid(traverse=true)
|
||||
*/
|
||||
#[Assert\Valid(traverse: true)]
|
||||
private Collection $children;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Civility::class)
|
||||
* ORM\JoinColumn(name="civility", referencedColumnName="id", nullable=true)
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*
|
||||
* @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private ?Civility $civility = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="comment", type="text", nullable=true)
|
||||
*
|
||||
* @Groups({"read", "write"})
|
||||
*/
|
||||
#[Groups(['read', 'write'])]
|
||||
private ?string $comment = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="contact_data_anonymous", type="boolean", options={"default": false})
|
||||
*
|
||||
* @Groups({"read", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private bool $contactDataAnonymous = false;
|
||||
|
||||
/**
|
||||
@@ -201,18 +193,15 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="email", type="string", length=255, nullable=true)
|
||||
*
|
||||
* @Assert\Email()
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Assert\Email]
|
||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private ?string $email = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="firstname", type="text", options={"default": ""})
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private ?string $firstname = '';
|
||||
|
||||
/**
|
||||
@@ -221,40 +210,32 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @Groups({"read", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="kind", type="string", length="20", options={"default": ""})
|
||||
*
|
||||
* @Groups({"write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Groups(['write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private string $kind = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="name", type="string", length=255)
|
||||
*
|
||||
* @Assert\Length(min="2")
|
||||
*
|
||||
* @Assert\NotNull
|
||||
*
|
||||
* @Assert\NotBlank
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Assert\Length(min: 2)]
|
||||
#[Assert\NotNull]
|
||||
#[Assert\NotBlank]
|
||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private string $name = '';
|
||||
|
||||
/**
|
||||
* [fr] Raison sociale.
|
||||
*
|
||||
* @ORM\Column(name="name_company", type="string", length=255, nullable=true)
|
||||
*
|
||||
* @Assert\Length(min="3")
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Assert\Length(min: 3)]
|
||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private ?string $nameCompany = '';
|
||||
|
||||
/**
|
||||
@@ -264,10 +245,9 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
*
|
||||
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read"})
|
||||
*
|
||||
* @Context(normalizationContext={"groups": "docgen:read:3party:parent"}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Groups(['read', 'write', 'docgen:read'])]
|
||||
private ?ThirdParty $parent = null;
|
||||
|
||||
/**
|
||||
@@ -275,19 +255,17 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
*
|
||||
* @ORM\Column(name="profession", type="text", nullable=false)
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*
|
||||
* @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private string $profession = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="telephone", type="phone_number", nullable=true)
|
||||
*
|
||||
* @PhonenumberConstraint(type="any")
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
private ?PhoneNumber $telephone = null;
|
||||
|
||||
/**
|
||||
@@ -546,9 +524,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
return $this->updatedBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Groups({"read", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||
public function isChild(): bool
|
||||
{
|
||||
return null !== $this->parent;
|
||||
|
Reference in New Issue
Block a user