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 <[email protected]>

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

Co-authored-by: Tomas Norkūnas <[email protected]>

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

Co-authored-by: Tomas Norkūnas <[email protected]>

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

Co-authored-by: Tomas Norkūnas <[email protected]>

* 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 <[email protected]>

* Update src/Plugin/PluginProvider.php

Co-authored-by: Tomas Norkūnas <[email protected]>

* Use PHPStan baseline instead of ignore

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

---------

Co-authored-by: Tomas Norkūnas <[email protected]>
  • Loading branch information
jbelien and norkunas committed Jul 16, 2023
1 parent ccef5da commit 7167904
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@
*/
class IntegrationTest extends ProviderIntegrationTest
{
protected $skippedTests = [
protected array $skippedTests = [
'testReverseQueryWithNoResults' => 'Null island exists. ',
];

protected $testIpv4 = false;
protected bool $testIpv4 = false;

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

protected function createProvider(ClientInterface $httpClient)
{
return new TomTom($httpClient, $this->getApiKey());
}

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

protected function getApiKey()
protected function getApiKey(): string
{
return $_SERVER['TOMTOM_MAP_KEY'];
}
Expand Down

0 comments on commit 7167904

Please sign in to comment.