Skip to content

Commit

Permalink
phpstan and php-cs-fixer: updates (#1226)
Browse files Browse the repository at this point in the history
* provider: BingMaps: required and optional params order (phpstan)

* provider: GoogleMaps: required and optional params order (phpstan)

* provider: GeoIP2: php-cs-fixer: fix identation
  • Loading branch information
kornrunner authored May 18, 2024
1 parent 8a49fa1 commit cf00101
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Provider/BingMaps/BingMaps.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function getName(): string
return 'bing_maps';
}

private function executeQuery(string $url, ?string $locale = null, int $limit): Collection
private function executeQuery(string $url, ?string $locale = null, int $limit = 1): Collection
{
if (null !== $locale) {
$url = sprintf('%s&culture=%s', $url, str_replace('_', '-', $locale));
Expand Down
16 changes: 8 additions & 8 deletions src/Provider/GeoIP2/Tests/GeoIP2AdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ protected function getGeoIP2ModelMock($geoIP2Model)
'city' => [
'geoname_id' => 2911298,
'names' => [
'de' => 'Hamburg',
'en' => 'Hamburg',
'es' => 'Hamburgo',
'fr' => 'Hambourg',
'ja' => 'ハンブルク',
'pt-BR' => 'Hamburgo',
'ru' => 'Гамбург',
'zh-CN' => '汉堡市',
'de' => 'Hamburg',
'en' => 'Hamburg',
'es' => 'Hamburgo',
'fr' => 'Hambourg',
'ja' => 'ハンブルク',
'pt-BR' => 'Hamburgo',
'ru' => 'Гамбург',
'zh-CN' => '汉堡市',
],
],
]
Expand Down
2 changes: 1 addition & 1 deletion src/Provider/GoogleMaps/GoogleMaps.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private function buildQuery(string $url, ?string $locale = null, ?string $region
* @throws InvalidServerResponse
* @throws InvalidCredentials
*/
private function fetchUrl(string $url, ?string $locale = null, int $limit, ?string $region = null): AddressCollection
private function fetchUrl(string $url, ?string $locale = null, int $limit = 1, ?string $region = null): AddressCollection
{
$url = $this->buildQuery($url, $locale, $region);
$content = $this->getUrlContents($url);
Expand Down

0 comments on commit cf00101

Please sign in to comment.