Passed
Branch master (954d0a)
by herry
01:57
created
Category
src/GeoHash.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -142,10 +142,11 @@  discard block
 block discarded – undo
142 142
         $mid = 0;
143 143
         for ($i = 0; $i < count($bs); $i++) {
144 144
             $mid = ($floor + $ceiling) / 2;
145
-            if ($bs[$i] == 1)
146
-                $floor = $mid;
147
-            else
148
-                $ceiling = $mid;
145
+            if ($bs[$i] == 1) {
146
+                            $floor = $mid;
147
+            } else {
148
+                            $ceiling = $mid;
149
+            }
149 150
         }
150 151
         return $mid;
151 152
     }
@@ -192,8 +193,9 @@  discard block
 block discarded – undo
192 193
     private function calcError(int $bits, float $floor, float $ceiling): float
193 194
     {
194 195
         $err = ($ceiling - $floor) / 2;
195
-        while ($bits--)
196
-            $err /= 2;
196
+        while ($bits--) {
197
+                    $err /= 2;
198
+        }
197 199
         return $err;
198 200
     }
199 201
 }
200 202
\ No newline at end of file
Please login to merge, or discard this patch.