Passed
Push — master ( 1617fd...dd9083 )
by Andreas
05:31
created
src/GIS.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,9 +43,13 @@  discard block
 block discarded – undo
43 43
 
44 44
     public static function to_ewkt($array)
45 45
     {
46
-        if (is_string($array)) return $array;
46
+        if (is_string($array)) {
47
+            return $array;
48
+        }
47 49
 
48
-        if ($array instanceof Geography) $array = $array->getValue();
50
+        if ($array instanceof Geography) {
51
+            $array = $array->getValue();
52
+        }
49 53
 
50 54
         $type = isset($array['type']) ? strtoupper($array['type']) : null;
51 55
         $srid = isset($array['srid']) ? $array['srid'] : Config::inst()->get(self::class, 'default_srid');
@@ -85,7 +89,9 @@  discard block
 block discarded – undo
85 89
             '',
86 90
         ], json_encode($array));
87 91
 
88
-        if ($type == 'POINT') $coords2 = "($coords2)";
92
+        if ($type == 'POINT') {
93
+            $coords2 = "($coords2)";
94
+        }
89 95
 
90 96
         return sprintf('SRID=%d;%s%s', $srid, $type, $coords2);
91 97
     }
Please login to merge, or discard this patch.