mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
Apply rector rules: symfony up to 54
This commit is contained in:
@@ -27,40 +27,30 @@ class HouseholdMember
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
private ?string $comment = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Assert\GreaterThanOrEqual(
|
||||
* propertyPath="startDate",
|
||||
* message="household_membership.The end date must be after start date",
|
||||
* groups={"household_memberships"}
|
||||
* )
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[Assert\GreaterThanOrEqual(propertyPath: 'startDate', message: 'household_membership.The end date must be after start date', groups: ['household_memberships'])]
|
||||
private ?\DateTimeImmutable $endDate = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default": false})
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
private bool $holder = false;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity="\Chill\PersonBundle\Entity\Household\Household"
|
||||
* )
|
||||
*
|
||||
* @Assert\Valid(groups={"household_memberships"})
|
||||
*
|
||||
* @Assert\NotNull(groups={"household_memberships"})
|
||||
*/
|
||||
#[Assert\Valid(groups: ['household_memberships'])]
|
||||
#[Assert\NotNull(groups: ['household_memberships'])]
|
||||
private ?Household $household = null;
|
||||
|
||||
/**
|
||||
@@ -69,9 +59,8 @@ class HouseholdMember
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
@@ -79,21 +68,17 @@ class HouseholdMember
|
||||
* targetEntity="\Chill\PersonBundle\Entity\Person"
|
||||
* )
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"docgen:person:with-household": false})
|
||||
*
|
||||
* @Assert\Valid(groups={"household_memberships"})
|
||||
*
|
||||
* @Assert\NotNull(groups={"household_memberships"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[Assert\Valid(groups: ['household_memberships'])]
|
||||
#[Assert\NotNull(groups: ['household_memberships'])]
|
||||
private ?Person $person = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Position::class)
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
private ?Position $position = null;
|
||||
|
||||
/**
|
||||
@@ -103,11 +88,9 @@ class HouseholdMember
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Assert\NotNull(groups={"household_memberships"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[Assert\NotNull(groups: ['household_memberships'])]
|
||||
private ?\DateTimeImmutable $startDate = null;
|
||||
|
||||
public function getComment(): ?string
|
||||
@@ -140,9 +123,7 @@ class HouseholdMember
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
public function getShareHousehold(): ?bool
|
||||
{
|
||||
return $this->shareHousehold;
|
||||
|
Reference in New Issue
Block a user