mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +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;
|
||||
|
||||
|
@@ -26,9 +26,9 @@ class EventType
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
* @ORM\Column(type="boolean")
|
||||
* @ORM\Column(type="boolean", nullable=false)
|
||||
*/
|
||||
private $active;
|
||||
private bool $active = true;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
@@ -37,7 +37,7 @@ class EventType
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
@@ -48,7 +48,7 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
|
@@ -24,9 +24,9 @@ class Role
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
* @ORM\Column(type="boolean")
|
||||
* @ORM\Column(type="boolean", nullable=false)
|
||||
*/
|
||||
private $active;
|
||||
private bool $active = true;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
@@ -35,7 +35,7 @@ class Role
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
@@ -24,9 +24,9 @@ class Status
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
* @ORM\Column(type="boolean")
|
||||
* @ORM\Column(type="boolean", nullable=false)
|
||||
*/
|
||||
private $active;
|
||||
private bool $active = true;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
@@ -35,7 +35,7 @@ class Status
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
Reference in New Issue
Block a user