mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -399,9 +399,6 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->streetNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DateTime
|
||||
*/
|
||||
public function getValidFrom(): DateTime
|
||||
{
|
||||
return $this->validFrom;
|
||||
@@ -567,7 +564,6 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
*
|
||||
* @param string $streetAddress1
|
||||
*
|
||||
* @return Address
|
||||
* @deprecated
|
||||
*/
|
||||
public function setStreetAddress1(?string $streetAddress1): self
|
||||
@@ -582,7 +578,6 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
*
|
||||
* @param string $streetAddress2
|
||||
* @deprecated
|
||||
* @return Address
|
||||
*/
|
||||
public function setStreetAddress2(?string $streetAddress2): self
|
||||
{
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="centers")
|
||||
*/
|
||||
class Center implements HasCenterInterface
|
||||
class Center implements HasCenterInterface, \Stringable
|
||||
{
|
||||
/**
|
||||
* @var Collection
|
||||
@@ -59,7 +59,7 @@ class Center implements HasCenterInterface
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->getName();
|
||||
}
|
||||
@@ -85,7 +85,7 @@ class Center implements HasCenterInterface
|
||||
/**
|
||||
* @return ArrayCollection|Collection
|
||||
*/
|
||||
public function getGroupCenters()
|
||||
public function getGroupCenters(): \Doctrine\Common\Collections\ArrayCollection|\Doctrine\Common\Collections\Collection
|
||||
{
|
||||
return $this->groupCenters;
|
||||
}
|
||||
|
@@ -79,9 +79,6 @@ class Civility
|
||||
return $this->order;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Civility
|
||||
*/
|
||||
public function setAbbreviation(array $abbreviation): self
|
||||
{
|
||||
$this->abbreviation = $abbreviation;
|
||||
|
@@ -24,12 +24,6 @@ class CronJobExecution
|
||||
|
||||
public const SUCCESS = 1;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false)
|
||||
* @ORM\Id
|
||||
*/
|
||||
private string $key;
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null})
|
||||
@@ -46,9 +40,12 @@ class CronJobExecution
|
||||
*/
|
||||
private ?int $lastStatus = null;
|
||||
|
||||
public function __construct(string $key)
|
||||
{
|
||||
$this->key = $key;
|
||||
public function __construct(/**
|
||||
* @ORM\Column(type="text", nullable=false)
|
||||
* @ORM\Id
|
||||
*/
|
||||
private string $key
|
||||
) {
|
||||
$this->lastStart = new DateTimeImmutable('now');
|
||||
}
|
||||
|
||||
|
@@ -20,39 +20,31 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
*/
|
||||
class SimpleGeographicalUnitDTO
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @psalm-readonly
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public int $id;
|
||||
|
||||
/**
|
||||
* @readonly
|
||||
* @psalm-readonly
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public int $layerId;
|
||||
|
||||
/**
|
||||
* @readonly
|
||||
* @psalm-readonly
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public string $unitName;
|
||||
|
||||
/**
|
||||
* @readonly
|
||||
* @psalm-readonly
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public string $unitRefId;
|
||||
|
||||
public function __construct(int $id, string $unitName, string $unitRefId, int $layerId)
|
||||
{
|
||||
$this->id = $id;
|
||||
$this->unitName = $unitName;
|
||||
$this->unitRefId = $unitRefId;
|
||||
$this->layerId = $layerId;
|
||||
public function __construct(
|
||||
/**
|
||||
* @readonly
|
||||
* @psalm-readonly
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public int $id,
|
||||
/**
|
||||
* @readonly
|
||||
* @psalm-readonly
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public string $unitName,
|
||||
/**
|
||||
* @readonly
|
||||
* @psalm-readonly
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public string $unitRefId,
|
||||
/**
|
||||
* @readonly
|
||||
* @psalm-readonly
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public int $layerId
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
@@ -109,7 +109,7 @@ class PermissionsGroup
|
||||
/**
|
||||
* @return ArrayCollection|Collection
|
||||
*/
|
||||
public function getRoleScopes()
|
||||
public function getRoleScopes(): \Doctrine\Common\Collections\ArrayCollection|\Doctrine\Common\Collections\Collection
|
||||
{
|
||||
return $this->roleScopes;
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ use function in_array;
|
||||
* "user": User::class
|
||||
* })
|
||||
*/
|
||||
class User implements UserInterface
|
||||
class User implements UserInterface, \Stringable
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
@@ -158,14 +158,12 @@ class User implements UserInterface
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->getLabel();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Chill\MainBundle\Entity\GroupCenter $groupCenter
|
||||
*
|
||||
* @return \Chill\MainBundle\Entity\User
|
||||
*/
|
||||
public function addGroupCenter(GroupCenter $groupCenter)
|
||||
@@ -359,8 +357,6 @@ class User implements UserInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Chill\MainBundle\Entity\GroupCenter $groupCenter
|
||||
*
|
||||
* @throws RuntimeException if the groupCenter is not in the collection
|
||||
*/
|
||||
public function removeGroupCenter(GroupCenter $groupCenter)
|
||||
|
@@ -294,7 +294,7 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
/**
|
||||
* @return ArrayCollection|Collection
|
||||
*/
|
||||
public function getSteps()
|
||||
public function getSteps(): \Doctrine\Common\Collections\ArrayCollection|\Doctrine\Common\Collections\Collection
|
||||
{
|
||||
return $this->steps;
|
||||
}
|
||||
@@ -335,7 +335,7 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
/**
|
||||
* @return ArrayCollection|Collection
|
||||
*/
|
||||
public function getSubscriberToFinal()
|
||||
public function getSubscriberToFinal(): \Doctrine\Common\Collections\ArrayCollection|\Doctrine\Common\Collections\Collection
|
||||
{
|
||||
return $this->subscriberToFinal;
|
||||
}
|
||||
@@ -343,7 +343,7 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
/**
|
||||
* @return ArrayCollection|Collection
|
||||
*/
|
||||
public function getSubscriberToStep()
|
||||
public function getSubscriberToStep(): \Doctrine\Common\Collections\ArrayCollection|\Doctrine\Common\Collections\Collection
|
||||
{
|
||||
return $this->subscriberToStep;
|
||||
}
|
||||
|
@@ -356,8 +356,6 @@ class EntityWorkflowStep
|
||||
}
|
||||
|
||||
/**
|
||||
* @return EntityWorkflowStep
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function setNext(?EntityWorkflowStep $next): self
|
||||
@@ -368,8 +366,6 @@ class EntityWorkflowStep
|
||||
}
|
||||
|
||||
/**
|
||||
* @return EntityWorkflowStep
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function setPrevious(?EntityWorkflowStep $previous): self
|
||||
@@ -409,10 +405,8 @@ class EntityWorkflowStep
|
||||
|
||||
/**
|
||||
* @Assert\Callback
|
||||
*
|
||||
* @param mixed $payload
|
||||
*/
|
||||
public function validateOnCreation(ExecutionContextInterface $context, $payload): void
|
||||
public function validateOnCreation(ExecutionContextInterface $context, mixed $payload): void
|
||||
{
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user