@@ -256,11 +256,11 @@ |
||
256 | 256 | */ |
257 | 257 | private function printHTML(array $searchresults, bool $showMedia = true): void |
258 | 258 | { |
259 | - $pages = (array)($searchresults ['pages']); |
|
260 | - $media = (array)$searchresults ['media']; |
|
261 | - $lat = (float)$searchresults ['lat']; |
|
262 | - $lon = (float)$searchresults ['lon']; |
|
263 | - $geohash = (string)$searchresults ['geohash']; |
|
259 | + $pages = ( array ) ($searchresults ['pages']); |
|
260 | + $media = ( array ) $searchresults ['media']; |
|
261 | + $lat = ( float ) $searchresults ['lat']; |
|
262 | + $lon = ( float ) $searchresults ['lon']; |
|
263 | + $geohash = ( string ) $searchresults ['geohash']; |
|
264 | 264 | |
265 | 265 | if (isset($searchresults ['error'])) { |
266 | 266 | echo '<div class="level1"><p>' . hsc($searchresults ['error']) . '</p></div>'; |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | foreach ($adjacent as $adjHash) { |
119 | 119 | if (is_array($this->spatial_idx)) { |
120 | 120 | foreach ($this->spatial_idx as $_geohash => $_docIds) { |
121 | - if (strpos($_geohash, (string)$adjHash) !== false) { |
|
121 | + if (strpos($_geohash, ( string ) $adjHash) !== false) { |
|
122 | 122 | // if $adjHash similar to geohash |
123 | 123 | $docIds = array_merge($docIds, $_docIds); |
124 | 124 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $point |
145 | 145 | ] |
146 | 146 | ); |
147 | - $media [] = ['id' => $id, 'distance' => (int)($line->greatCircleLength()), |
|
147 | + $media [] = ['id' => $id, 'distance' => ( int ) ($line->greatCircleLength()), |
|
148 | 148 | 'lat' => $point->y(), 'lon' => $point->x()]; |
149 | 149 | } |
150 | 150 | } elseif (auth_quickaclcheck($id) >= /*AUTH_READ*/ 1) { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $point |
157 | 157 | ] |
158 | 158 | ); |
159 | - $pages [] = ['id' => $id, 'distance' => (int)($line->greatCircleLength()), |
|
159 | + $pages [] = ['id' => $id, 'distance' => ( int ) ($line->greatCircleLength()), |
|
160 | 160 | 'description' => p_get_metadata($id, 'description')['abstract'], |
161 | 161 | 'lat' => $geotags ['lat'], 'lon' => $geotags ['lon']]; |
162 | 162 | } |
@@ -75,7 +75,7 @@ |
||
75 | 75 | * |
76 | 76 | * @see DokuWiki_Syntax_Plugin::handle() |
77 | 77 | */ |
78 | - final public function handle($match, $state, $pos, Doku_Handler $handler): bool|array |
|
78 | + final public function handle($match, $state, $pos, Doku_Handler $handler): bool | array |
|
79 | 79 | { |
80 | 80 | $data = []; |
81 | 81 | $data [0] = trim(substr($match, strlen('{{findnearby>'), -2)); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | * @return Point|false |
238 | 238 | * @throws Exception |
239 | 239 | */ |
240 | - final public function getCoordsFromExif(string $id): Point|false |
|
240 | + final public function getCoordsFromExif(string $id): Point | false |
|
241 | 241 | { |
242 | 242 | $exif = exif_read_data(mediaFN($id), 0, true); |
243 | 243 | if (!$exif || empty($exif ['GPS'])) { |
@@ -288,11 +288,11 @@ discard block |
||
288 | 288 | { |
289 | 289 | // rational64u |
290 | 290 | $nums = explode('/', $param); |
291 | - if ((int)$nums[1] > 0) { |
|
292 | - return (float)$nums[0] / (int)$nums[1]; |
|
291 | + if (( int ) $nums[1] > 0) { |
|
292 | + return ( float ) $nums[0] / ( int ) $nums[1]; |
|
293 | 293 | } |
294 | 294 | |
295 | - return (float)$nums[0]; |
|
295 | + return ( float ) $nums[0]; |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | /** |