DX: apply rector rules up to php8.0

This commit is contained in:
2023-04-15 01:05:37 +02:00
parent d8870e906f
commit dde3002100
714 changed files with 2348 additions and 9263 deletions

View File

@@ -365,11 +365,9 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
/**
* Arbitrary data, used for client.
*
* @param mixed $key
*
* @return AccompanyingPeriodWorkEvaluation
*/
public function setKey($key): self
public function setKey(mixed $key): self
{
$this->key = $key;

View File

@@ -147,11 +147,9 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
}
/**
* @param mixed $key
*
* @return AccompanyingPeriodWorkEvaluationDocument
*/
public function setKey($key)
public function setKey(mixed $key)
{
$this->key = $key;

View File

@@ -94,10 +94,9 @@ class Resource
}
/**
* @return Person|ThirdParty
* @Groups({"read"})
*/
public function getResource()
public function getResource(): \Chill\PersonBundle\Entity\Person|\Chill\ThirdPartyBundle\Entity\ThirdParty
{
return $this->person ?? $this->thirdParty;
}

View File

@@ -26,12 +26,6 @@ class UserHistory implements TrackCreationInterface
{
use TrackCreationTrait;
/**
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="userHistories")
* @ORM\JoinColumn(nullable=false)
*/
private ?AccompanyingPeriod $accompanyingPeriod;
/**
* @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null})
*/
@@ -49,17 +43,18 @@ class UserHistory implements TrackCreationInterface
*/
private DateTimeImmutable $startDate;
/**
public function __construct(/**
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="userHistories")
* @ORM\JoinColumn(nullable=false)
*/
private ?\Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingPeriod, /**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=false)
*/
private User $user;
public function __construct(AccompanyingPeriod $accompanyingPeriod, User $user, ?DateTimeImmutable $startDate = null)
{
private User $user,
?DateTimeImmutable $startDate = null
) {
$this->startDate = $startDate ?? new DateTimeImmutable('now');
$this->accompanyingPeriod = $accompanyingPeriod;
$this->user = $user;
}
public function getAccompanyingPeriod(): AccompanyingPeriod