@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $databaseArray |
161 | 161 | ); |
162 | 162 | |
163 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
163 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
164 | 164 | |
165 | 165 | return $entity; |
166 | 166 | } |
@@ -241,12 +241,12 @@ discard block |
||
241 | 241 | public function getEntityFromDatabaseArray(array $data) |
242 | 242 | : GeoCacheCoordinatesEntity { |
243 | 243 | $entity = new GeoCacheCoordinatesEntity(); |
244 | - $entity->id = (int) $data['id']; |
|
244 | + $entity->id = (int)$data['id']; |
|
245 | 245 | $entity->dateCreated = new DateTime($data['date_created']); |
246 | - $entity->cacheId = (int) $data['cache_id']; |
|
246 | + $entity->cacheId = (int)$data['cache_id']; |
|
247 | 247 | $entity->longitude = $data['longitude']; |
248 | 248 | $entity->latitude = $data['latitude']; |
249 | - $entity->restoredBy = (int) $data['restored_by']; |
|
249 | + $entity->restoredBy = (int)$data['restored_by']; |
|
250 | 250 | if ($entity->restoredBy != 0) { |
251 | 251 | $entity->user = $this->userRepository->fetchOneById($entity->restoredBy); |
252 | 252 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | public $main_template = 'sys_main'; |
21 | 21 | public $bench = null; |
22 | 22 | public $compile_id = null; |
23 | - public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
23 | + public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
24 | 24 | public $title = ''; |
25 | 25 | public $menuitem = null; |
26 | 26 | public $nowpsearch = false; |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | * @throws SmartyException |
418 | 418 | */ |
419 | 419 | public function is_cached(mixed $dummy1 = null, mixed $dummy2 = null, mixed $dummy3 = null) |
420 | - : bool|string { |
|
420 | + : bool | string { |
|
421 | 421 | global $login; |
422 | 422 | |
423 | 423 | // if the user is an admin, dont cache the content |
@@ -29,7 +29,7 @@ |
||
29 | 29 | Request::setTrustedHosts([$trustedHosts]); |
30 | 30 | } |
31 | 31 | |
32 | -$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); |
|
32 | +$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']); |
|
33 | 33 | $request = Request::createFromGlobals(); |
34 | 34 | $response = $kernel->handle($request); |
35 | 35 | $response->send(); |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | private function ocOnly81_get_matrixData() |
64 | 64 | : array |
65 | 65 | { |
66 | - for ($i = 0; $i <= 8; $i ++) { |
|
67 | - for ($j = 0; $j <= 8; $j ++) { |
|
66 | + for ($i = 0; $i <= 8; $i++) { |
|
67 | + for ($j = 0; $j <= 8; $j++) { |
|
68 | 68 | $matrix[$i][$j] = 0; |
69 | 69 | $dsum[$i] = 0; |
70 | 70 | $tsum[$i] = 0; |
@@ -81,10 +81,10 @@ discard block |
||
81 | 81 | $data = $qb->execute()->fetchAllAssociative(); |
82 | 82 | |
83 | 83 | foreach ($data as $item) { |
84 | - $matrix[$item['difficulty'] - 2][$item['terrain'] - 2] ++; |
|
84 | + $matrix[$item['difficulty'] - 2][$item['terrain'] - 2]++; |
|
85 | 85 | } |
86 | 86 | |
87 | - for ($i = 0; $i <= 8; $i ++) { |
|
87 | + for ($i = 0; $i <= 8; $i++) { |
|
88 | 88 | $dsum[$i] = $dsum[$i] + array_sum($matrix[$i]); |
89 | 89 | $tsum[$i] = $tsum[$i] + array_sum(array_column($matrix, $i)); |
90 | 90 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | 'count' => 1 |
127 | 127 | ]; |
128 | 128 | } else { |
129 | - $result[$item['user_id']]['count'] ++; |
|
129 | + $result[$item['user_id']]['count']++; |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 |
@@ -151,7 +151,7 @@ |
||
151 | 151 | $inputData = $form->getData(); |
152 | 152 | $userId = $inputData['content_user_searchfield']; |
153 | 153 | |
154 | - $fetchedUser = $this->userRepository->fetchOneById((int) $userId); |
|
154 | + $fetchedUser = $this->userRepository->fetchOneById((int)$userId); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | return $this->render( |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $databaseArray |
157 | 157 | ); |
158 | 158 | |
159 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
159 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
160 | 160 | |
161 | 161 | return $entity; |
162 | 162 | } |
@@ -272,9 +272,9 @@ discard block |
||
272 | 272 | public function getEntityFromDatabaseArray(array $data) |
273 | 273 | : UserRolesEntity { |
274 | 274 | $entity = new UserRolesEntity(); |
275 | - $entity->id = (int) $data['id']; |
|
276 | - $entity->userId = (string) $data['user_id']; |
|
277 | - $entity->roleId = (string) $data['role_id']; |
|
275 | + $entity->id = (int)$data['id']; |
|
276 | + $entity->userId = (string)$data['user_id']; |
|
277 | + $entity->roleId = (string)$data['role_id']; |
|
278 | 278 | |
279 | 279 | return $entity; |
280 | 280 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $databaseArray |
168 | 168 | ); |
169 | 169 | |
170 | - $entity->cacheId = (int) $this->connection->lastInsertId(); |
|
170 | + $entity->cacheId = (int)$this->connection->lastInsertId(); |
|
171 | 171 | |
172 | 172 | return $entity; |
173 | 173 | } |
@@ -246,11 +246,11 @@ discard block |
||
246 | 246 | public function getEntityFromDatabaseArray(array $data) |
247 | 247 | : GeoCacheStatusModifiedEntity { |
248 | 248 | $entity = new GeoCacheStatusModifiedEntity(); |
249 | - $entity->cacheId = (int) $data['cache_id']; |
|
249 | + $entity->cacheId = (int)$data['cache_id']; |
|
250 | 250 | $entity->dateModified = new DateTime($data['date_modified']); |
251 | - $entity->oldState = (int) $data['old_state']; |
|
252 | - $entity->newState = (int) $data['new_state']; |
|
253 | - $entity->userId = (int) $data['user_id']; |
|
251 | + $entity->oldState = (int)$data['old_state']; |
|
252 | + $entity->newState = (int)$data['new_state']; |
|
253 | + $entity->userId = (int)$data['user_id']; |
|
254 | 254 | $entity->user = $this->userRepository->fetchOneById($entity->userId); |
255 | 255 | $entity->cacheStatusOld = $this->cacheStatusRepository->fetchOneBy(['id' => $entity->oldState]); |
256 | 256 | $entity->cacheStatusNew = $this->cacheStatusRepository->fetchOneBy(['id' => $entity->newState]); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $databaseArray |
147 | 147 | ); |
148 | 148 | |
149 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
149 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
150 | 150 | |
151 | 151 | return $entity; |
152 | 152 | } |
@@ -226,14 +226,14 @@ discard block |
||
226 | 226 | public function getEntityFromDatabaseArray(array $data) |
227 | 227 | : GeoCacheStatusEntity { |
228 | 228 | $entity = new GeoCacheStatusEntity(); |
229 | - $entity->id = (int) $data['id']; |
|
230 | - $entity->name = (string) $data['name']; |
|
231 | - $entity->transId = (int) $data['trans_id']; |
|
232 | - $entity->de = (string) $data['de']; |
|
233 | - $entity->en = (string) $data['en']; |
|
234 | - $entity->allowUserView = (int) $data['allow_user_view']; |
|
235 | - $entity->allowOwnerEditStatus = (int) $data['allow_owner_edit_status']; |
|
236 | - $entity->allowUserLog = (int) $data['allow_user_log']; |
|
229 | + $entity->id = (int)$data['id']; |
|
230 | + $entity->name = (string)$data['name']; |
|
231 | + $entity->transId = (int)$data['trans_id']; |
|
232 | + $entity->de = (string)$data['de']; |
|
233 | + $entity->en = (string)$data['en']; |
|
234 | + $entity->allowUserView = (int)$data['allow_user_view']; |
|
235 | + $entity->allowOwnerEditStatus = (int)$data['allow_owner_edit_status']; |
|
236 | + $entity->allowUserLog = (int)$data['allow_user_log']; |
|
237 | 237 | |
238 | 238 | return $entity; |
239 | 239 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $databaseArray |
156 | 156 | ); |
157 | 157 | |
158 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
158 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
159 | 159 | |
160 | 160 | return $entity; |
161 | 161 | } |
@@ -252,30 +252,30 @@ discard block |
||
252 | 252 | public function getEntityFromDatabaseArray(array $data) |
253 | 253 | : GeoCacheLogsArchivedEntity { |
254 | 254 | $entity = new GeoCacheLogsArchivedEntity(); |
255 | - $entity->id = (int) $data['id']; |
|
256 | - $entity->uuid = (string) $data['uuid']; |
|
257 | - $entity->node = (int) $data['node']; |
|
255 | + $entity->id = (int)$data['id']; |
|
256 | + $entity->uuid = (string)$data['uuid']; |
|
257 | + $entity->node = (int)$data['node']; |
|
258 | 258 | $entity->dateCreated = new DateTime($data['date_created']); |
259 | 259 | $entity->entryLastModified = new DateTime($data['entry_last_modified']); |
260 | 260 | $entity->lastModified = date('Y-m-d H:i:s'); |
261 | - $entity->okapiSyncbase = (string) $data['okapi_syncbase']; |
|
261 | + $entity->okapiSyncbase = (string)$data['okapi_syncbase']; |
|
262 | 262 | $entity->logLastModified = new DateTime($data['log_last_modified']); |
263 | - $entity->cacheId = (int) $data['cache_id']; |
|
264 | - $entity->userId = (int) $data['user_id']; |
|
265 | - $entity->type = (int) $data['type']; |
|
266 | - $entity->ocTeamComment = (int) $data['oc_team_comment']; |
|
263 | + $entity->cacheId = (int)$data['cache_id']; |
|
264 | + $entity->userId = (int)$data['user_id']; |
|
265 | + $entity->type = (int)$data['type']; |
|
266 | + $entity->ocTeamComment = (int)$data['oc_team_comment']; |
|
267 | 267 | $entity->date = new DateTime($data['date']); |
268 | 268 | $entity->orderDate = new DateTime($data['order_date']); |
269 | - $entity->needsMaintenance = (int) $data['needs_maintenance']; |
|
270 | - $entity->listingOutdated = (int) $data['listing_outdated']; |
|
271 | - $entity->text = (string) $data['text']; |
|
272 | - $entity->textHtml = (int) $data['text_html']; |
|
273 | - $entity->textHtmledit = (int) $data['text_htmledit']; |
|
274 | - $entity->ownerNotified = (int) $data['owner_notified']; |
|
269 | + $entity->needsMaintenance = (int)$data['needs_maintenance']; |
|
270 | + $entity->listingOutdated = (int)$data['listing_outdated']; |
|
271 | + $entity->text = (string)$data['text']; |
|
272 | + $entity->textHtml = (int)$data['text_html']; |
|
273 | + $entity->textHtmledit = (int)$data['text_htmledit']; |
|
274 | + $entity->ownerNotified = (int)$data['owner_notified']; |
|
275 | 275 | $entity->picture = $data['picture']; |
276 | 276 | $entity->deletionDate = new DateTime($data['deletion_date']); |
277 | - $entity->deletedBy = (int) $data['deleted_by']; |
|
278 | - $entity->restoredBy = (int) $data['restored_by']; |
|
277 | + $entity->deletedBy = (int)$data['deleted_by']; |
|
278 | + $entity->restoredBy = (int)$data['restored_by']; |
|
279 | 279 | |
280 | 280 | return $entity; |
281 | 281 | } |