Skip to content

Commit f72ba69

Browse files
committed
CS
1 parent e09133f commit f72ba69

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

src/Geocoder/HttpAdapter/CurlHttpAdapter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function getContent($url)
5050
if ($this->connectTimeout) {
5151
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);
5252
}
53-
53+
5454
if ($this->userAgent) {
5555
curl_setopt($c, CURLOPT_USERAGENT, $this->userAgent);
5656
}

src/Geocoder/Provider/GeoIP2Provider.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public function getGeocodedData($address)
5757
$regionCode = null;
5858
if (isset($result->subdivisions) && is_array($result->subdivisions) && !empty($result->subdivisions)) {
5959
$lastSubdivision = array_pop($result->subdivisions);
60-
60+
6161
$region = (isset($lastSubdivision->names->{$this->locale}) ? $lastSubdivision->names->{$this->locale} : null);
62-
$regionCode = (isset($lastSubdivision->iso_code) ? $lastSubdivision->iso_code : null);
62+
$regionCode = (isset($lastSubdivision->iso_code) ? $lastSubdivision->iso_code : null);
6363
}
6464

6565
return array($this->fixEncoding(array_merge($this->getDefaults(), array(

src/Geocoder/Provider/OpenCageProvider.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ class OpenCageProvider extends AbstractProvider implements ProviderInterface
3636
private $apiKey = null;
3737

3838
/**
39-
* @param HttpAdapterInterface $adapter An HTTP adapter.
40-
* @param string $apiKey An API key.
41-
* @param bool $useSsl Whether to use an SSL connection (optional).
42-
* @param string|null $locale A locale (optional).
39+
* @param HttpAdapterInterface $adapter An HTTP adapter.
40+
* @param string $apiKey An API key.
41+
* @param bool $useSsl Whether to use an SSL connection (optional).
42+
* @param string|null $locale A locale (optional).
4343
*/
4444
public function __construct(HttpAdapterInterface $adapter, $apiKey, $useSsl = false, $locale = null)
4545
{

src/Geocoder/Result/AbstractResult.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected function formatString($str)
7272
// matches an upper case letter character immediately preceded by a numeral
7373
mb_ereg_search_init($str, '[0-9]\p{Lu}');
7474

75-
while($match = mb_ereg_search_pos()) {
75+
while ($match = mb_ereg_search_pos()) {
7676
$charPos = $match[0] + 1;
7777
// Only swap it back to lowercase if it was lowercase to begin with
7878
if (mb_ereg_match('\p{Ll}', $originalStr[$charPos])) {

tests/Geocoder/Tests/Provider/OpenCageProviderTest.php

-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public function testGetGeocodedData()
2626
$provider->getGeocodedData('foobar');
2727
}
2828

29-
3029
/**
3130
* @expectedException Geocoder\Exception\NoResultException
3231
* @expectedExceptionMessage Could not find results for given query: https://api.opencagedata.com/geocode/v1/json?key=api_key&query=foobar&limit=5
@@ -37,7 +36,6 @@ public function testSslSchema()
3736
$provider->getGeocodedData('foobar');
3837
}
3938

40-
4139
/**
4240
* @expectedException \Geocoder\Exception\NoResultException
4341
* @expectedExceptionMessage Could not execute query: http://api.opencagedata.com/geocode/v1/json?key=api_key&query=10+avenue+Gambetta%2C+Paris%2C+France&limit=5
@@ -194,7 +192,6 @@ public function testGetGeocodedDataWithCityDistrict()
194192
$this->assertNull($result['regionCode']);
195193
}
196194

197-
198195
public function testGetGeocodedDataWithLocale()
199196
{
200197
if (!isset($_SERVER['OPENCAGE_API_KEY'])) {

0 commit comments

Comments
 (0)