2525
2626class HereTest extends BaseTestCase
2727{
28- protected function getCacheDir ()
28+ protected function getCacheDir (): ? string
2929 {
3030 if (isset ($ _SERVER ['USE_CACHED_RESPONSES ' ]) && true === $ _SERVER ['USE_CACHED_RESPONSES ' ]) {
3131 return __DIR__ .'/.cached_responses ' ;
@@ -34,7 +34,7 @@ protected function getCacheDir()
3434 return null ;
3535 }
3636
37- public function testGeocodeWithRealAddress ()
37+ public function testGeocodeWithRealAddress (): void
3838 {
3939 if (!isset ($ _SERVER ['HERE_API_KEY ' ])) {
4040 $ this ->markTestSkipped ('You need to configure the HERE_API_KEY value in phpunit.xml ' );
@@ -69,7 +69,7 @@ public function testGeocodeWithRealAddress()
6969 /**
7070 * @throws \Geocoder\Exception\Exception
7171 */
72- public function testGeocodeWithDefaultAdditionalData ()
72+ public function testGeocodeWithDefaultAdditionalData (): void
7373 {
7474 if (!isset ($ _SERVER ['HERE_API_KEY ' ])) {
7575 $ this ->markTestSkipped ('You need to configure the HERE_API_KEY value in phpunit.xml ' );
@@ -111,7 +111,7 @@ public function testGeocodeWithDefaultAdditionalData()
111111 *
112112 * @throws \Geocoder\Exception\Exception
113113 */
114- public function testGeocodeWithAdditionalData ()
114+ public function testGeocodeWithAdditionalData (): void
115115 {
116116 if (!isset ($ _SERVER ['HERE_API_KEY ' ])) {
117117 $ this ->markTestSkipped ('You need to configure the HERE_API_KEY value in phpunit.xml ' );
@@ -161,7 +161,7 @@ public function testGeocodeWithAdditionalData()
161161 *
162162 * @throws \Geocoder\Exception\Exception
163163 */
164- public function testGeocodeWithExtraFilterCountry ()
164+ public function testGeocodeWithExtraFilterCountry (): void
165165 {
166166 if (!isset ($ _SERVER ['HERE_API_KEY ' ])) {
167167 $ this ->markTestSkipped ('You need to configure the HERE_API_KEY value in phpunit.xml ' );
@@ -196,7 +196,7 @@ public function testGeocodeWithExtraFilterCountry()
196196 *
197197 * @throws \Geocoder\Exception\Exception
198198 */
199- public function testGeocodeWithExtraFilterCity ()
199+ public function testGeocodeWithExtraFilterCity (): void
200200 {
201201 if (!isset ($ _SERVER ['HERE_API_KEY ' ])) {
202202 $ this ->markTestSkipped ('You need to configure the HERE_API_KEY value in phpunit.xml ' );
@@ -234,7 +234,7 @@ public function testGeocodeWithExtraFilterCity()
234234 $ this ->assertEquals ('ESP ' , $ resultCity3 ->getCountry ()->getCode ());
235235 }
236236
237- public function testGeocodeWithExtraFilterCounty ()
237+ public function testGeocodeWithExtraFilterCounty (): void
238238 {
239239 if (!isset ($ _SERVER ['HERE_API_KEY ' ])) {
240240 $ this ->markTestSkipped ('You need to configure the HERE_API_KEY value in phpunit.xml ' );
@@ -268,7 +268,7 @@ public function testGeocodeWithExtraFilterCounty()
268268 $ this ->assertEquals ('ESP ' , $ resultRegion2 ->getCountry ()->getCode ());
269269 }
270270
271- public function testReverseWithRealCoordinates ()
271+ public function testReverseWithRealCoordinates (): void
272272 {
273273 if (!isset ($ _SERVER ['HERE_API_KEY ' ])) {
274274 $ this ->markTestSkipped ('You need to configure the HERE_API_KEY value in phpunit.xml ' );
@@ -298,21 +298,21 @@ public function testReverseWithRealCoordinates()
298298 $ this ->assertEquals ('FRA ' , $ result ->getCountry ()->getCode ());
299299 }
300300
301- public function testGetName ()
301+ public function testGetName (): void
302302 {
303303 $ provider = new Here ($ this ->getMockedHttpClient (), 'appId ' , 'appCode ' );
304304 $ this ->assertEquals ('Here ' , $ provider ->getName ());
305305 }
306306
307- public function testGeocodeWithInvalidData ()
307+ public function testGeocodeWithInvalidData (): void
308308 {
309309 $ this ->expectException (\Geocoder \Exception \InvalidServerResponse::class);
310310
311311 $ provider = new Here ($ this ->getMockedHttpClient (), 'appId ' , 'appCode ' );
312312 $ provider ->geocodeQuery (GeocodeQuery::create ('foobar ' ));
313313 }
314314
315- public function testGeocodeIpv4 ()
315+ public function testGeocodeIpv4 (): void
316316 {
317317 $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
318318 $ this ->expectExceptionMessage ('The Here provider does not support IP addresses, only street addresses. ' );
@@ -321,7 +321,7 @@ public function testGeocodeIpv4()
321321 $ provider ->geocodeQuery (GeocodeQuery::create ('127.0.0.1 ' ));
322322 }
323323
324- public function testGeocodeWithLocalhostIPv6 ()
324+ public function testGeocodeWithLocalhostIPv6 (): void
325325 {
326326 $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
327327 $ this ->expectExceptionMessage ('The Here provider does not support IP addresses, only street addresses. ' );
@@ -330,7 +330,7 @@ public function testGeocodeWithLocalhostIPv6()
330330 $ provider ->geocodeQuery (GeocodeQuery::create ('::1 ' ));
331331 }
332332
333- public function testGeocodeInvalidApiKey ()
333+ public function testGeocodeInvalidApiKey (): void
334334 {
335335 $ this ->expectException (\Geocoder \Exception \InvalidCredentials::class);
336336 $ this ->expectExceptionMessage ('Invalid or missing api key. ' );
@@ -349,7 +349,7 @@ public function testGeocodeInvalidApiKey()
349349 $ provider ->geocodeQuery (GeocodeQuery::create ('New York ' ));
350350 }
351351
352- public function testGeocodeWithRealIPv6 ()
352+ public function testGeocodeWithRealIPv6 (): void
353353 {
354354 $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
355355 $ this ->expectExceptionMessage ('The Here provider does not support IP addresses, only street addresses. ' );
@@ -358,7 +358,7 @@ public function testGeocodeWithRealIPv6()
358358 $ provider ->geocodeQuery (GeocodeQuery::create ('::ffff:88.188.221.14 ' ));
359359 }
360360
361- public function getProvider ()
361+ public function getProvider (): Here
362362 {
363363 if (!isset ($ _SERVER ['HERE_API_KEY ' ])) {
364364 $ this ->markTestSkipped ('You need to configure the HERE_API_KEY value in phpunit.xml ' );
0 commit comments