info = $info; } public function queueTime(): int { return $this?->info['waitTime'] ?? 0; } public function isOpen(): bool { $now = now()->setTimezone('Europe/Berlin'); $inOpeningHours = $now->between($this->opensAt(), $this->closesAt()); $rideOpen = $this->info['open']; if(!$rideOpen) { return false; } return $inOpeningHours; } public function closesAt(): Carbon { return Carbon::parse($this->info['closing'], 'Europe/Berlin'); } public function opensAt(): Carbon { return Carbon::parse($this->info['opening'], 'Europe/Berlin'); } public function toArray() { return [ 'id' => $this->id, 'poiNumber' => $this->poiNumber, 'poiNumberWinter' => $this->poiNumberWinter, 'category' => $this->category, 'tags' => $this->tags, 'area' => $this->area, 'seasons' => $this->seasons, 'title' => $this->title, 'description' => $this->description, 'entrance' => $this->entrance, 'titleImage' => $this->titleImage, ]; } }