mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
Rector: apply rules for doctrine code quality
This commit is contained in:
@@ -45,7 +45,7 @@ class Event implements HasCenterInterface, HasScopeInterface
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private ?\DateTime $date = null;
|
||||
private ?\DateTime $date;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
@@ -54,19 +54,17 @@ class Event implements HasCenterInterface, HasScopeInterface
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var User
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
|
||||
*/
|
||||
private $moderator;
|
||||
private ?\Chill\MainBundle\Entity\User $moderator = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=150)
|
||||
*/
|
||||
private $name;
|
||||
private ?string $name = null;
|
||||
|
||||
/**
|
||||
* @var Collection<Participation>
|
||||
@@ -137,10 +135,7 @@ class Event implements HasCenterInterface, HasScopeInterface
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getModerator()
|
||||
public function getModerator(): User|null
|
||||
{
|
||||
return $this->moderator;
|
||||
}
|
||||
@@ -235,12 +230,7 @@ class Event implements HasCenterInterface, HasScopeInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $moderator
|
||||
*
|
||||
* @return Event
|
||||
*/
|
||||
public function setModerator($moderator)
|
||||
public function setModerator(User $moderator): self
|
||||
{
|
||||
$this->moderator = $moderator;
|
||||
|
||||
|
Reference in New Issue
Block a user