Skip to content

Commit 3525f29

Browse files
jbeliennorkunas
andauthored
Add PHPStan in CI (#1193)
* 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]>
1 parent c8fa3db commit 3525f29

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

IP2Location.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ public function getName(): string
9797

9898
/**
9999
* @param string $url
100-
*
101-
* @return Collection
102100
*/
103101
private function executeQuery(string $url): AddressCollection
104102
{

Tests/IntegrationTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@
1919
*/
2020
class IntegrationTest extends ProviderIntegrationTest
2121
{
22-
protected $testAddress = false;
22+
protected bool $testAddress = false;
2323

24-
protected $testReverse = false;
24+
protected bool $testReverse = false;
2525

2626
protected function createProvider(ClientInterface $httpClient)
2727
{
2828
return new IP2Location($httpClient, $this->getApiKey());
2929
}
3030

31-
protected function getCacheDir()
31+
protected function getCacheDir(): string
3232
{
3333
return __DIR__.'/.cached_responses';
3434
}
3535

36-
protected function getApiKey()
36+
protected function getApiKey(): string
3737
{
3838
if (!isset($_SERVER['IP2Location_API_KEY'])) {
3939
$this->markTestSkipped('No IP2Location API key');

0 commit comments

Comments
 (0)