| 1 | <?php |
||
| 15 | class GeoNamesGeocoder implements Geocoder { |
||
| 16 | |||
| 17 | private $fileFetcher; |
||
| 18 | private $geoNamesUser; |
||
| 19 | |||
| 20 | 4 | public function __construct( FileFetcher $fileFetcher, $geoNamesUser ) { |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $address |
||
| 27 | * |
||
| 28 | * @return LatLongValue|null |
||
| 29 | */ |
||
| 30 | 4 | public function geocode( $address ) { |
|
| 47 | |||
| 48 | /** |
||
| 49 | * @param string $address |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | 4 | private function getRequestUrl( $address ) { |
|
| 59 | |||
| 60 | 3 | private function getXmlElementValue( $xml, $tagName ) { |
|
| 65 | |||
| 66 | } |
||
| 67 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: