Completed
Push — master ( e8947e...dc23b0 )
by Andreas
15:04
created
lib/org/routamc/positioning/utils.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
         if ($unit == "K")
30 30
         {
31 31
             $dist *= 1.609344;
32
-        }
33
-        else if ($unit == "N")
32
+        } else if ($unit == "N")
34 33
         {
35 34
             $dist *= 0.8684;
36 35
         }
@@ -54,13 +53,11 @@  discard block
 block discarded – undo
54 53
             if ($from['latitude'] < $to['latitude'])
55 54
             {
56 55
                 $bearing = 0;
57
-            }
58
-            else
56
+            } else
59 57
             {
60 58
                 $bearing = 180;
61 59
             }
62
-        }
63
-        else
60
+        } else
64 61
         {
65 62
             $dist = org_routamc_positioning_utils::get_distance($from, $to, 'N');
66 63
             $arad = acos((sin(deg2rad($to['latitude'])) - sin(deg2rad($from['latitude'])) * cos(deg2rad($dist / 60))) / (sin(deg2rad($dist / 60)) * cos(deg2rad($from['latitude']))));
@@ -77,8 +74,7 @@  discard block
 block discarded – undo
77 74
         if (($rounded % 4) == 0)
78 75
         {
79 76
             $dir = $dirs[$rounded / 4];
80
-        }
81
-        else
77
+        } else
82 78
         {
83 79
             $dir = $dirs[2 * floor(((floor($rounded / 4) + 1) % 4) / 2)];
84 80
             $dir .= $dirs[1 + 2 * floor($rounded / 8)];
@@ -178,8 +174,7 @@  discard block
 block discarded – undo
178 174
             if ($city_distance <= 4)
179 175
             {
180 176
                 $city_string = "{$city->city}, {$city->country}";
181
-            }
182
-            else
177
+            } else
183 178
             {
184 179
                 $bearing = org_routamc_positioning_utils::get_bearing($city_coordinates, $coordinates);
185 180
                 $city_string = sprintf(midcom::get()->i18n->get_string('%skm %s of %s', 'org.routamc.positioning'), $city_distance, $bearing, "{$city->city}, {$city->country}");
@@ -241,8 +236,7 @@  discard block
 block discarded – undo
241 236
             if ($city_distance <= 4)
242 237
             {
243 238
                 $city_string .= $city_label;
244
-            }
245
-            else
239
+            } else
246 240
             {
247 241
                 $bearing = org_routamc_positioning_utils::get_bearing($city_coordinates, $coordinates);
248 242
                 $city_string .= sprintf(midcom::get()->i18n->get_string('%skm %s of %s', 'org.routamc.positioning'), $city_distance, $bearing, $city_label);
Please login to merge, or discard this patch.