chore: cleanup, add PHPStan type annotations
This commit is contained in:
1 parent
a264526127
commit
fce6d1615a
14 files changed
+91
-41
No files matched your search
@@ -49,8 +49,11 @@ class BookingEditDraft
|
||||
#[ORM\Column(type: 'integer', nullable: true)]
|
||||
private ?int $hotelId = null;
|
||||
|
||||
/**
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
#[ORM\Column(type: 'json')]
|
||||
private array $formData = [];
|
||||
private array $formData;
|
||||
|
||||
#[ORM\Column(type: 'datetime_immutable')]
|
||||
private \DateTimeImmutable $createdAt;
|
||||
@@ -58,6 +61,9 @@ class BookingEditDraft
|
||||
#[ORM\Column(type: 'datetime_immutable')]
|
||||
private \DateTimeImmutable $updatedAt;
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $formData
|
||||
*/
|
||||
public function __construct(User $user, int $bookingId, \DateTimeImmutable $travelDate, array $formData)
|
||||
{
|
||||
$this->user = $user;
|
||||
@@ -139,11 +145,17 @@ class BookingEditDraft
|
||||
return null !== $this->dateId && null !== $this->hotelId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function getFormData(): array
|
||||
{
|
||||
return $this->formData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $formData
|
||||
*/
|
||||
public function setFormData(array $formData): static
|
||||
{
|
||||
$this->formData = $formData;
|
||||
|
||||
Reference in new issue
Block a user