@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $databaseArray |
189 | 189 | ); |
190 | 190 | |
191 | - $entity->cacheId = (int) $this->connection->lastInsertId(); |
|
191 | + $entity->cacheId = (int)$this->connection->lastInsertId(); |
|
192 | 192 | |
193 | 193 | return $entity; |
194 | 194 | } |
@@ -329,42 +329,42 @@ discard block |
||
329 | 329 | : GeoCachesEntity { |
330 | 330 | $entity = new GeoCachesEntity(); |
331 | 331 | |
332 | - $entity->cacheId = (int) $data['cache_id']; |
|
333 | - $entity->uuid = (string) $data['uuid']; |
|
334 | - $entity->node = (int) $data['node']; |
|
332 | + $entity->cacheId = (int)$data['cache_id']; |
|
333 | + $entity->uuid = (string)$data['uuid']; |
|
334 | + $entity->node = (int)$data['node']; |
|
335 | 335 | $entity->dateCreated = new DateTime($data['date_created']); |
336 | - $entity->isPublishdate = (int) $data['is_publishdate']; |
|
336 | + $entity->isPublishdate = (int)$data['is_publishdate']; |
|
337 | 337 | $entity->lastModified = date('Y-m-d H:i:s'); |
338 | - $entity->okapiSyncbase = (string) $data['okapi_syncbase']; |
|
338 | + $entity->okapiSyncbase = (string)$data['okapi_syncbase']; |
|
339 | 339 | $entity->listingLastModified = new DateTime($data['listing_last_modified']); |
340 | 340 | $entity->metaLastModified = new DateTime($data['meta_last_modified']); |
341 | - $entity->userId = (int) $data['user_id']; |
|
342 | - $entity->name = (string) $data['name']; |
|
341 | + $entity->userId = (int)$data['user_id']; |
|
342 | + $entity->name = (string)$data['name']; |
|
343 | 343 | $entity->longitude = $data['longitude']; |
344 | 344 | $entity->latitude = $data['latitude']; |
345 | - $entity->type = (int) $data['type']; |
|
346 | - $entity->status = (int) $data['status']; |
|
347 | - $entity->country = (string) $data['country']; |
|
345 | + $entity->type = (int)$data['type']; |
|
346 | + $entity->status = (int)$data['status']; |
|
347 | + $entity->country = (string)$data['country']; |
|
348 | 348 | $entity->dateHidden = new DateTime($data['date_hidden']); |
349 | - $entity->size = (int) $data['size']; |
|
350 | - $entity->difficulty = (int) $data['difficulty']; |
|
351 | - $entity->terrain = (int) $data['terrain']; |
|
349 | + $entity->size = (int)$data['size']; |
|
350 | + $entity->difficulty = (int)$data['difficulty']; |
|
351 | + $entity->terrain = (int)$data['terrain']; |
|
352 | 352 | // $entity->logpw = (string) $data['logpw']; |
353 | 353 | $entity->logpw = ($data['logpw'] == '') ? '' : '1'; |
354 | 354 | $entity->searchTime = $data['search_time']; |
355 | 355 | $entity->wayLength = $data['way_length']; |
356 | - $entity->wpGc = (string) $data['wp_gc']; |
|
357 | - $entity->wpGcMaintained = (string) $data['wp_gc_maintained']; |
|
358 | - $entity->wpNc = (string) $data['wp_nc']; |
|
359 | - $entity->wpOc = (string) $data['wp_oc']; |
|
360 | - $entity->descLanguages = (string) $data['desc_languages']; |
|
361 | - $entity->defaultDesclang = (string) $data['default_desclang']; |
|
356 | + $entity->wpGc = (string)$data['wp_gc']; |
|
357 | + $entity->wpGcMaintained = (string)$data['wp_gc_maintained']; |
|
358 | + $entity->wpNc = (string)$data['wp_nc']; |
|
359 | + $entity->wpOc = (string)$data['wp_oc']; |
|
360 | + $entity->descLanguages = (string)$data['desc_languages']; |
|
361 | + $entity->defaultDesclang = (string)$data['default_desclang']; |
|
362 | 362 | $entity->dateActivate = new DateTime($data['date_activate'] ?? ''); |
363 | - $entity->needNpaRecalc = (int) $data['need_npa_recalc']; |
|
364 | - $entity->showCachelists = (int) $data['show_cachelists']; |
|
365 | - $entity->protectOldCoords = (int) $data['protect_old_coords']; |
|
366 | - $entity->needsMaintenance = (int) $data['needs_maintenance']; |
|
367 | - $entity->listingOutdated = (int) $data['listing_outdated']; |
|
363 | + $entity->needNpaRecalc = (int)$data['need_npa_recalc']; |
|
364 | + $entity->showCachelists = (int)$data['show_cachelists']; |
|
365 | + $entity->protectOldCoords = (int)$data['protect_old_coords']; |
|
366 | + $entity->needsMaintenance = (int)$data['needs_maintenance']; |
|
367 | + $entity->listingOutdated = (int)$data['listing_outdated']; |
|
368 | 368 | $entity->flagsLastModified = new DateTime($data['flags_last_modified']); |
369 | 369 | $entity->cacheSize = $this->cacheSizeRepository->fetchOneBy(['id' => $entity->size]); |
370 | 370 | $entity->cacheStatus = $this->cacheStatusRepository->fetchOneBy(['id' => $entity->status]); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $databaseArray |
154 | 154 | ); |
155 | 155 | |
156 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
156 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
157 | 157 | |
158 | 158 | return $entity; |
159 | 159 | } |
@@ -229,10 +229,10 @@ discard block |
||
229 | 229 | public function getEntityFromDatabaseArray(array $data) |
230 | 230 | : GeoCacheReportReasonsEntity { |
231 | 231 | $entity = new GeoCacheReportReasonsEntity(); |
232 | - $entity->id = (int) $data['id']; |
|
233 | - $entity->name = (string) $data['name']; |
|
234 | - $entity->transId = (int) $data['trans_id']; |
|
235 | - $entity->order = (int) $data['order']; |
|
232 | + $entity->id = (int)$data['id']; |
|
233 | + $entity->name = (string)$data['name']; |
|
234 | + $entity->transId = (int)$data['trans_id']; |
|
235 | + $entity->order = (int)$data['order']; |
|
236 | 236 | |
237 | 237 | return $entity; |
238 | 238 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $databaseArray |
160 | 160 | ); |
161 | 161 | |
162 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
162 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
163 | 163 | |
164 | 164 | return $entity; |
165 | 165 | } |
@@ -241,11 +241,11 @@ discard block |
||
241 | 241 | public function getEntityFromDatabaseArray(array $data) |
242 | 242 | : GeoCacheAdoptionsEntity { |
243 | 243 | $entity = new GeoCacheAdoptionsEntity(); |
244 | - $entity->id = (int) $data['id']; |
|
245 | - $entity->cacheId = (int) $data['cache_id']; |
|
244 | + $entity->id = (int)$data['id']; |
|
245 | + $entity->cacheId = (int)$data['cache_id']; |
|
246 | 246 | $entity->date = new DateTime($data['date']); |
247 | - $entity->fromUserId = (int) $data['from_user_id']; |
|
248 | - $entity->toUserId = (int) $data['to_user_id']; |
|
247 | + $entity->fromUserId = (int)$data['from_user_id']; |
|
248 | + $entity->toUserId = (int)$data['to_user_id']; |
|
249 | 249 | $entity->fromUser = $this->userRepository->fetchOneById($entity->fromUserId); |
250 | 250 | $entity->toUser = $this->userRepository->fetchOneById($entity->toUserId); |
251 | 251 |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $databaseArray |
152 | 152 | ); |
153 | 153 | |
154 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
154 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
155 | 155 | |
156 | 156 | return $entity; |
157 | 157 | } |
@@ -227,10 +227,10 @@ discard block |
||
227 | 227 | public function getEntityFromDatabaseArray(array $data) |
228 | 228 | : NodesEntity { |
229 | 229 | $entity = new NodesEntity(); |
230 | - $entity->id = (int) $data['id']; |
|
231 | - $entity->name = (string) $data['name']; |
|
232 | - $entity->url = (string) $data['url']; |
|
233 | - $entity->waypointPrefix = (string) $data['waypoint_prefix']; |
|
230 | + $entity->id = (int)$data['id']; |
|
231 | + $entity->name = (string)$data['name']; |
|
232 | + $entity->url = (string)$data['url']; |
|
233 | + $entity->waypointPrefix = (string)$data['waypoint_prefix']; |
|
234 | 234 | |
235 | 235 | return $entity; |
236 | 236 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $databaseArray |
191 | 191 | ); |
192 | 192 | |
193 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
193 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
194 | 194 | |
195 | 195 | return $entity; |
196 | 196 | } |
@@ -276,16 +276,16 @@ discard block |
||
276 | 276 | public function getEntityFromDatabaseArray(array $data) |
277 | 277 | : GeoCacheReportsEntity { |
278 | 278 | $entity = new GeoCacheReportsEntity(); |
279 | - $entity->id = (int) $data['id']; |
|
279 | + $entity->id = (int)$data['id']; |
|
280 | 280 | $entity->dateCreated = new DateTime($data['date_created']); |
281 | - $entity->cacheid = (int) $data['cacheid']; |
|
282 | - $entity->userid = (int) $data['userid']; |
|
283 | - $entity->reason = (int) $data['reason']; |
|
284 | - $entity->note = (string) $data['note']; |
|
285 | - $entity->status = (int) $data['status']; |
|
286 | - $entity->adminid = (int) $data['adminid']; |
|
281 | + $entity->cacheid = (int)$data['cacheid']; |
|
282 | + $entity->userid = (int)$data['userid']; |
|
283 | + $entity->reason = (int)$data['reason']; |
|
284 | + $entity->note = (string)$data['note']; |
|
285 | + $entity->status = (int)$data['status']; |
|
286 | + $entity->adminid = (int)$data['adminid']; |
|
287 | 287 | $entity->lastmodified = date('Y-m-d H:i:s'); |
288 | - $entity->comment = (string) $data['comment']; |
|
288 | + $entity->comment = (string)$data['comment']; |
|
289 | 289 | $entity->cache = $this->cachesRepository->fetchOneBy(['cache_id' => $entity->cacheid]); |
290 | 290 | $entity->user = $this->userRepository->fetchOneById($entity->userid); |
291 | 291 | if ($entity->adminid) { |
@@ -24,10 +24,10 @@ discard block |
||
24 | 24 | /** @var Connection $connection */ |
25 | 25 | $connection = AppKernel::Container()->get(Connection::class); |
26 | 26 | |
27 | -$id = (int) isset($_REQUEST['id']) ? $_REQUEST['id'] : 0; |
|
28 | -$rId = (int) isset($_REQUEST['rid']) ? $_REQUEST['rid'] : 0; |
|
29 | -$cacheId = (int) isset($_REQUEST['cacheid']) ? $_REQUEST['cacheid'] : 0; |
|
30 | -$ownerId = (int) isset($_REQUEST['ownerid']) ? $_REQUEST['ownerid'] : 0; |
|
27 | +$id = (int)isset($_REQUEST['id']) ? $_REQUEST['id'] : 0; |
|
28 | +$rId = (int)isset($_REQUEST['rid']) ? $_REQUEST['rid'] : 0; |
|
29 | +$cacheId = (int)isset($_REQUEST['cacheid']) ? $_REQUEST['cacheid'] : 0; |
|
30 | +$ownerId = (int)isset($_REQUEST['ownerid']) ? $_REQUEST['ownerid'] : 0; |
|
31 | 31 | |
32 | 32 | $reportData = $connection |
33 | 33 | ->fetchAssociative( |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | ['id' => $rId] |
38 | 38 | ); |
39 | 39 | |
40 | -$reporterId = (int) $reportData['userid']; |
|
41 | -$adminId = (int) $reportData['adminid']; |
|
40 | +$reporterId = (int)$reportData['userid']; |
|
41 | +$adminId = (int)$reportData['adminid']; |
|
42 | 42 | $age = $reportData['age']; |
43 | 43 | |
44 | 44 | if (isset($_REQUEST['savecomment'])) { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | ); |
38 | 38 | if ($r) { |
39 | 39 | if ($r['object_type'] == 1) { |
40 | - $check = (int) $connection |
|
40 | + $check = (int)$connection |
|
41 | 41 | ->fetchOne( |
42 | 42 | 'SELECT COUNT(*) |
43 | 43 | FROM `cache_logs` |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | } |
64 | 64 | } elseif ($r['object_type'] == 2) { |
65 | - $check = (int) $connection |
|
65 | + $check = (int)$connection |
|
66 | 66 | ->fetchOne( |
67 | 67 | 'SELECT COUNT(*) |
68 | 68 | FROM `caches` |
@@ -166,22 +166,22 @@ |
||
166 | 166 | |
167 | 167 | $tpl->assign('showdetails', true); |
168 | 168 | |
169 | - $r['hidden'] = (int) $connection->fetchOne( |
|
169 | + $r['hidden'] = (int)$connection->fetchOne( |
|
170 | 170 | 'SELECT COUNT(*) FROM `caches` WHERE `user_id`=:userId', ['userId' => $r['user_id']] |
171 | 171 | ); |
172 | - $r['hidden_active'] = (int) $connection->fetchOne( |
|
172 | + $r['hidden_active'] = (int)$connection->fetchOne( |
|
173 | 173 | 'SELECT COUNT(*) FROM `caches` WHERE `user_id`= :userId AND `status`=1', |
174 | 174 | ['userId' => $r['user_id']] |
175 | 175 | ); |
176 | - $r['logentries'] = (int) $connection->fetchOne( |
|
176 | + $r['logentries'] = (int)$connection->fetchOne( |
|
177 | 177 | 'SELECT COUNT(*) FROM `cache_logs` WHERE `user_id`= :userId', |
178 | 178 | ['userId' => $r['user_id']] |
179 | 179 | ); |
180 | - $r['deleted_logentries'] = (int) $connection->fetchOne( |
|
180 | + $r['deleted_logentries'] = (int)$connection->fetchOne( |
|
181 | 181 | 'SELECT COUNT(*) FROM `cache_logs_archived` WHERE `user_id`= :userId', |
182 | 182 | ['userId' => $r['user_id']] |
183 | 183 | ); |
184 | - $r['reports'] = (int) $connection->fetchOne( |
|
184 | + $r['reports'] = (int)$connection->fetchOne( |
|
185 | 185 | 'SELECT COUNT(*) FROM `cache_reports` WHERE `userid`= :userId', |
186 | 186 | ['userId' => $r['user_id']] |
187 | 187 | ); |
@@ -502,7 +502,7 @@ |
||
502 | 502 | |
503 | 503 | // ok ... redirect the get-data |
504 | 504 | $target = ($opt['page']['https']['force_login'] ? 'https' : $opt['page']['protocol']) |
505 | - . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; |
|
505 | + . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; |
|
506 | 506 | $this->redirect('login.php?target=' . urlencode($target)); |
507 | 507 | } |
508 | 508 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | public $compile_id = null; |
26 | 26 | |
27 | - public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
27 | + public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
28 | 28 | |
29 | 29 | public string $title = ''; |
30 | 30 | |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | |
403 | 403 | $args = func_get_args(); |
404 | 404 | unset($args[0]); |
405 | - for ($i = 1; isset($args[$i]); $i ++) { |
|
405 | + for ($i = 1; isset($args[$i]); $i++) { |
|
406 | 406 | $this->assign('p' . $i, $args[$i]); |
407 | 407 | } |
408 | 408 |