Skip to content

Commit

Permalink
style: upgrade to latest PHP CS Fixer configuration
Browse files Browse the repository at this point in the history
Fixed code style issues.

Signed-off-by: Sacha Telgenhof <[email protected]>
  • Loading branch information
stelgenhof committed Jan 5, 2025
1 parent 6ec4cd8 commit d00a0f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"guzzlehttp/guzzle": "^7.8"
},
"require-dev": {
"azuyalabs/php-cs-fixer-config": "^0.2",
"azuyalabs/php-cs-fixer-config": "^0.3",
"fakerphp/faker": "^1.23",
"infection/infection": "^0.26",
"mockery/mockery": "^1.6",
Expand Down
6 changes: 3 additions & 3 deletions src/WAQI.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function getObservationByStation(?string $station = null): void
{
try {
$this->request('feed/' . ($station ?? 'here') . '/');
} catch (GuzzleException|\JsonException $e) {
} catch (GuzzleException | \JsonException $e) {
throw new \RuntimeException($e->getMessage(), $e->getCode(), $e);
}
}
Expand All @@ -82,7 +82,7 @@ public function getObservationByGeoLocation(float $latitude, float $longitude):
{
try {
$this->request('feed/geo:' . $latitude . ';' . $longitude . '/');
} catch (GuzzleException|\JsonException $e) {
} catch (GuzzleException | \JsonException $e) {
throw new \RuntimeException($e->getMessage(), $e->getCode(), $e);
}
}
Expand Down Expand Up @@ -368,7 +368,7 @@ private function request(string $uri): void

try {
$response = $client->request('GET', $uri, ['query' => 'token=' . $this->token]);
} catch (ClientException|RequestException $e) {
} catch (ClientException | RequestException $e) {
echo Message::toString($e->getRequest());

if ($e->hasResponse()) {
Expand Down
6 changes: 3 additions & 3 deletions tests/WAQITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public function should_raise_exception_when_unknown_station_name_by_station(): v

try {
$this->waqi->getObservationByStation($station);
} catch (InvalidAccessToken|QuotaExceeded) {
} catch (InvalidAccessToken | QuotaExceeded) {
}
}

Expand All @@ -387,7 +387,7 @@ public function should_raise_exception_when_quota_exceeded_by_station(): void

try {
$this->waqi->getObservationByStation($station);
} catch (InvalidAccessToken|UnknownStation) {
} catch (InvalidAccessToken | UnknownStation) {
}
}

Expand All @@ -409,7 +409,7 @@ public function should_raise_exception_when_invalid_token_by_station(): void

try {
$this->waqi->getObservationByStation($station);
} catch (QuotaExceeded|UnknownStation) {
} catch (QuotaExceeded | UnknownStation) {
}
}

Expand Down

0 comments on commit d00a0f4

Please sign in to comment.