Skip to content

Commit 4210552

Browse files
committed
Consistent naming, better naming for StopLocationLookup
1 parent 6e3c7d7 commit 4210552

8 files changed

Lines changed: 41 additions & 41 deletions

src/Trafiklab/Common/Model/Contract/PublicTransportApiWrapper.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ public function setRoutePlanningApiKey(string $apiKey): void;
4646
public function setTimeTablesApiKey(string $apiKey): void;
4747

4848
/**
49-
* Set the API key used for finding stop locations.
49+
* Set the API key used for looking up stop locations.
5050
*
5151
* @param string $apiKey The API key to use.
5252
*/
53-
public function setFindStopLocationApiKey(string $apiKey): void;
53+
public function setStopLocationLookupApiKey(string $apiKey): void;
5454

5555
/**
5656
* Get a timetable for a certain stop.
@@ -86,11 +86,11 @@ public function getRoutePlanning(RoutePlanningRequest $routePlanningRequest): Ro
8686

8787

8888
/**
89-
* Find a stop location based on (a part of) its name.
89+
* Look up a stop location based on (a part of) its name.
9090
*
91-
* @param FindStopLocationRequest $request The request object containing the query parameters.
91+
* @param StopLocationLookupRequest $request The request object containing the query parameters.
9292
*
93-
* @return FindStopLocationResponse The response from the API.
93+
* @return StopLocationLookupResponse The response from the API.
9494
* @throws InvalidKeyException
9595
* @throws InvalidRequestException
9696
* @throws InvalidStopLocationException
@@ -99,5 +99,5 @@ public function getRoutePlanning(RoutePlanningRequest $routePlanningRequest): Ro
9999
* @throws RequestTimedOutException
100100
* @throws ServiceUnavailableException
101101
*/
102-
public function findStopLocation(FindStopLocationRequest $request): FindStopLocationResponse;
102+
public function lookupStopLocation(StopLocationLookupRequest $request): StopLocationLookupResponse;
103103
}

src/Trafiklab/Common/Model/Contract/FindStopLocationEntry.php renamed to src/Trafiklab/Common/Model/Contract/StopLocationLookupEntry.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,41 @@
55
use Trafiklab\Common\Model\Enum\TransportType;
66

77
/**
8-
* A stop location found by a FindStopLocationRequest.
8+
* A stop location found by a StopLocationLookupRequest.
99
*
10-
* @see FindStopLocationRequest
11-
* @see FindStopLocationResponse
10+
* @see StopLocationLookupRequest
11+
* @see StopLocationLookupResponse
1212
*
1313
* @api
1414
* @package Trafiklab\Common\Model\Contract
1515
*/
16-
interface FindStopLocationEntry
16+
interface StopLocationLookupEntry
1717
{
1818
/**
19-
* Get the id of this stop area.
19+
* Get the id of this stop location.
2020
*
21-
* @return string The id of this stop area.
21+
* @return string The id of this stop location.
2222
*/
2323
public function getId(): string;
2424

2525
/**
26-
* Get the name of this stop area.
26+
* Get the name of this stop location.
2727
*
28-
* @return string The name of this stop area.
28+
* @return string The name of this stop location.
2929
*/
3030
public function getName(): string;
3131

3232
/**
33-
* The longitude of this stop area.
33+
* The longitude of this stop location.
3434
*
35-
* @return float The longitude of this stop area.
35+
* @return float The longitude of this stop location.
3636
*/
3737
public function getLongitude(): float;
3838

3939
/**
40-
* The latitude of this stop area.
40+
* The latitude of this stop location.
4141
*
42-
* @return float The latitude of this stop area.
42+
* @return float The latitude of this stop location.
4343
*/
4444
public function getLatitude(): float;
4545

@@ -61,5 +61,5 @@ public function getWeight(): int;
6161
*
6262
* @see TransportType
6363
*/
64-
public function isStopAreaForTransportType(int $transportType): bool;
64+
public function isStopLocationForTransportType(int $transportType): bool;
6565
}

src/Trafiklab/Common/Model/Contract/FindStopLocationRequest.php renamed to src/Trafiklab/Common/Model/Contract/StopLocationLookupRequest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
namespace Trafiklab\Common\Model\Contract;
55

66
/**
7-
* A FindStopLocationRequest is a request to find a certain stop area by (a part of) its name. This way a stop area ID
7+
* A StopLocationLookupRequest is a request to look up a certain stop location by (a part of) its name. This way a stop location ID
88
* can obtained. These APIs are called "Platsupplag" on trafiklab.se.
99
*
10-
* @see FindStopLocationResponse
10+
* @see StopLocationLookupResponse
1111
* @api
1212
* @package Trafiklab\Common\Model\Contract
1313
*/
14-
interface FindStopLocationRequest
14+
interface StopLocationLookupRequest
1515
{
1616
/**
1717
* Set the station name to search after. The maximum length might be limited based on the implementation.

src/Trafiklab/Common/Model/Contract/FindStopLocationResponse.php renamed to src/Trafiklab/Common/Model/Contract/StopLocationLookupResponse.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
use Trafiklab\Common\Internal\WebResponseImpl;
66

77
/**
8-
* Interface FindStopLocationResponse
8+
* Interface StopLocationLookupResponse
99
*
10-
* @see FindStopLocationRequest
10+
* @see StopLocationLookupRequest
1111
* @api
1212
* @package Trafiklab\Common\Model\Contract
1313
*/
14-
interface FindStopLocationResponse
14+
interface StopLocationLookupResponse
1515
{
1616

1717

@@ -24,9 +24,9 @@ public function getOriginalApiResponse(): WebResponse;
2424

2525

2626
/**
27-
* An array containing the stop areas which were found.
27+
* An array containing the stop locations which were found.
2828
*
29-
* @return FindStopLocationEntry[]
29+
* @return StopLocationLookupEntry[]
3030
*/
31-
public function getFoundStopAreas(): array;
31+
public function getFoundStopLocations(): array;
3232
}

src/Trafiklab/Common/Model/Contract/TimeTableEntry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ interface TimeTableEntry
2222
public function getDirection(): string;
2323

2424
/**
25-
* The time at which the vehicle will arrive at the stop area. This can be an interval (5 min) or a time
25+
* The time at which the vehicle will arrive at the stop location. This can be an interval (5 min) or a time
2626
* (18:00) depending on the operator and data source.
2727
*
2828
* @return string
@@ -58,7 +58,7 @@ public function getOperator(): string;
5858
public function getScheduledStopTime(): DateTime;
5959

6060
/**
61-
* The Id for the stop area.
61+
* The Id for the stop location.
6262
*
6363
* @return string
6464
*/

src/Trafiklab/Common/Model/Contract/TimeTableEntryWithRealTime.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use DateTime;
77

88
/**
9-
* An entry in a timetable, describing a single departure or arrival of a vehicle at a stop area.
9+
* An entry in a timetable, describing a single departure or arrival of a vehicle at a stop location.
1010
*
1111
* @api
1212
* @package Trafiklab\Common\Model
@@ -15,7 +15,7 @@ interface TimeTableEntryWithRealTime extends TimeTableEntry
1515
{
1616

1717
/**
18-
* The estimated time at which the vehicle will arrive at the stop area.
18+
* The estimated time at which the vehicle will arrive at the stop location.
1919
*
2020
* @return DateTime
2121
*/

src/Trafiklab/Common/Model/Contract/VehicleStop.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,30 @@
1313
interface VehicleStop
1414
{
1515
/**
16-
* The id for this stop area.
16+
* The id for this stop location.
1717
*
1818
* @return string
1919
*/
2020
public function getStopId(): string;
2121

2222
/**
23-
* The name of this stop area.
23+
* The name of this stop location.
2424
*
25-
* @return string The name of this stop area.
25+
* @return string The name of this stop location.
2626
*/
2727
public function getStopName(): string;
2828

2929
/**
3030
* @return DateTime|null The departure time at this stop. Null if there is no data about the departure time at
31-
* this stop area.
31+
* this stop location.
3232
*/
3333
public function getScheduledDepartureTime(): ?DateTime;
3434

3535
/**
3636
* The arrival time at this stop.
3737
*
3838
* @return DateTime|null The arrival time at this stop. Null if there is no data about the arrival time at this
39-
* stop area.
39+
* stop location.
4040
*/
4141
public function getScheduledArrivalTime(): ?DateTime;
4242

@@ -48,14 +48,14 @@ public function getScheduledArrivalTime(): ?DateTime;
4848
public function getPlatform(): ?string;
4949

5050
/**
51-
* The latitude component of this stop area's coordinates.
51+
* The latitude component of this stop location's coordinates.
5252
*
5353
* @return float
5454
*/
5555
public function getLatitude(): float;
5656

5757
/**
58-
* The longitude component of this stop area's coordinates.
58+
* The longitude component of this stop location's coordinates.
5959
*
6060
* @return float
6161
*/

src/Trafiklab/Common/Model/Contract/VehicleStopWithRealtime.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ interface VehicleStopWithRealtime extends VehicleStop
1515
{
1616
/**
1717
* @return DateTime|null The estimated (real-time) departure time at this stop. Null if there is no data about
18-
* the departure time at this stop area.
18+
* the departure time at this stop location.
1919
*/
2020
public function getEstimatedDepartureTime(): ?DateTime;
2121

2222
/**
2323
* The arrival time at this stop.
2424
*
2525
* @return DateTime|null The estimated (real-time) arrival time at this stop. Null if there is no data about the
26-
* arrival time at this stop area.
26+
* arrival time at this stop location.
2727
*/
2828
public function getEstimatedArrivalTime(): ?DateTime;
2929

0 commit comments

Comments
 (0)