@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $wander->setMinAltitude($stats->minAltitude); |
| 78 | 78 | $wander->setCumulativeElevationGain($stats->cumulativeElevationGain); |
| 79 | 79 | } |
| 80 | - catch(Exception $e) { |
|
| 80 | + catch (Exception $e) { |
|
| 81 | 81 | //$this->logger->debug("Couldn't set extended GPX property on wander: " . $e->getMessage()); |
| 82 | 82 | throw new Exception("Couldn't set standard GPX stats properties on wander.", 0, $e); |
| 83 | 83 | } |
@@ -108,10 +108,10 @@ discard block |
||
| 108 | 108 | public function compass(float $x, float $y): float |
| 109 | 109 | { |
| 110 | 110 | // https://www.php.net/manual/en/function.atan2.php#88119 |
| 111 | - if($x==0 AND $y==0){ return 0; } // ...or return 360 |
|
| 111 | + if ($x == 0 AND $y == 0) { return 0; } // ...or return 360 |
|
| 112 | 112 | return ($x < 0) |
| 113 | - ? rad2deg(atan2($x,$y)) + 360 |
|
| 114 | - : rad2deg(atan2($x,$y)); |
|
| 113 | + ? rad2deg(atan2($x, $y)) + 360 |
|
| 114 | + : rad2deg(atan2($x, $y)); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | public function gpxToGeoJson(string $gpx, float $epsilon): string |