Rector: apply rules for doctrine code quality

This commit is contained in:
2023-08-31 10:35:52 +02:00
parent bc9b7b1776
commit e4e52234ad
32 changed files with 74 additions and 92 deletions

View File

@@ -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;