cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,9 +1,17 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\CalendarBundle\Entity;
use Chill\CalendarBundle\Repository\CalendarRangeRepository;
use Chill\MainBundle\Entity\User;
use DateTimeImmutable;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
@@ -15,6 +23,18 @@ use Symfony\Component\Serializer\Annotation\Groups;
*/
class CalendarRange
{
/**
* @ORM\OneToMany(targetEntity=Calendar::class,
* mappedBy="calendarRange")
*/
private Collection $calendars;
/**
* @ORM\Column(type="datetimetz_immutable")
* @groups({"read", "write"})
*/
private ?DateTimeImmutable $endDate = null;
/**
* @ORM\Id
* @ORM\GeneratedValue
@@ -23,30 +43,18 @@ class CalendarRange
*/
private $id;
/**
* @ORM\Column(type="datetimetz_immutable")
* @groups({"read", "write"})
*/
private ?DateTimeImmutable $startDate = null;
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
* @groups({"read", "write"})
*/
private ?User $user = null;
/**
* @ORM\Column(type="datetimetz_immutable")
* @groups({"read", "write"})
*/
private ?\DateTimeImmutable $startDate = null;
/**
* @ORM\Column(type="datetimetz_immutable")
* @groups({"read", "write"})
*/
private ?\DateTimeImmutable $endDate = null;
/**
* @ORM\OneToMany(targetEntity=Calendar::class,
* mappedBy="calendarRange")
*/
private Collection $calendars;
//TODO Lieu
public function __construct()
@@ -54,38 +62,38 @@ class CalendarRange
$this->calendars = new ArrayCollection();
}
public function getEndDate(): ?DateTimeImmutable
{
return $this->endDate;
}
public function getId(): ?int
{
return $this->id;
}
public function getStartDate(): ?\DateTimeImmutable
public function getStartDate(): ?DateTimeImmutable
{
return $this->startDate;
}
public function setStartDate(\DateTimeImmutable $startDate): self
public function getUser(): ?User
{
$this->startDate = $startDate;
return $this;
return $this->user;
}
public function getEndDate(): ?\DateTimeImmutable
{
return $this->endDate;
}
public function setEndDate(\DateTimeImmutable $endDate): self
public function setEndDate(DateTimeImmutable $endDate): self
{
$this->endDate = $endDate;
return $this;
}
public function getUser(): ?User
public function setStartDate(DateTimeImmutable $startDate): self
{
return $this->user;
$this->startDate = $startDate;
return $this;
}
public function setUser(?User $user): self
@@ -94,6 +102,4 @@ class CalendarRange
return $this;
}
}