Skip to content

Commit 0fb4ee9

Browse files
committed
Allow null keys in order to be a little more flexible.
1 parent 4b596de commit 0fb4ee9

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,30 @@ interface PublicTransportApiWrapper
2727
*
2828
* @param string $userAgent The user agent to send along with every request.
2929
*/
30-
public function setUserAgent(string $userAgent): void;
30+
public function setUserAgent(?string $userAgent): void;
3131

3232

3333
/**
3434
* Set the API key used for route-planning.
3535
*
3636
* @param string $apiKey The API key to use.
3737
*/
38-
public function setRoutePlanningApiKey(string $apiKey): void;
38+
public function setRoutePlanningApiKey(?string $apiKey): void;
3939

4040

4141
/**
4242
* Set the API key used for route-planning.
4343
*
4444
* @param string $apiKey The API key to use.
4545
*/
46-
public function setTimeTablesApiKey(string $apiKey): void;
46+
public function setTimeTablesApiKey(?string $apiKey): void;
4747

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

5555
/**
5656
* Get a timetable for a certain stop.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ public function getName(): string;
2020
*
2121
* @return int
2222
*/
23-
public function getNumber(): int;
23+
public function getNumber(): ?int;
2424

2525

2626
/**
2727
* The line number of the vehicle, identifying the line on which it runs. Example: 41X.
2828
*
2929
* @return string
3030
*/
31-
public function getLineNumber(): string;
31+
public function getLineNumber(): ?string;
3232

3333
/**
3434
* The type of vehicle. Example: "Snabbtåg".

0 commit comments

Comments
 (0)