Completed
Pull Request — master (#88)
by Matt
04:22
created
src/Service/GpxService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.