X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fgmapsgeocoder.php;h=ec42adfac2557fbe1a4ac5189c48d56a8e5d0ffb;hb=c4f03937349bddfad25990239a825f8161615260;hp=a48c9b6cc07118af53a83a33f2aaec6748fd8727;hpb=c52be69950d31821a8a091f08ad9170e1042eaf8;p=platal.git diff --git a/classes/gmapsgeocoder.php b/classes/gmapsgeocoder.php index a48c9b6..ec42adf 100644 --- a/classes/gmapsgeocoder.php +++ b/classes/gmapsgeocoder.php @@ -1,6 +1,6 @@ prepareAddress($address); $textAddress = $this->getTextToGeocode($address->text); if (is_null($defaultLanguage)) { @@ -65,7 +65,7 @@ class GMapsGeocoder extends Geocoder { } } - public function stripGeocodingFromAddress(Address &$address) { + public function stripGeocodingFromAddress(Address $address) { $address->geocodedText = null; $address->geoloc_choice = null; $address->countryId = null; @@ -80,7 +80,7 @@ class GMapsGeocoder extends Geocoder { // Updates the address with the geocoded information from Google Maps. Also // cleans up the final informations. - private function getUpdatedAddress(Address &$address, array $geocodedData, $extraLines, $forceLanguage) { + private function getUpdatedAddress(Address $address, array $geocodedData, $extraLines, $forceLanguage) { $this->fillAddressWithGeocoding($address, $geocodedData, false); $this->formatAddress($address, $extraLines, $forceLanguage); } @@ -96,7 +96,7 @@ class GMapsGeocoder extends Geocoder { } // Prepares address to be geocoded - private function prepareAddress(Address &$address) { + private function prepareAddress(Address $address) { $address->text = preg_replace('/\s*\n\s*/m', "\n", trim($address->text)); } @@ -181,7 +181,7 @@ class GMapsGeocoder extends Geocoder { } // Fills the address with the geocoded data - private function fillAddressWithGeocoding(Address &$address, $geocodedData, $isLocal) { + private function fillAddressWithGeocoding(Address $address, $geocodedData, $isLocal) { // The geocoded address three is // Country -> AdministrativeArea -> SubAdministrativeArea -> Locality -> Thoroughfare // with all the possible shortcuts @@ -282,7 +282,7 @@ class GMapsGeocoder extends Geocoder { // Formats the text of the geocoded address using the unused data and // compares it to the given address. If they are too different, the user // will be asked to choose between them. - private function formatAddress(Address &$address, $extraLines, $forceLanguage) + private function formatAddress(Address $address, $extraLines, $forceLanguage) { if ($extraLines) { $address->geocodedText = $extraLines . "\n" . $address->geocodedText;