id; } public function getDeparture(): ?\DateTimeInterface { return $this->departure; } public function setDeparture(?\DateTimeInterface $departure): static { $this->departure = $departure; return $this; } public function getOriginLocation(): ?Location { return $this->originLocation; } public function setOriginLocation(?Location $originLocation): static { $this->originLocation = $originLocation; return $this; } public function getArrival(): ?\DateTimeInterface { return $this->arrival; } public function setArrival(?\DateTimeInterface $arrival): static { $this->arrival = $arrival; return $this; } public function getDestLocation(): ?Location { return $this->destLocation; } public function setDestLocation(?Location $destLocation): static { $this->destLocation = $destLocation; return $this; } public function isCaseMileage(): ?bool { return $this->caseMileage; } public function setCaseMileage(bool $caseMileage): static { $this->caseMileage = $caseMileage; return $this; } public function getDuration(): ?DateInterval { return $this->duration; } public function setDuration(?DateInterval $duration): static { //$this->calcDuration(); $this->duration = $duration; return $this; } public function calcDuration() { $this->duration = $this->departure - $this->arrival; } public function getMemberCase(): ?MemberCase { return $this->memberCase; } public function setMemberCase(?MemberCase $memberCase): static { $this->memberCase = $memberCase; return $this; } public function getDate(): ?\DateTimeInterface { return $this->date; } public function setDate(\DateTimeInterface $date): static { $this->date = $date; return $this; } public function getDistance(): ?float { return $this->distance; } public function setDistance(?float $distance): static { $this->distance = $distance; return $this; } public function getGpsRoute(): ?array { return $this->gpsRoute; } public function setGpsRoute(?array $gpsRoute): static { $this->gpsRoute = $gpsRoute; return $this; } public function getGPSPolyLines(): array { $points = []; foreach ($this->gpsRoute as $route) { $points[] = new Point($route['lat'], $route['lon']); } return $points; } }