@@ -132,7 +132,6 @@ |
||
| 132 | 132 | /** |
| 133 | 133 | * Map groups departures. |
| 134 | 134 | * |
| 135 | - * @param array $data |
|
| 136 | 135 | * @param string $type |
| 137 | 136 | * @param string $subType |
| 138 | 137 | * |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Sl\Mappers; |
| 4 | 4 | |
| 5 | -use Sl\Departure; |
|
| 6 | 5 | use Sl\Contracts\Mapper; |
| 6 | +use Sl\Departure; |
|
| 7 | 7 | |
| 8 | 8 | class DepartureMapper implements Mapper |
| 9 | 9 | { |
@@ -167,7 +167,7 @@ |
||
| 167 | 167 | */ |
| 168 | 168 | private function createDepartures(array $items, $type, $subType) |
| 169 | 169 | { |
| 170 | - return array_map(function ($departure) use ($type, $subType) { |
|
| 170 | + return array_map(function($departure) use ($type, $subType) { |
|
| 171 | 171 | return new Departure( |
| 172 | 172 | $departure['LineNumber'], |
| 173 | 173 | $type, |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @param string $query |
| 54 | 54 | * |
| 55 | - * @return Sl\Contracts\Collections\StationCollection |
|
| 55 | + * @return StationCollection |
|
| 56 | 56 | */ |
| 57 | 57 | public function searchStation($query) |
| 58 | 58 | { |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | /** |
| 65 | 65 | * Get departures from station. |
| 66 | 66 | * |
| 67 | - * @param Sl\Contracts\Foundation\Station $station |
|
| 67 | + * @param Station $station |
|
| 68 | 68 | * |
| 69 | - * @return Sl\Contracts\Collections\DepartureCollection |
|
| 69 | + * @return DepartureCollection |
|
| 70 | 70 | */ |
| 71 | 71 | public function departuresFrom(Station $station) |
| 72 | 72 | { |
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Sl; |
| 4 | 4 | |
| 5 | -use Sl\Mappers\StationMapper; |
|
| 6 | -use Sl\Mappers\DepartureMapper; |
|
| 7 | -use Sl\Contracts\Foundation\Station; |
|
| 8 | -use Sl\Collections\StationCollection; |
|
| 9 | 5 | use Sl\Collections\DepartureCollection; |
| 6 | +use Sl\Collections\StationCollection; |
|
| 7 | +use Sl\Contracts\Foundation\Station; |
|
| 10 | 8 | use Sl\Contracts\PublicTransportSystem; |
| 9 | +use Sl\Mappers\DepartureMapper; |
|
| 10 | +use Sl\Mappers\StationMapper; |
|
| 11 | 11 | |
| 12 | 12 | class Sl implements PublicTransportSystem |
| 13 | 13 | { |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function type($type) |
| 17 | 17 | { |
| 18 | - return $this->filter(function ($departure) use ($type) { |
|
| 18 | + return $this->filter(function($departure) use ($type) { |
|
| 19 | 19 | return $departure->type() === $type; |
| 20 | 20 | }); |
| 21 | 21 | } |