Skip to content

Commit 98d98d2

Browse files
committed
style fix
1 parent 2e5c5ea commit 98d98d2

20 files changed

Lines changed: 38 additions & 37 deletions

src/Services/AbstractServiceCall.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ protected function resolveOptions(): void
6666
protected function createRequest(): RequestInterface
6767
{
6868
$url = sprintf('%s/%s', $this->baseUrl, $this->getUrl($this->options));
69+
6970
return new Request($this->getMethod(), $url, $this->getHeaders());
7071
}
7172

src/Services/ArrivalBoard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ protected function generateResponse(ResponseInterface $response): ArrivalBoardRe
204204
}
205205

206206
/**
207-
* @return ArrivalBoardResponse
208-
*
209207
* @throws \GuzzleHttp\Exception\GuzzleException
208+
*
209+
* @return ArrivalBoardResponse
210210
*/
211211
public function call(): ArrivalBoardResponse
212212
{

src/Services/DepartureBoard.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ protected function configureOptions(OptionsResolver $options): void
156156
}
157157

158158
/**
159-
* Create the URL
159+
* Create the URL.
160160
*
161161
* @param array $options
162162
*
@@ -204,9 +204,9 @@ protected function generateResponse(ResponseInterface $response): DepartureBoard
204204
}
205205

206206
/**
207-
* @return DepartureBoardResponse
208-
*
209207
* @throws \GuzzleHttp\Exception\GuzzleException
208+
*
209+
* @return DepartureBoardResponse
210210
*/
211211
public function call(): DepartureBoardResponse
212212
{

src/Services/Journey.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ protected function generateResponse(ResponseInterface $response): ?JourneyRespon
124124
}
125125

126126
/**
127-
* @return JourneyResponse|null
128-
*
129127
* @throws \GuzzleHttp\Exception\GuzzleException
128+
*
129+
* @return JourneyResponse|null
130130
*/
131131
public function call(): ?JourneyResponse
132132
{

src/Services/Location.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ protected function generateResponse(ResponseInterface $response): array
124124
}
125125

126126
/**
127-
* @return LocationResponse[]
128-
*
129127
* @throws \GuzzleHttp\Exception\GuzzleException
128+
*
129+
* @return LocationResponse[]
130130
*/
131131
public function call(): array
132132
{

src/Services/NearbyStops.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ protected function configureOptions(OptionsResolver $options): void
7272
$options->setAllowedTypes('maxRadius', ['int']);
7373

7474
$options->setNormalizer('coordX', function (
75-
/** @noinspection PhpUnusedParameterInspection */
75+
/* @noinspection PhpUnusedParameterInspection */
7676
Options $options,
7777
$value
7878
) {
7979
return $value * 1000000;
8080
});
8181

8282
$options->setNormalizer('coordY', function (
83-
/** @noinspection PhpUnusedParameterInspection */
83+
/* @noinspection PhpUnusedParameterInspection */
8484
Options $options,
8585
$value
8686
) {
@@ -125,9 +125,9 @@ protected function generateResponse(ResponseInterface $response): array
125125
}
126126

127127
/**
128-
* @return StopLocationResponse[]
129-
*
130128
* @throws \GuzzleHttp\Exception\GuzzleException
129+
*
130+
* @return StopLocationResponse[]
131131
*/
132132
public function call(): array
133133
{

src/Services/Response/ArrivalBoardResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function getNextBoardDate(): ?\DateTime
3939
return $this->nextBoardDate;
4040
}
4141

42-
public static function createFromArray(array $data): ArrivalBoardResponse
42+
public static function createFromArray(array $data): self
4343
{
4444
$obj = new self();
4545
$lastDate = null;

src/Services/Response/DepartureBoardResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function getNextBoardDate(): ?\DateTime
3939
return $this->nextBoardDate;
4040
}
4141

42-
public static function createFromArray(array $data): DepartureBoardResponse
42+
public static function createFromArray(array $data): self
4343
{
4444
$obj = new self();
4545
$lastDate = null;

src/Services/Response/Journey/Message.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function getText(): string
2828
return $this->text;
2929
}
3030

31-
public static function createFromArray(array $data): Message
31+
public static function createFromArray(array $data): self
3232
{
3333
$obj = new self();
3434
$obj->header = str_replace("\n", '', $data['Header']['$']);

src/Services/Response/Journey/Stop.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function usesTrack(): bool
147147
return !($this->getScheduledTrack() === null && $this->getRealtimeTrack() === null);
148148
}
149149

150-
public static function createFromArray(array $data): Stop
150+
public static function createFromArray(array $data): self
151151
{
152152
$obj = new self();
153153
$obj->name = $data['name'];
@@ -164,17 +164,17 @@ public static function createFromArray(array $data): Stop
164164
return $obj;
165165
}
166166

167-
private static function setDepartureDelay(Stop $obj, array $data): void
167+
private static function setDepartureDelay(self $obj, array $data): void
168168
{
169169
self::setDelay($obj, $data, 'dep', 'departureDelay');
170170
}
171171

172-
private static function setArrivalDelay(Stop $obj, array $data): void
172+
private static function setArrivalDelay(self $obj, array $data): void
173173
{
174174
self::setDelay($obj, $data, 'arr', 'arrivalDelay');
175175
}
176176

177-
private static function setDelay(Stop $obj, array $data, $key, $property): void
177+
private static function setDelay(self $obj, array $data, $key, $property): void
178178
{
179179
$obj->{$property} = false;
180180
$rtKey = ucfirst($key);
@@ -186,7 +186,7 @@ private static function setDelay(Stop $obj, array $data, $key, $property): void
186186
}
187187
}
188188

189-
private static function setScheduled(Stop $obj, array $data): void
189+
private static function setScheduled(self $obj, array $data): void
190190
{
191191
if (isset($data['depDate'], $data['depTime'])) {
192192
$obj->scheduledDeparture = self::createDate($data['depDate'], $data['depTime']);
@@ -201,7 +201,7 @@ private static function setScheduled(Stop $obj, array $data): void
201201
}
202202
}
203203

204-
private static function setRealtime(Stop $obj, array $data): void
204+
private static function setRealtime(self $obj, array $data): void
205205
{
206206
$obj->realtimeDeparture = $obj->scheduledDeparture;
207207
if (isset($data['rtDepDate'], $data['rtDepTime'])) {

0 commit comments

Comments
 (0)