Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Sep 13, 2012
1 parent f661297 commit 11d75ab
Show file tree
Hide file tree
Showing 30 changed files with 68 additions and 71 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011 William Durand <[email protected]>
Copyright (c) 2011-2012 William Durand <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion autoload.php.dist
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/vendor/autoload.php';
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
"dev-master": "1.0-dev"
}
}
}
}
4 changes: 2 additions & 2 deletions src/Geocoder/Dumper/DumperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ interface DumperInterface
* Dump a `ResultInterface` object as a string representation of
* the implemented format.
*
* @param \Geocoder\Result\ResultInterface $result A result object
* @param \Geocoder\Result\ResultInterface $result A result object
* @return string
*/
function dump(ResultInterface $result);
public function dump(ResultInterface $result);
}
2 changes: 1 addition & 1 deletion src/Geocoder/Dumper/GeoJsonDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class GeoJsonDumper implements DumperInterface
{
/**
* @param \Geocoder\Result\ResultInterface $result
* @param \Geocoder\Result\ResultInterface $result
* @return string
*/
public function dump(ResultInterface $result)
Expand Down
4 changes: 2 additions & 2 deletions src/Geocoder/Dumper/GpxDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class GpxDumper implements DumperInterface
{
/**
* @param \Geocoder\Result\ResultInterface $result
* @param \Geocoder\Result\ResultInterface $result
* @return string
*/
public function dump(ResultInterface $result)
Expand Down Expand Up @@ -61,7 +61,7 @@ public function dump(ResultInterface $result)
}

/**
* @param \Geocoder\Result\ResultInterface $result
* @param \Geocoder\Result\ResultInterface $result
* @return string
*/
protected function formatName(ResultInterface $result)
Expand Down
2 changes: 1 addition & 1 deletion src/Geocoder/Dumper/KmlDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class KmlDumper extends GpxDumper
{
/**
* @param \Geocoder\Result\ResultInterface $result
* @param \Geocoder\Result\ResultInterface $result
* @return string
*/
public function dump(ResultInterface $result)
Expand Down
2 changes: 1 addition & 1 deletion src/Geocoder/Dumper/WkbDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class WkbDumper implements DumperInterface
{
/**
* @param \Geocoder\Result\ResultInterface $result
* @param \Geocoder\Result\ResultInterface $result
* @return string
*/
public function dump(ResultInterface $result)
Expand Down
2 changes: 1 addition & 1 deletion src/Geocoder/Dumper/WktDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class WktDumper implements DumperInterface
{
/**
* @param \Geocoder\Result\ResultInterface $result
* @param \Geocoder\Result\ResultInterface $result
* @return string
*/
public function dump(ResultInterface $result)
Expand Down
4 changes: 2 additions & 2 deletions src/Geocoder/Formatter/FormatterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ interface FormatterInterface
/**
* Format a ResultInterface object using a given format string.
*
* @param string $format
* @param string $format
* @return string
*/
function format($format);
public function format($format);
}
8 changes: 4 additions & 4 deletions src/Geocoder/Geocoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function reverse($latitude, $longitude)
/**
* Registers a provider.
*
* @param \Geocoder\Provider\ProviderInterface $provider
* @param \Geocoder\Provider\ProviderInterface $provider
* @return \Geocoder\GeocoderInterface
*/
public function registerProvider(ProviderInterface $provider)
Expand All @@ -91,7 +91,7 @@ public function registerProvider(ProviderInterface $provider)
/**
* Registers a set of providers.
*
* @param array $providers
* @param array $providers
* @return \Geocoder\GeocoderInterface
*/
public function registerProviders(array $providers = array())
Expand All @@ -106,7 +106,7 @@ public function registerProviders(array $providers = array())
/**
* Sets the provider to use.
*
* @param string $name A provider's name
* @param string $name A provider's name
* @return \Geocoder\GeocoderInterface
*/
public function using($name)
Expand Down Expand Up @@ -147,7 +147,7 @@ protected function getProvider()
}

/**
* @param array $data An array of data.
* @param array $data An array of data.
* @return \Geocoder\Result\Geocoded
*/
protected function returnResult(array $data = array())
Expand Down
14 changes: 7 additions & 7 deletions src/Geocoder/GeocoderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ interface GeocoderInterface
/**
* Geocode a given value.
*
* @param string $value A value to geocode.
* @return \Geocoder\Result\Geocoded A Geocoded result object.
* @param string $value A value to geocode.
* @return \Geocoder\Result\Geocoded A Geocoded result object.
*/
function geocode($value);
public function geocode($value);

/**
* Reverse geocode given latitude and longitude values.
*
* @param double $latitude Latitude.
* @param double $longitude Longitude.
* @return \Geocoder\Result\Geocoded A Geocoded result object.
* @param double $latitude Latitude.
* @param double $longitude Longitude.
* @return \Geocoder\Result\Geocoded A Geocoded result object.
*/
function reverse($latitude, $longitude);
public function reverse($latitude, $longitude);
}
4 changes: 2 additions & 2 deletions src/Geocoder/HttpAdapter/HttpAdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ interface HttpAdapterInterface
*
* @return string
*/
function getContent($url);
public function getContent($url);

/**
* Returns the name of the HTTP Adapter.
*
* @return string
*/
function getName();
public function getName();
}
2 changes: 1 addition & 1 deletion src/Geocoder/Provider/BingMapsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function getName()
}

/**
* @param string $query
* @param string $query
* @return array
*/
protected function executeQuery($query)
Expand Down
2 changes: 1 addition & 1 deletion src/Geocoder/Provider/CloudMadeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function getName()
}

/**
* @param string $query
* @param string $query
* @return array
*/
protected function executeQuery($query)
Expand Down
4 changes: 2 additions & 2 deletions src/Geocoder/Provider/FreeGeoIpProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function getName()
}

/**
* @param string $query
* @param string $query
* @return array
*/
protected function executeQuery($query)
Expand All @@ -65,7 +65,7 @@ protected function executeQuery($query)
return $this->getDefaults();
}

$data = (array)json_decode($content);
$data = (array) json_decode($content);

if (empty($data)) {
return $this->getDefaults();
Expand Down
8 changes: 4 additions & 4 deletions src/Geocoder/Provider/GoogleMapsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function getName()
}

/**
* @param string $query
* @param string $query
* @return array
*/
protected function executeQuery($query)
Expand Down Expand Up @@ -122,9 +122,9 @@ protected function executeQuery($query)
/**
* Update current resultset with given key/value.
*
* @param array $resultset resultset to update.
* @param String $type component type.
* @param object $values the component values;
* @param array $resultset resultset to update.
* @param String $type component type.
* @param object $values the component values;
* @return array
*/
protected function updateAddressComponent(&$resultset, $type, $values)
Expand Down
2 changes: 1 addition & 1 deletion src/Geocoder/Provider/HostIpProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function getName()
}

/**
* @param string $query
* @param string $query
* @return array
*/
protected function executeQuery($query)
Expand Down
4 changes: 2 additions & 2 deletions src/Geocoder/Provider/IpInfoDbProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function getName()
}

/**
* @param string $query
* @param string $query
* @return array
*/
protected function executeQuery($query)
Expand All @@ -86,7 +86,7 @@ protected function executeQuery($query)
return $this->getDefaults();
}

$data = (array)json_decode($content);
$data = (array) json_decode($content);

if (empty($data) || 'OK' !== $data['statusCode']) {
return $this->getDefaults();
Expand Down
2 changes: 1 addition & 1 deletion src/Geocoder/Provider/OpenStreetMapsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function getName()
}

/**
* @param string $query
* @param string $query
* @return string
*/
protected function executeQuery($query)
Expand Down
10 changes: 5 additions & 5 deletions src/Geocoder/Provider/ProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ interface ProviderInterface
/**
* Returns an associative array with data treated by the provider.
*
* @param string $address An address (IP or street).
* @param string $address An address (IP or street).
* @return array
*/
function getGeocodedData($address);
public function getGeocodedData($address);

/**
* Returns an associative array with data treated by the provider.
*
* @param array $coordinates Coordinates (latitude, longitude).
* @param array $coordinates Coordinates (latitude, longitude).
* @return array
*/
function getReversedData(array $coordinates);
public function getReversedData(array $coordinates);

/**
* Returns the provider's name.
*
* @return string
*/
function getName();
public function getName();
}
6 changes: 3 additions & 3 deletions src/Geocoder/Provider/YahooProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getName()
}

/**
* @param string $query
* @param string $query
* @return array
*/
protected function executeQuery($query)
Expand All @@ -103,9 +103,9 @@ protected function executeQuery($query)

$json = json_decode($content);
if (isset($json->ResultSet) && isset($json->ResultSet->Results)) {
$data = (array)$json->ResultSet->Results[0];
$data = (array) $json->ResultSet->Results[0];
} elseif (isset($json->ResultSet) && isset($json->ResultSet->Result)) {
$data = (array)$json->ResultSet->Result;
$data = (array) $json->ResultSet->Result;
} else {
return $this->getDefaults();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Geocoder/Result/Geocoded.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public function offsetUnset($offset)
/**
* Format a string data.
*
* @param string $str A string.
* @param string $str A string.
* @return string
*/
private function formatString($str)
Expand Down
Loading

0 comments on commit 11d75ab

Please sign in to comment.