chore: code cleanup
This commit is contained in:
@@ -329,7 +329,7 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
return $this->pickup;
|
||||
}
|
||||
|
||||
public function setPickup(null|int|string $pickup): static
|
||||
public function setPickup(int|string|null $pickup): static
|
||||
{
|
||||
$this->pickup = (int) $pickup;
|
||||
|
||||
|
||||
@@ -136,12 +136,12 @@ class Contact
|
||||
public function setUser(?User $user): static
|
||||
{
|
||||
// unset the owning side of the relation if necessary
|
||||
if ($user === null && $this->user !== null) {
|
||||
if (null === $user && null !== $this->user) {
|
||||
$this->user->setContact(null);
|
||||
}
|
||||
|
||||
// set the owning side of the relation if necessary
|
||||
if ($user !== null && $user->getContact() !== $this) {
|
||||
if (null !== $user && $user->getContact() !== $this) {
|
||||
$user->setContact($this);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class Disposition implements BlameableEntityInterface, TimestampableEntityInterf
|
||||
private ?Feedback $feedback = null;
|
||||
|
||||
#[ORM\Column(length: 64, nullable: true)]
|
||||
private ?string $calledOffBy = null;
|
||||
private ?string $calledOffBy = null;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $calledOffReason = null;
|
||||
|
||||
@@ -50,7 +50,6 @@ class BankAccount
|
||||
->addViolation()
|
||||
;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getIban(bool $obfuscated = false): ?string
|
||||
|
||||
@@ -54,7 +54,7 @@ class Communication
|
||||
public static function fromApiResponse(ProfileResponse $profileResponse): static
|
||||
{
|
||||
$communication = $profileResponse->getCommunication();
|
||||
|
||||
|
||||
$instance = new static();
|
||||
$instance
|
||||
->setPhone($communication->getPhone())
|
||||
|
||||
@@ -253,7 +253,7 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
$sum += $rating['mark'];
|
||||
}
|
||||
|
||||
$this->averageRating = $sum/count($this->ratings) * 100;
|
||||
$this->averageRating = $sum / count($this->ratings) * 100;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class JobProfile implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
public function setCategory(?string $category): static
|
||||
{
|
||||
$this->category = $category;
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
$this->uuid = Uuid::v4();
|
||||
}
|
||||
|
||||
public static function fromUploadDto(UploadDto $uploadDto, User $owner, string $type, Upload $instance = null): static
|
||||
public static function fromUploadDto(UploadDto $uploadDto, User $owner, string $type, ?Upload $instance = null): static
|
||||
{
|
||||
$instance = $instance ?? new static();
|
||||
$instance
|
||||
@@ -127,7 +127,7 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
|
||||
public function getTypeLabel(): string
|
||||
{
|
||||
return match($this->getType()) {
|
||||
return match ($this->getType()) {
|
||||
self::TYPE_PHOTO => 'Foto',
|
||||
self::TYPE_CERTIFICATE => 'Lizenz',
|
||||
self::TYPE_CONTRACT => 'Honorarvertrag',
|
||||
|
||||
Reference in New Issue
Block a user