Skip to content

Commit

Permalink
Add PHPStan in CI (#1193)
Browse files Browse the repository at this point in the history
* Add PHPStan

* Update php.yml

* Update composer.json

* Fix PHPStan level 0

* Fix PHPStan level 1

* Update phpstan.neon

* Fix PHPStan level 2

* Update composer.json

* Fix PHPStan level 3

* Fix tests

* Fix PHPStan level 4

* Update src/Common/Tests/TimedGeocoderTest.php

Co-authored-by: Tomas Norkūnas <norkunas.tom@gmail.com>

* Update src/Provider/Cache/Tests/ProviderCacheTest.php

Co-authored-by: Tomas Norkūnas <norkunas.tom@gmail.com>

* Update src/Provider/Cache/Tests/ProviderCacheTest.php

Co-authored-by: Tomas Norkūnas <norkunas.tom@gmail.com>

* Update src/Provider/GeoIP2/Tests/GeoIP2Test.php

Co-authored-by: Tomas Norkūnas <norkunas.tom@gmail.com>

* Fix PHPStan level 5

* Normalize composer.json

* Rename analyse script

* Update composer.json

* Update IntegrationTest

* Update AlgoliaPlacesTest

* Update composer.json

* Update RequestInterface vs. getParsedResponse()

* Update src/Plugin/PluginProvider.php

Co-authored-by: Tomas Norkūnas <norkunas.tom@gmail.com>

* Update src/Plugin/PluginProvider.php

Co-authored-by: Tomas Norkūnas <norkunas.tom@gmail.com>

* Use PHPStan baseline instead of ignore

See https://phpstan.org/user-guide/baseline

---------

Co-authored-by: Tomas Norkūnas <norkunas.tom@gmail.com>
  • Loading branch information
jbelien and norkunas committed Jul 16, 2023
1 parent 5a5381f commit 802ea38
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Tests/IntegrationTest.php
Expand Up @@ -21,11 +21,11 @@
*/
class IntegrationTest extends ProviderIntegrationTest
{
protected $testIpv4 = false;
protected bool $testIpv4 = false;

protected $testIpv6 = false;
protected bool $testIpv6 = false;

protected $skippedTests = [
protected array $skippedTests = [
'testReverseQueryWithNoResults' => 'ArcGIS REST API returns "אצטדיון כדורגל עירוני" for reverse query at 0,0.',
];

Expand All @@ -34,13 +34,13 @@ protected function createProvider(ClientInterface $httpClient)
return new ArcGISOnline($httpClient);
}

protected function getCacheDir()
protected function getCacheDir(): string
{
return __DIR__.'/.cached_responses';
}

protected function getApiKey()
protected function getApiKey(): string
{
return null;
return '';
}
}

0 comments on commit 802ea38

Please sign in to comment.