fix: only use destination's pickup values

This commit is contained in:
Björn Fromme
2024-01-28 17:49:46 +01:00
parent 85200e2960
commit 75bd055474
18 changed files with 286 additions and 106 deletions
+29 -2
View File
@@ -7,8 +7,23 @@ class Pickup
private ?int $id = null;
private ?int $busProId = null;
private ?string $code = null;
private ?string $city;
private ?string $street;
private ?string $city = null;
private ?string $street = null;
private ?string $time = null;
public static function fromArray(array $data): static
{
$instance = new static();
$instance
->setId($data['busProId'])
->setCode($data['code'] ?? null)
->setCity($data['city'])
->setStreet($data['street'])
->setTime($data['time'])
;
return $instance;
}
public function getId(): ?int
{
@@ -69,4 +84,16 @@ class Pickup
return $this;
}
public function getTime(): ?string
{
return $this->time;
}
public function setTime(?string $time): static
{
$this->time = $time;
return $this;
}
}