diff --git a/Tests/GeoIP2AdapterTest.php b/Tests/GeoIP2AdapterTest.php index 19272f0..a15f850 100644 --- a/Tests/GeoIP2AdapterTest.php +++ b/Tests/GeoIP2AdapterTest.php @@ -14,6 +14,7 @@ use Geocoder\Provider\GeoIP2\GeoIP2Adapter; use RuntimeException; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -121,7 +122,7 @@ public function testReaderResponseIsJsonEncoded() } /** - * @return \PHPUnit_Framework_MockObject_MockObject + * @return MockObject */ protected function getGeoIP2ProviderMock() { @@ -131,9 +132,9 @@ protected function getGeoIP2ProviderMock() } /** - * @param int $geoIP2Model (e.g. GeoIP2Adapter::GEOIP2_MODEL_CITY, ...) + * @param string $geoIP2Model (e.g. GeoIP2Adapter::GEOIP2_MODEL_CITY, ...) * - * @return \PHPUnit_Framework_MockObject_MockObject + * @return MockObject */ protected function getGeoIP2ModelMock($geoIP2Model) { diff --git a/Tests/GeoIP2Test.php b/Tests/GeoIP2Test.php index decbca2..aee4203 100644 --- a/Tests/GeoIP2Test.php +++ b/Tests/GeoIP2Test.php @@ -24,6 +24,7 @@ use GeoIp2\Exception\OutOfQueriesException; use Geocoder\Exception\InvalidCredentials; use Geocoder\Exception\QuotaExceeded; +use PHPUnit\Framework\MockObject\MockObject; /** * @author Jens Wiese @@ -261,7 +262,7 @@ public static function provideDataForTestingExceptions(): array /** * @param mixed $returnValue * - * @return \PHPUnit_Framework_MockObject_MockObject|GeoIP2Adapter + * @return GeoIP2Adapter&MockObject */ private function getGeoIP2AdapterMock($returnValue = '') { diff --git a/Tests/IntegrationTest.php b/Tests/IntegrationTest.php index e0cac86..b3251d3 100644 --- a/Tests/IntegrationTest.php +++ b/Tests/IntegrationTest.php @@ -23,13 +23,13 @@ */ class IntegrationTest extends ProviderIntegrationTest { - protected $testAddress = false; + protected bool $testAddress = false; - protected $testReverse = false; + protected bool $testReverse = false; - protected $testIpv6 = false; + protected bool $testIpv6 = false; - protected $testHttpProvider = false; + protected bool $testHttpProvider = false; protected function createProvider(ClientInterface $httpClient) { @@ -38,13 +38,13 @@ protected function createProvider(ClientInterface $httpClient) return new GeoIP2(new GeoIP2Adapter($reader)); } - protected function getCacheDir() + protected function getCacheDir(): string { return __DIR__.'/.cached_responses'; } - protected function getApiKey() + protected function getApiKey(): string { - return null; + return ''; } }