apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -16,16 +16,17 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
*
* @ORM\Table(
* name="chill_person_household_composition"
* )
*
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
* "household_composition_type": HouseholdCompositionType::class
* })
@@ -43,46 +44,59 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
/**
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
*
* @Assert\GreaterThanOrEqual(propertyPath="startDate", groups={"Default", "household_composition"})
*
* @Serializer\Groups({"docgen:read"})
*/
private ?DateTimeImmutable $endDate = null;
private ?\DateTimeImmutable $endDate = null;
/**
* @ORM\ManyToOne(targetEntity=Household::class, inversedBy="compositions")
*
* @ORM\JoinColumn(nullable=false)
*/
private ?Household $household = null;
/**
* @ORM\ManyToOne(targetEntity=HouseholdCompositionType::class)
*
* @ORM\JoinColumn(nullable=false)
*
* @Serializer\Groups({"docgen:read"})
*/
private ?HouseholdCompositionType $householdCompositionType = null;
private ?HouseholdCompositionType $householdCompositionType = null;
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?int $id = null;
/**
* @ORM\Column(type="integer", nullable=true, options={"default": null})
*
* @Assert\NotNull
*
* @Assert\GreaterThanOrEqual(0, groups={"Default", "household_composition"})
*
* @Serializer\Groups({"docgen:read"})
*/
private ?int $numberOfChildren = null;
/**
* @ORM\Column(type="date_immutable", nullable=false)
*
* @Assert\NotNull(groups={"Default", "household_composition"})
*
* @Serializer\Groups({"docgen:read"})
*/
private ?DateTimeImmutable $startDate = null;
private ?\DateTimeImmutable $startDate = null;
public function __construct()
{
@@ -94,7 +108,7 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
return $this->comment;
}
public function getEndDate(): ?DateTimeImmutable
public function getEndDate(): ?\DateTimeImmutable
{
return $this->endDate;
}
@@ -119,7 +133,7 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
return $this->numberOfChildren;
}
public function getStartDate(): ?DateTimeImmutable
public function getStartDate(): ?\DateTimeImmutable
{
return $this->startDate;
}
@@ -131,7 +145,7 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
return $this;
}
public function setEndDate(?DateTimeImmutable $endDate): HouseholdComposition
public function setEndDate(?\DateTimeImmutable $endDate): HouseholdComposition
{
$this->endDate = $endDate;
@@ -163,7 +177,7 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
return $this;
}
public function setStartDate(?DateTimeImmutable $startDate): HouseholdComposition
public function setStartDate(?\DateTimeImmutable $startDate): HouseholdComposition
{
$this->startDate = $startDate;