Completed
Pull Request — master (#25)
by Mark
01:27
created
action.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -262,11 +262,11 @@
 block discarded – undo
262 262
      */
263 263
     private function printHTML(array $searchresults, bool $showMedia = true): void
264 264
     {
265
-        $pages = (array)($searchresults ['pages']);
266
-        $media = (array)$searchresults ['media'];
267
-        $lat = (float)$searchresults ['lat'];
268
-        $lon = (float)$searchresults ['lon'];
269
-        $geohash = (string)$searchresults ['geohash'];
265
+        $pages = ( array ) ($searchresults ['pages']);
266
+        $media = ( array ) $searchresults ['media'];
267
+        $lat = ( float ) $searchresults ['lat'];
268
+        $lon = ( float ) $searchresults ['lon'];
269
+        $geohash = ( string ) $searchresults ['geohash'];
270 270
 
271 271
         if (isset ($searchresults ['error'])) {
272 272
             print '<div class="level1"><p>' . hsc($searchresults ['error']) . '</p></div>';
Please login to merge, or discard this patch.
helper/search.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                     );
155 155
                     $media [] = array(
156 156
                         'id' => $id,
157
-                        'distance' => (int)($line->greatCircleLength()),
157
+                        'distance' => ( int ) ($line->greatCircleLength()),
158 158
                         'lat' => $point->y(),
159 159
                         'lon' => $point->x()
160 160
                         // optionally add other meta such as tag, description...
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                     );
173 173
                     $pages [] = array(
174 174
                         'id' => $id,
175
-                        'distance' => (int)($line->greatCircleLength()),
175
+                        'distance' => ( int ) ($line->greatCircleLength()),
176 176
                         'description' => p_get_metadata($id, 'description')['abstract'],
177 177
                         'lat' => $geotags ['lat'],
178 178
                         'lon' => $geotags ['lon']
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
 
185 185
         // sort all the pages/media using distance
186 186
         usort(
187
-            $pages, static function ($a, $b) {
187
+            $pages, static function($a, $b) {
188 188
             return strnatcmp($a ['distance'], $b ['distance']);
189 189
         }
190 190
         );
191 191
         usort(
192
-            $media, static function ($a, $b) {
192
+            $media, static function($a, $b) {
193 193
             return strnatcmp($a ['distance'], $b ['distance']);
194 194
         }
195 195
         );
Please login to merge, or discard this patch.
helper/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -292,10 +292,10 @@
 block discarded – undo
292 292
     {
293 293
         // rational64u
294 294
         $nums = explode('/', $param);
295
-        if ((int)$nums[1] > 0) {
296
-            return (float)$nums[0] / (int)$nums[1];
295
+        if (( int ) $nums[1] > 0) {
296
+            return ( float ) $nums[0] / ( int ) $nums[1];
297 297
         } else {
298
-            return (float)$nums[0];
298
+            return ( float ) $nums[0];
299 299
         }
300 300
     }
301 301
 
Please login to merge, or discard this patch.