Rector changes and immplementations of required methods

This commit is contained in:
2025-05-22 17:47:07 +02:00
parent 053b92b77c
commit 17db59d221
1138 changed files with 2656 additions and 2616 deletions

View File

@@ -129,7 +129,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
/**
* @return Center
*/
public function getCenter()
public function getCenter(): ?\Chill\MainBundle\Entity\Center
{
return $this->center;
}
@@ -137,7 +137,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
/**
* @return Scope
*/
public function getCircle()
public function getCircle(): ?\Chill\MainBundle\Entity\Scope
{
return $this->circle;
}
@@ -147,7 +147,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
*
* @return \DateTime
*/
public function getDate()
public function getDate(): ?\DateTime
{
return $this->date;
}
@@ -157,7 +157,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
*
* @return int
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}
@@ -172,7 +172,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
*
* @return string
*/
public function getName()
public function getName(): ?string
{
return $this->name;
}
@@ -202,7 +202,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
*
* @return Scope
*/
public function getScope()
public function getScope(): ?\Chill\MainBundle\Entity\Scope
{
return $this->getCircle();
}
@@ -210,7 +210,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
/**
* @return EventType
*/
public function getType()
public function getType(): ?\Chill\EventBundle\Entity\EventType
{
return $this->type;
}
@@ -218,7 +218,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
/**
* Remove participation.
*/
public function removeParticipation(Participation $participation)
public function removeParticipation(Participation $participation): void
{
$this->participations->removeElement($participation);
}

View File

@@ -87,7 +87,7 @@ class EventType
*
* @return bool
*/
public function getActive()
public function getActive(): bool
{
return $this->active;
}
@@ -97,7 +97,7 @@ class EventType
*
* @return int
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}
@@ -112,7 +112,7 @@ class EventType
return $this->name;
}
public function getRoles()
public function getRoles(): \Doctrine\Common\Collections\Collection
{
return $this->roles;
}
@@ -122,7 +122,7 @@ class EventType
*
* @return Collection
*/
public function getStatuses()
public function getStatuses(): \Doctrine\Common\Collections\Collection
{
return $this->statuses;
}
@@ -130,7 +130,7 @@ class EventType
/**
* Remove role.
*/
public function removeRole(Role $role)
public function removeRole(Role $role): void
{
$this->roles->removeElement($role);
}
@@ -138,7 +138,7 @@ class EventType
/**
* Remove status.
*/
public function removeStatus(Status $status)
public function removeStatus(Status $status): void
{
$this->statuses->removeElement($status);
}

View File

@@ -58,7 +58,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
#[ORM\ManyToOne(targetEntity: Status::class)]
private ?Status $status = null;
public function getCenter()
public function getCenter(): ?\Chill\MainBundle\Entity\Center
{
if (null === $this->getEvent()) {
throw new \RuntimeException('The event is not linked with this instance. You should initialize the event with a valid center before.');
@@ -88,7 +88,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
*
* @return \DateTimeInterface|null
*/
public function getLastUpdate()
public function getLastUpdate(): ?\DateTimeInterface
{
return $this->getUpdatedAt();
}
@@ -98,7 +98,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
*
* @return Person
*/
public function getPerson()
public function getPerson(): ?\Chill\PersonBundle\Entity\Person
{
return $this->person;
}
@@ -114,7 +114,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
/**
* @return Scope
*/
public function getScope()
public function getScope(): ?\Chill\MainBundle\Entity\Scope
{
if (null === $this->getEvent()) {
throw new \RuntimeException('The event is not linked with this instance. You should initialize the event with a valid center before.');
@@ -137,7 +137,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
* - the role can be associated with this event type
* - the status can be associated with this event type
*/
public function isConsistent(ExecutionContextInterface $context)
public function isConsistent(ExecutionContextInterface $context): void
{
if (null === $this->getEvent() || null === $this->getRole() || null === $this->getStatus()) {
return;

View File

@@ -43,7 +43,7 @@ class Role
*
* @return bool
*/
public function getActive()
public function getActive(): bool
{
return $this->active;
}
@@ -53,7 +53,7 @@ class Role
*
* @return int
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}
@@ -73,7 +73,7 @@ class Role
*
* @return EventType
*/
public function getType()
public function getType(): ?\Chill\EventBundle\Entity\EventType
{
return $this->type;
}

View File

@@ -45,7 +45,7 @@ class Status
*
* @return bool
*/
public function getActive()
public function getActive(): bool
{
return $this->active;
}
@@ -55,7 +55,7 @@ class Status
*
* @return int
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}
@@ -75,7 +75,7 @@ class Status
*
* @return EventType
*/
public function getType()
public function getType(): ?\Chill\EventBundle\Entity\EventType
{
return $this->type;
}