fix indentation and misc errors according to PSR2 coding style guide

This commit is contained in:
Marc Tobias Metten
2016-09-14 03:16:46 +02:00
parent 74c06ef877
commit 4a321487f3
21 changed files with 406 additions and 374 deletions

View File

@@ -5,11 +5,13 @@ class ReverseGeocode
protected $oDB;
protected $iMaxRank = 28;
function ReverseGeocode(&$oDB)
{
$this->oDB =& $oDB;
}
function setZoom($iZoom)
{
// Zoom to rank, this could probably be calculated but a lookup gives fine control
@@ -38,8 +40,13 @@ class ReverseGeocode
$this->iMaxRank = (isset($iZoom) && isset($aZoomRank[$iZoom]))?$aZoomRank[$iZoom]:28;
}
// returns { place_id =>, type => '(osm|tiger)' }
// fails if no place was found
/* lookup()
* returns { place_id =>, type => '(osm|tiger)' }
* fails if no place was found
*/
function lookup($fLat, $fLon, $bDoInterpolation = true)
{
$sPointSQL = 'ST_SetSRID(ST_Point('.$fLon.','.$fLat.'),4326)';
@@ -111,7 +118,7 @@ class ReverseGeocode
if ($aPlaceLine) {
if (CONST_Debug) var_dump('found housenumber in interpolation lines table', $aPlaceLine);
if ($aPlace['rank_search'] == 30) {
// if a house was already found in placex, we have to find out,
// if a house was already found in placex, we have to find out,
// if the placex house or the interpolated house are closer to the searched point
// distance between point and placex house
$sSQL = 'SELECT ST_distance('.$sPointSQL.', house.geometry) as distance FROM placex as house WHERE house.place_id='.$iPlaceID;
@@ -204,5 +211,4 @@ class ReverseGeocode
'fraction' => ($bPlaceIsTiger || $bPlaceIsLine) ? $fFraction : -1
);
}
}