From 828fdb8728aca2fb780f0ee254fe9355fa6a772d Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Tue, 18 Jun 2019 07:55:31 +0000 Subject: [PATCH] Add tram RF329 - GT8SU --- lib/mapper.php | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/mapper.php b/lib/mapper.php index 453db3f..3eb7912 100644 --- a/lib/mapper.php +++ b/lib/mapper.php @@ -126,16 +126,16 @@ return $bestOffset; } - public function mapUsingOffset($offset) { + public function mapUsingOffset($offset, $mapper) { $result = []; foreach($this->gtfsrtTrips as $gtfsTripId => $gtfsTrip) { $ttssTripId = $gtfsTripId + $offset; if(isset($this->ttssTrips[$ttssTripId])) { - $data = numToTypeB($gtfsTrip['id']); + $data = $mapper($gtfsTrip['id']); $num = $gtfsTrip['num']; if(!is_array($data) || !isset($data['num'])) { $data = [ - 'num' => $num, + 'num' => $num ?: '', 'low' => 2, ]; } elseif($data['num'] != $num) { -- Gitblit v1.9.1