16
16
use Geocoder \Query \ReverseQuery ;
17
17
use Http \Client \Curl \Client as CurlAdapter ;
18
18
use Illuminate \Support \Collection ;
19
+ use Illuminate \Support \Str ;
19
20
20
21
/**
21
22
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -30,7 +31,7 @@ public function testItReverseGeocodesCoordinates()
30
31
->reverse (38.897957 , -77.036560 )
31
32
->get ()
32
33
->filter (function (GoogleAddress $ address ) {
33
- return str_contains ($ address ->getStreetName () ?? '' , 'Northwest ' );
34
+ return Str:: contains ($ address ->getStreetName () ?? '' , 'Northwest ' );
34
35
})
35
36
->first ();
36
37
@@ -159,7 +160,7 @@ public function testGeocoder()
159
160
160
161
public function testCacheIsUsed ()
161
162
{
162
- $ cacheKey = sha1 (str_slug (strtolower (urlencode ('1600 Pennsylvania Ave NW, Washington, DC 20500, USA ' ))));
163
+ $ cacheKey = sha1 (Str:: slug (strtolower (urlencode ('1600 Pennsylvania Ave NW, Washington, DC 20500, USA ' ))));
163
164
164
165
$ result = app ('geocoder ' )
165
166
->geocode ('1600 Pennsylvania Ave NW, Washington, DC 20500, USA ' )
@@ -270,7 +271,7 @@ public function testGetProvider()
270
271
271
272
public function testJapaneseCharacterGeocoding ()
272
273
{
273
- $ cacheKey = sha1 (str_slug (strtolower (urlencode ('108-0075 東京都港区港南2丁目16-3 ' ))));
274
+ $ cacheKey = sha1 (Str:: slug (strtolower (urlencode ('108-0075 東京都港区港南2丁目16-3 ' ))));
274
275
275
276
app ('geocoder ' )
276
277
->geocode ('108-0075 東京都港区港南2丁目16-3 ' )
@@ -310,7 +311,7 @@ public function testItHandlesOnlyCityAndState()
310
311
311
312
public function testEmptyResultsAreNotCached ()
312
313
{
313
- $ cacheKey = md5 (str_slug (strtolower (urlencode ('_ ' ))));
314
+ $ cacheKey = md5 (Str:: slug (strtolower (urlencode ('_ ' ))));
314
315
315
316
Geocoder::geocode ('_ ' )->get ();
316
317
0 commit comments