Passed
Push — master ( d773ea...3444c4 )
by Swen
03:28
created
src/Adapter/GPX.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function read(string $gpx, array $allowedElements = []): Geometry
68 68
     {
69 69
         // Converts XML tags to lower-case (DOMDocument functions are case sensitive)
70
-        $gpx = preg_replace_callback("/(<\/?\w+)(.*?>)/", function ($m) {
70
+        $gpx = preg_replace_callback("/(<\/?\w+)(.*?>)/", function($m) {
71 71
             return strtolower($m[1]) . $m[2];
72 72
         }, $gpx);
73 73
 
@@ -217,14 +217,13 @@  discard block
 block discarded – undo
217 217
                     $points[] = $this->parsePoint($trkpt);
218 218
                 }
219 219
                 // Avoids creating invalid LineString
220
-                if (count($points)>1) {
220
+                if (count($points) > 1) {
221 221
                     $segments[] = new LineString($points);
222 222
                 }
223 223
             }
224 224
             if (!empty($segments)) {
225 225
                 $track = count($segments) === 1 ?
226
-                   $segments[0] :
227
-                   new MultiLineString($segments);
226
+                   $segments[0] : new MultiLineString($segments);
228 227
                 $track->setData($this->parseNodeProperties($trk, $this->gpxTypes->get('trkType')));
229 228
                 $track->setData('gpxType', 'track');
230 229
                 $tracks[] = $track;
@@ -440,7 +439,7 @@  discard block
 block discarded – undo
440 439
     {
441 440
         $metadata = self::processGeometryData($geometry, $this->gpxTypes->get('metadataType'));
442 441
         $metadata = empty($metadata) || !in_array('metadataType', $this->gpxTypes->get('gpxType')) ?
443
-            '' : "<metadata>\n" . $metadata. "</metadata>\n\n";
442
+            '' : "<metadata>\n" . $metadata . "</metadata>\n\n";
444 443
         $wayPoints = $routes = $tracks = "";
445 444
 
446 445
         foreach ($geometry->getComponents() as $component) {
Please login to merge, or discard this patch.
src/Adapter/OSM.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -544,7 +544,7 @@
 block discarded – undo
544 544
     {
545 545
         /** @noinspection PhpUnusedParameterInspection */
546 546
         set_error_handler(
547
-            function ($errNO, $errStr, $errFile, $errLine, $errContext) {
547
+            function($errNO, $errStr, $errFile, $errLine, $errContext) {
548 548
                 if (isset($errContext['http_response_header'])) {
549 549
                     foreach ($errContext['http_response_header'] as $line) {
550 550
                         if (strpos($line, 'Error: ') > -1) {
Please login to merge, or discard this patch.
src/geoPHP.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
         }
378 378
 
379 379
         // First char is a tab, space or carriage-return. trim it and try again
380
-        if (in_array($bytes[1], [9,10,32], true)) {
380
+        if (in_array($bytes[1], [9, 10, 32], true)) {
381 381
             $input = ltrim($input);
382 382
             return geoPHP::detectFormat($input);
383 383
         }
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
 
446 446
         // We need an 8 byte string for geohash and unpacked WKB / WKT
447 447
         fseek($mem, 0);
448
-        $string = trim((string)fread($mem, 8));
448
+        $string = trim((string) fread($mem, 8));
449 449
 
450 450
         // Detect geohash - geohash ONLY contains lowercase chars and numerics
451 451
         $matches = [];
Please login to merge, or discard this patch.
src/Geometry/Curve.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -121,10 +121,8 @@
 block discarded – undo
121 121
     public function boundary(): Geometry
122 122
     {
123 123
         return $this->isEmpty() ?
124
-            new LineString() :
125
-            ($this->isClosed() ?
126
-                new MultiPoint() :
127
-                new MultiPoint([$this->startPoint() ?? new Point(), $this->endPoint() ?? new Point()])
124
+            new LineString() : ($this->isClosed() ?
125
+                new MultiPoint() : new MultiPoint([$this->startPoint() ?? new Point(), $this->endPoint() ?? new Point()])
128 126
             );
129 127
     }
130 128
 
Please login to merge, or discard this patch.