fix: only use destination's pickup values
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user