DX: rector rules upt to PHP 74

This commit is contained in:
2023-04-15 00:20:19 +02:00
parent a68190f0c6
commit 858ade467c
213 changed files with 433 additions and 1052 deletions

View File

@@ -149,7 +149,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
* @Groups({"write"})
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
*/
private ?ThirdParty $linkedToThirdParty;
private ?ThirdParty $linkedToThirdParty = null;
/**
* A geospatial field storing the coordinates of the Address.

View File

@@ -55,7 +55,7 @@ class AddressReference
* @ORM\Column(type="integer")
* @groups({"read"})
*/
private ?int $id;
private ?int $id = null;
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})
@@ -79,7 +79,7 @@ class AddressReference
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
* @groups({"read"})
*/
private ?PostalCode $postcode;
private ?PostalCode $postcode = null;
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})

View File

@@ -36,7 +36,7 @@ class GeographicalUnit
/**
* @ORM\ManyToOne(targetEntity=GeographicalUnitLayer::class, inversedBy="units")
*/
private ?GeographicalUnitLayer $layer;
private ?GeographicalUnitLayer $layer = null;
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})

View File

@@ -120,12 +120,12 @@ class Notification implements TrackUpdateInterface
/**
* @ORM\Column(type="datetime_immutable")
*/
private ?DateTimeImmutable $updatedAt;
private ?DateTimeImmutable $updatedAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*/
private ?User $updatedBy;
private ?User $updatedBy = null;
public function __construct()
{

View File

@@ -121,9 +121,7 @@ class PermissionsGroup
public function isRoleScopePresentOnce(ExecutionContextInterface $context)
{
$roleScopesId = array_map(
static function (RoleScope $roleScope) {
return $roleScope->getId();
},
static fn(RoleScope $roleScope) => $roleScope->getId(),
$this->getRoleScopes()->toArray()
);
$countedIds = array_count_values($roleScopesId);

View File

@@ -291,9 +291,7 @@ class EntityWorkflowStep
public function removeDestEmail(string $email): self
{
$this->destEmail = array_filter($this->destEmail, static function (string $existing) use ($email) {
return $email !== $existing;
});
$this->destEmail = array_filter($this->destEmail, static fn(string $existing) => $email !== $existing);
return $this;
}