mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -15,11 +15,11 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table("chill_person_accompanying_period_user_history")
|
||||
*/
|
||||
class UserHistory implements TrackCreationInterface
|
||||
@@ -29,11 +29,13 @@ class UserHistory implements TrackCreationInterface
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null})
|
||||
*/
|
||||
private ?DateTimeImmutable $endDate = null;
|
||||
private ?\DateTimeImmutable $endDate = null;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private ?int $id = null;
|
||||
@@ -41,11 +43,13 @@ class UserHistory implements TrackCreationInterface
|
||||
public function __construct(
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="userHistories")
|
||||
*
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
private ?\Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingPeriod,
|
||||
private ?AccompanyingPeriod $accompanyingPeriod,
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=User::class)
|
||||
*
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
private User $user,
|
||||
@@ -53,7 +57,7 @@ class UserHistory implements TrackCreationInterface
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=false, options={"default": "now()"})
|
||||
*/
|
||||
private DateTimeImmutable $startDate = new DateTimeImmutable('now')
|
||||
private \DateTimeImmutable $startDate = new \DateTimeImmutable('now')
|
||||
) {}
|
||||
|
||||
public function getAccompanyingPeriod(): AccompanyingPeriod
|
||||
@@ -61,7 +65,7 @@ class UserHistory implements TrackCreationInterface
|
||||
return $this->accompanyingPeriod;
|
||||
}
|
||||
|
||||
public function getEndDate(): ?DateTimeImmutable
|
||||
public function getEndDate(): ?\DateTimeImmutable
|
||||
{
|
||||
return $this->endDate;
|
||||
}
|
||||
@@ -71,7 +75,7 @@ class UserHistory implements TrackCreationInterface
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getStartDate(): DateTimeImmutable
|
||||
public function getStartDate(): \DateTimeImmutable
|
||||
{
|
||||
return $this->startDate;
|
||||
}
|
||||
@@ -81,7 +85,7 @@ class UserHistory implements TrackCreationInterface
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
public function setEndDate(?DateTimeImmutable $endDate): UserHistory
|
||||
public function setEndDate(?\DateTimeImmutable $endDate): UserHistory
|
||||
{
|
||||
$this->endDate = $endDate;
|
||||
|
||||
|
Reference in New Issue
Block a user