Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Oct 22, 2013
1 parent fb6f392 commit c923d85
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Geocoder/Dumper/GeoJsonDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class GeoJsonDumper implements DumperInterface
*/
public function dump(ResultInterface $result)
{
$properties = array_filter($result->toArray(), function($val) {
$properties = array_filter($result->toArray(), function ($val) {
return $val !== null;
});

Expand Down
2 changes: 1 addition & 1 deletion src/Geocoder/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected function getLocalhostDefaults()
*/
protected function fixEncoding(array $results)
{
return array_map(function($value) {
return array_map(function ($value) {
return is_string($value) ? utf8_encode($value) : $value;
}, $results);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Geocoder/Provider/MaxMindProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected function executeQuery($query)
}

$data = array_combine($fields, $data);
$data = array_map(function($value) { return '' === $value ? null : $value; }, $data);
$data = array_map(function ($value) { return '' === $value ? null : $value; }, $data);

if (empty($data['country']) && !empty($data['countryCode'])) {
$data['country'] = $this->countryCodeToCountryName($data['countryCode']);
Expand Down
2 changes: 1 addition & 1 deletion src/Geocoder/Provider/YandexProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function executeQuery($query)

array_walk_recursive(
$item['GeoObject'],
function($value, $key) use (&$details) {$details[$key] = $value;}
function ($value, $key) use (&$details) {$details[$key] = $value;}
);

if (! empty($details['lowerCorner'])) {
Expand Down
2 changes: 1 addition & 1 deletion src/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Code inspired from the SplClassLoader RFC
* @see https://wiki.php.net/rfc/splclassloader#example_implementation
*/
spl_autoload_register(function($className) {
spl_autoload_register(function ($className) {
$className = ltrim($className, '\\');
if (0 != strpos($className, 'Geocoder')) {
return false;
Expand Down
8 changes: 4 additions & 4 deletions tests/Geocoder/Tests/Provider/ChainProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testGetReversedData()
$mockOne = $this->getMock('Geocoder\\Provider\\ProviderInterface');
$mockOne->expects($this->once())
->method('getReversedData')
->will($this->returnCallback(function() { throw new \Exception; }));
->will($this->returnCallback(function () { throw new \Exception; }));

$mockTwo = $this->getMock('Geocoder\\Provider\\ProviderInterface');
$mockTwo->expects($this->once())
Expand All @@ -48,7 +48,7 @@ public function testChainProviderReverseThrowsChainNoResultException()
$mockOne = $this->getMock('Geocoder\\Provider\\ProviderInterface');
$mockOne->expects($this->exactly(2))
->method('getReversedData')
->will($this->returnCallback(function() { throw new \Exception; }));
->will($this->returnCallback(function () { throw new \Exception; }));

$chain = new ChainProvider(array($mockOne, $mockOne));

Expand All @@ -64,7 +64,7 @@ public function testGetGeocodedData()
$mockOne = $this->getMock('Geocoder\\Provider\\ProviderInterface');
$mockOne->expects($this->once())
->method('getGeocodedData')
->will($this->returnCallback(function() { throw new \Exception; }));
->will($this->returnCallback(function () { throw new \Exception; }));

$mockTwo = $this->getMock('Geocoder\\Provider\\ProviderInterface');
$mockTwo->expects($this->once())
Expand All @@ -82,7 +82,7 @@ public function testChainProviderGeocodeThrowsChainNoResultException()
$mockOne = $this->getMock('Geocoder\\Provider\\ProviderInterface');
$mockOne->expects($this->exactly(2))
->method('getGeocodedData')
->will($this->returnCallback(function() { throw new \Exception; }));
->will($this->returnCallback(function () { throw new \Exception; }));

$chain = new ChainProvider(array($mockOne, $mockOne));

Expand Down

0 comments on commit c923d85

Please sign in to comment.