@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $databaseArray |
146 | 146 | ); |
147 | 147 | |
148 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
148 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
149 | 149 | |
150 | 150 | return $entity; |
151 | 151 | } |
@@ -224,12 +224,12 @@ discard block |
||
224 | 224 | public function getEntityFromDatabaseArray(array $data) |
225 | 225 | { |
226 | 226 | $entity = new GeoCacheCoordinatesEntity(); |
227 | - $entity->id = (int) $data['id']; |
|
227 | + $entity->id = (int)$data['id']; |
|
228 | 228 | $entity->dateCreated = new DateTime($data['date_created']); |
229 | - $entity->cacheId = (int) $data['cache_id']; |
|
229 | + $entity->cacheId = (int)$data['cache_id']; |
|
230 | 230 | $entity->longitude = $data['longitude']; |
231 | 231 | $entity->latitude = $data['latitude']; |
232 | - $entity->restoredBy = (int) $data['restored_by']; |
|
232 | + $entity->restoredBy = (int)$data['restored_by']; |
|
233 | 233 | if ($entity->restoredBy != 0) $entity->user = $this->userRepository->fetchOneById($entity->restoredBy); |
234 | 234 | |
235 | 235 | return $entity; |
@@ -230,7 +230,9 @@ |
||
230 | 230 | $entity->longitude = $data['longitude']; |
231 | 231 | $entity->latitude = $data['latitude']; |
232 | 232 | $entity->restoredBy = (int) $data['restored_by']; |
233 | - if ($entity->restoredBy != 0) $entity->user = $this->userRepository->fetchOneById($entity->restoredBy); |
|
233 | + if ($entity->restoredBy != 0) { |
|
234 | + $entity->user = $this->userRepository->fetchOneById($entity->restoredBy); |
|
235 | + } |
|
234 | 236 | |
235 | 237 | return $entity; |
236 | 238 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $databaseArray |
161 | 161 | ); |
162 | 162 | |
163 | - $entity->cacheId = (int) $this->connection->lastInsertId(); |
|
163 | + $entity->cacheId = (int)$this->connection->lastInsertId(); |
|
164 | 164 | |
165 | 165 | return $entity; |
166 | 166 | } |
@@ -238,11 +238,11 @@ discard block |
||
238 | 238 | public function getEntityFromDatabaseArray(array $data) |
239 | 239 | { |
240 | 240 | $entity = new GeoCacheStatusModifiedEntity(); |
241 | - $entity->cacheId = (int) $data['cache_id']; |
|
241 | + $entity->cacheId = (int)$data['cache_id']; |
|
242 | 242 | $entity->dateModified = new DateTime($data['date_modified']); |
243 | - $entity->oldState = (int) $data['old_state']; |
|
244 | - $entity->newState = (int) $data['new_state']; |
|
245 | - $entity->userId = (int) $data['user_id']; |
|
243 | + $entity->oldState = (int)$data['old_state']; |
|
244 | + $entity->newState = (int)$data['new_state']; |
|
245 | + $entity->userId = (int)$data['user_id']; |
|
246 | 246 | $entity->user = $this->userRepository->fetchOneById($entity->userId); |
247 | 247 | $entity->cacheStatusOld = $this->cacheStatusRepository->fetchOneBy(['id' => $entity->oldState]); |
248 | 248 | $entity->cacheStatusNew = $this->cacheStatusRepository->fetchOneBy(['id' => $entity->newState]); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $databaseArray |
146 | 146 | ); |
147 | 147 | |
148 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
148 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
149 | 149 | |
150 | 150 | return $entity; |
151 | 151 | } |
@@ -223,12 +223,12 @@ discard block |
||
223 | 223 | public function getEntityFromDatabaseArray(array $data) |
224 | 224 | : SupportUserCommentsEntity { |
225 | 225 | $entity = new SupportUserCommentsEntity(0); |
226 | - $entity->id = (int) $data['id']; |
|
227 | - $entity->ocUserId = (int) $data['oc_user_id']; |
|
226 | + $entity->id = (int)$data['id']; |
|
227 | + $entity->ocUserId = (int)$data['oc_user_id']; |
|
228 | 228 | $entity->user = $this->userRepository->fetchOneById($entity->ocUserId); |
229 | - $entity->comment = (string) $data['comment']; |
|
230 | - $entity->commentCreated = (string) $data['comment_created']; |
|
231 | - $entity->commentLastModified = (string) $data['comment_last_modified']; |
|
229 | + $entity->comment = (string)$data['comment']; |
|
230 | + $entity->commentCreated = (string)$data['comment_created']; |
|
231 | + $entity->commentLastModified = (string)$data['comment_last_modified']; |
|
232 | 232 | |
233 | 233 | return $entity; |
234 | 234 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $databaseArray |
150 | 150 | ); |
151 | 151 | |
152 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
152 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
153 | 153 | |
154 | 154 | return $entity; |
155 | 155 | } |
@@ -237,21 +237,21 @@ discard block |
||
237 | 237 | public function getEntityFromDatabaseArray(array $data) |
238 | 238 | : SupportListingInfosEntity { |
239 | 239 | $entity = new SupportListingInfosEntity(); |
240 | - $entity->id = (int) $data['id']; |
|
241 | - $entity->wpOc = (string) $data['wp_oc']; |
|
242 | - $entity->nodeId = (int) $data['node_id']; |
|
243 | - $entity->nodeOwnerId = (string) $data['node_owner_id']; |
|
244 | - $entity->nodeListingId = (string) $data['node_listing_id']; |
|
245 | - $entity->nodeListingWP = (string) $data['node_listing_wp']; |
|
246 | - $entity->nodeListingName = (string) $data['node_listing_name']; |
|
247 | - $entity->nodeListingSize = (int) $data['node_listing_size']; |
|
248 | - $entity->nodeListingDifficulty = (int) $data['node_listing_difficulty']; |
|
249 | - $entity->nodeListingTerrain = (int) $data['node_listing_terrain']; |
|
250 | - $entity->nodeListingCoordinatesLon = (double) $data['node_listing_coordinates_lon']; |
|
251 | - $entity->nodeListingCoordinatesLat = (double) $data['node_listing_coordinates_lat']; |
|
252 | - $entity->nodeListingArchived = (bool) $data['node_listing_archived']; |
|
240 | + $entity->id = (int)$data['id']; |
|
241 | + $entity->wpOc = (string)$data['wp_oc']; |
|
242 | + $entity->nodeId = (int)$data['node_id']; |
|
243 | + $entity->nodeOwnerId = (string)$data['node_owner_id']; |
|
244 | + $entity->nodeListingId = (string)$data['node_listing_id']; |
|
245 | + $entity->nodeListingWP = (string)$data['node_listing_wp']; |
|
246 | + $entity->nodeListingName = (string)$data['node_listing_name']; |
|
247 | + $entity->nodeListingSize = (int)$data['node_listing_size']; |
|
248 | + $entity->nodeListingDifficulty = (int)$data['node_listing_difficulty']; |
|
249 | + $entity->nodeListingTerrain = (int)$data['node_listing_terrain']; |
|
250 | + $entity->nodeListingCoordinatesLon = (double)$data['node_listing_coordinates_lon']; |
|
251 | + $entity->nodeListingCoordinatesLat = (double)$data['node_listing_coordinates_lat']; |
|
252 | + $entity->nodeListingArchived = (bool)$data['node_listing_archived']; |
|
253 | 253 | $entity->lastModified = new DateTime($data['last_modified']); |
254 | - $entity->importStatus = (int) $data['importstatus']; |
|
254 | + $entity->importStatus = (int)$data['importstatus']; |
|
255 | 255 | $entity->node = $this->nodesRepository->fetchOneBy(['id' => $entity->nodeId]); |
256 | 256 | |
257 | 257 | return $entity; |
@@ -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 | } |
@@ -231,11 +231,11 @@ discard block |
||
231 | 231 | public function getEntityFromDatabaseArray(array $data) |
232 | 232 | : SupportUserRelationsEntity { |
233 | 233 | $entity = new SupportUserRelationsEntity(); |
234 | - $entity->id = (int) $data['id']; |
|
235 | - $entity->ocUserId = (int) $data['oc_user_id']; |
|
236 | - $entity->nodeId = (int) $data['node_id']; |
|
237 | - $entity->nodeUserId = (string) $data['node_user_id']; |
|
238 | - $entity->nodeUsername = (string) $data['node_username']; |
|
234 | + $entity->id = (int)$data['id']; |
|
235 | + $entity->ocUserId = (int)$data['oc_user_id']; |
|
236 | + $entity->nodeId = (int)$data['node_id']; |
|
237 | + $entity->nodeUserId = (string)$data['node_user_id']; |
|
238 | + $entity->nodeUsername = (string)$data['node_username']; |
|
239 | 239 | $entity->node = $this->nodesRepository->fetchOneBy(['id' => $entity->nodeId]); |
240 | 240 | $entity->user = $this->userRepository->fetchOneById($entity->ocUserId); |
241 | 241 |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $databaseArray |
142 | 142 | ); |
143 | 143 | |
144 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
144 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
145 | 145 | |
146 | 146 | return $entity; |
147 | 147 | } |
@@ -219,11 +219,11 @@ discard block |
||
219 | 219 | public function getEntityFromDatabaseArray(array $data) |
220 | 220 | : SupportListingCommentsEntity { |
221 | 221 | $entity = new SupportListingCommentsEntity(''); |
222 | - $entity->id = (int) $data['id']; |
|
223 | - $entity->wpOc = (string) $data['wp_oc']; |
|
224 | - $entity->comment = (string) $data['comment']; |
|
225 | - $entity->commentCreated = (string) $data['comment_created']; |
|
226 | - $entity->commentLastModified = (string) $data['comment_last_modified']; |
|
222 | + $entity->id = (int)$data['id']; |
|
223 | + $entity->wpOc = (string)$data['wp_oc']; |
|
224 | + $entity->comment = (string)$data['comment']; |
|
225 | + $entity->commentCreated = (string)$data['comment_created']; |
|
226 | + $entity->commentLastModified = (string)$data['comment_last_modified']; |
|
227 | 227 | |
228 | 228 | return $entity; |
229 | 229 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $databaseArray |
122 | 122 | ); |
123 | 123 | |
124 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
124 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
125 | 125 | |
126 | 126 | return $entity; |
127 | 127 | } |
@@ -188,10 +188,10 @@ discard block |
||
188 | 188 | public function getEntityFromDatabaseArray(array $data) |
189 | 189 | { |
190 | 190 | $entity = new NodesEntity(); |
191 | - $entity->id = (int) $data['id']; |
|
192 | - $entity->name = (string) $data['name']; |
|
193 | - $entity->url = (string) $data['url']; |
|
194 | - $entity->waypointPrefix = (string) $data['waypoint_prefix']; |
|
191 | + $entity->id = (int)$data['id']; |
|
192 | + $entity->name = (string)$data['name']; |
|
193 | + $entity->url = (string)$data['url']; |
|
194 | + $entity->waypointPrefix = (string)$data['waypoint_prefix']; |
|
195 | 195 | |
196 | 196 | return $entity; |
197 | 197 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $databaseArray |
141 | 141 | ); |
142 | 142 | |
143 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
143 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
144 | 144 | |
145 | 145 | return $entity; |
146 | 146 | } |
@@ -216,10 +216,10 @@ discard block |
||
216 | 216 | public function getEntityFromDatabaseArray(array $data) |
217 | 217 | : SupportBonuscachesEntity { |
218 | 218 | $entity = new SupportBonuscachesEntity(); |
219 | - $entity->id = (int) $data['id']; |
|
220 | - $entity->wpOc = (string) $data['wp_oc']; |
|
221 | - $entity->isBonusCache = (bool) $data['is_bonus_cache']; |
|
222 | - $entity->belongsToBonusCache = (string) $data['belongs_to_bonus_cache']; |
|
219 | + $entity->id = (int)$data['id']; |
|
220 | + $entity->wpOc = (string)$data['wp_oc']; |
|
221 | + $entity->isBonusCache = (bool)$data['is_bonus_cache']; |
|
222 | + $entity->belongsToBonusCache = (string)$data['belongs_to_bonus_cache']; |
|
223 | 223 | |
224 | 224 | return $entity; |
225 | 225 | } |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | |
167 | 167 | return $this->render( |
168 | 168 | 'backend/support/searchedCaches.html.twig', [ |
169 | - 'supportCachesForm' => $formSearch->createView(), |
|
170 | - 'foundCaches' => $fetchedCaches |
|
171 | - ] |
|
169 | + 'supportCachesForm' => $formSearch->createView(), |
|
170 | + 'foundCaches' => $fetchedCaches |
|
171 | + ] |
|
172 | 172 | ); |
173 | 173 | } |
174 | 174 | |
@@ -187,9 +187,9 @@ discard block |
||
187 | 187 | |
188 | 188 | return $this->render( |
189 | 189 | 'backend/support/reportedCaches.html.twig', [ |
190 | - 'supportCachesForm' => $formSearch->createView(), |
|
191 | - 'reportedCaches_by_id' => $fetchedReports |
|
192 | - ] |
|
190 | + 'supportCachesForm' => $formSearch->createView(), |
|
191 | + 'reportedCaches_by_id' => $fetchedReports |
|
192 | + ] |
|
193 | 193 | ); |
194 | 194 | } |
195 | 195 | |
@@ -207,9 +207,9 @@ discard block |
||
207 | 207 | |
208 | 208 | return $this->render( |
209 | 209 | 'backend/support/bonusCaches.html.twig', [ |
210 | - 'supportCachesForm' => $formSearch->createView(), |
|
211 | - 'bonusCaches_by_id' => $fetchedBonuscaches |
|
212 | - ] |
|
210 | + 'supportCachesForm' => $formSearch->createView(), |
|
211 | + 'bonusCaches_by_id' => $fetchedBonuscaches |
|
212 | + ] |
|
213 | 213 | ); |
214 | 214 | } |
215 | 215 | |
@@ -250,10 +250,10 @@ discard block |
||
250 | 250 | |
251 | 251 | return $this->render( |
252 | 252 | 'backend/support/databaseQueries.html.twig', [ |
253 | - 'supportCachesForm' => $formSearch->createView(), |
|
254 | - 'SQLFlexForm' => $form->createView(), |
|
255 | - 'suppSQLqueryFlex' => $fetchedInformation |
|
256 | - ] |
|
253 | + 'supportCachesForm' => $formSearch->createView(), |
|
254 | + 'SQLFlexForm' => $form->createView(), |
|
255 | + 'suppSQLqueryFlex' => $fetchedInformation |
|
256 | + ] |
|
257 | 257 | ); |
258 | 258 | } |
259 | 259 | |
@@ -381,16 +381,16 @@ discard block |
||
381 | 381 | |
382 | 382 | return $this->render( |
383 | 383 | 'backend/support/occ.html.twig', [ |
384 | - 'supportCachesForm' => $formSearch->createView(), |
|
385 | - 'supportCommentFormUser' => $formCommentUser->createView(), |
|
386 | - 'supportCommentFormCache' => $formCommentCache->createView(), |
|
387 | - 'occ_cache_data' => $fetchedCacheData, |
|
388 | - 'occ_cache_comments' => $fetchedCacheComments, |
|
389 | - 'occ_cache_infos' => $fetchedCacheInfos, |
|
390 | - 'occ_user_data' => $fetchedUserData, |
|
391 | - 'occ_user_comments' => $fetchedUserComments, |
|
392 | - 'occ_user_relations' => $fetchedUserRelations |
|
393 | - ] |
|
384 | + 'supportCachesForm' => $formSearch->createView(), |
|
385 | + 'supportCommentFormUser' => $formCommentUser->createView(), |
|
386 | + 'supportCommentFormCache' => $formCommentCache->createView(), |
|
387 | + 'occ_cache_data' => $fetchedCacheData, |
|
388 | + 'occ_cache_comments' => $fetchedCacheComments, |
|
389 | + 'occ_cache_infos' => $fetchedCacheInfos, |
|
390 | + 'occ_user_data' => $fetchedUserData, |
|
391 | + 'occ_user_comments' => $fetchedUserComments, |
|
392 | + 'occ_user_relations' => $fetchedUserRelations |
|
393 | + ] |
|
394 | 394 | ); |
395 | 395 | } |
396 | 396 | |
@@ -514,10 +514,10 @@ discard block |
||
514 | 514 | |
515 | 515 | return $this->render( |
516 | 516 | 'backend/support/userDetails.html.twig', [ |
517 | - 'supportCachesForm' => $formSearch->createView(), |
|
518 | - 'supportUserAccountActions' => $formActions->createView(), |
|
519 | - 'user_account_details' => $fetchedUserDetails |
|
520 | - ] |
|
517 | + 'supportCachesForm' => $formSearch->createView(), |
|
518 | + 'supportUserAccountActions' => $formActions->createView(), |
|
519 | + 'user_account_details' => $fetchedUserDetails |
|
520 | + ] |
|
521 | 521 | ); |
522 | 522 | } |
523 | 523 | |
@@ -608,9 +608,9 @@ discard block |
||
608 | 608 | |
609 | 609 | return $this->render( |
610 | 610 | 'backend/support/databaseQueries.html.twig', [ |
611 | - 'supportCachesForm' => $formSearch->createView(), |
|
612 | - 'suppSQLquery1' => $qb->execute()->fetchAll() |
|
613 | - ] |
|
611 | + 'supportCachesForm' => $formSearch->createView(), |
|
612 | + 'suppSQLquery1' => $qb->execute()->fetchAll() |
|
613 | + ] |
|
614 | 614 | ); |
615 | 615 | } |
616 | 616 | |
@@ -634,9 +634,9 @@ discard block |
||
634 | 634 | |
635 | 635 | return $this->render( |
636 | 636 | 'backend/support/databaseQueries.html.twig', [ |
637 | - 'supportCachesForm' => $formSearch->createView(), |
|
638 | - 'suppSQLquery2' => $qb->execute()->fetchAll() |
|
639 | - ] |
|
637 | + 'supportCachesForm' => $formSearch->createView(), |
|
638 | + 'suppSQLquery2' => $qb->execute()->fetchAll() |
|
639 | + ] |
|
640 | 640 | ); |
641 | 641 | } |
642 | 642 | |
@@ -662,9 +662,9 @@ discard block |
||
662 | 662 | |
663 | 663 | return $this->render( |
664 | 664 | 'backend/support/databaseQueries.html.twig', [ |
665 | - 'supportCachesForm' => $formSearch->createView(), |
|
666 | - 'suppSQLquery4' => $qb->execute()->fetchAll() |
|
667 | - ] |
|
665 | + 'supportCachesForm' => $formSearch->createView(), |
|
666 | + 'suppSQLquery4' => $qb->execute()->fetchAll() |
|
667 | + ] |
|
668 | 668 | ); |
669 | 669 | } |
670 | 670 | |
@@ -680,9 +680,9 @@ discard block |
||
680 | 680 | |
681 | 681 | return $this->render( |
682 | 682 | 'backend/support/databaseQueries.html.twig', [ |
683 | - 'supportCachesForm' => $formSearch->createView(), |
|
684 | - 'suppSQLquery5' => $this->supportUserCommentsRepository->fetchAll() |
|
685 | - ] |
|
683 | + 'supportCachesForm' => $formSearch->createView(), |
|
684 | + 'suppSQLquery5' => $this->supportUserCommentsRepository->fetchAll() |
|
685 | + ] |
|
686 | 686 | ); |
687 | 687 | } |
688 | 688 |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $fetchedInformation = $this->executeSQL_flexible($inputData['content_WHAT'], $inputData['content_TABLE']); |
236 | 236 | |
237 | 237 | $countFetched = count($fetchedInformation); |
238 | - for ($i = 0; $i < $countFetched; $i ++) { |
|
238 | + for ($i = 0; $i < $countFetched; $i++) { |
|
239 | 239 | if (array_key_exists('password', $fetchedInformation[$i])) { |
240 | 240 | $fetchedInformation[$i]['password'] = '-'; |
241 | 241 | } |
@@ -411,18 +411,18 @@ discard block |
||
411 | 411 | $inputData = $form->getData(); |
412 | 412 | |
413 | 413 | if ($inputData['hidden_sender'] == 'textfield_cache_comment') { |
414 | - $entity = $this->supportListingCommentsRepository->fetchOneBy(['wp_oc' => (string) $inputData['hidden_ID2']]); |
|
414 | + $entity = $this->supportListingCommentsRepository->fetchOneBy(['wp_oc' => (string)$inputData['hidden_ID2']]); |
|
415 | 415 | $entity->comment = $inputData['content_comment_field']; |
416 | 416 | $this->supportListingCommentsRepository->update($entity); |
417 | 417 | } elseif ($inputData['hidden_sender'] == 'textfield_user_comment') { |
418 | - $entity = $this->supportUserCommentsRepository->fetchOneBy(['oc_user_id' => (int) $inputData['hidden_ID1']]); |
|
418 | + $entity = $this->supportUserCommentsRepository->fetchOneBy(['oc_user_id' => (int)$inputData['hidden_ID1']]); |
|
419 | 419 | $entity->comment = $inputData['content_comment_field']; |
420 | 420 | $this->supportUserCommentsRepository->update($entity); |
421 | 421 | } |
422 | 422 | |
423 | 423 | return $this->redirectToRoute('backend_support_occ', [ |
424 | - 'userID' => (string) $inputData['hidden_ID1'], |
|
425 | - 'wpID' => (string) $inputData['hidden_ID2'] |
|
424 | + 'userID' => (string)$inputData['hidden_ID1'], |
|
425 | + 'wpID' => (string)$inputData['hidden_ID2'] |
|
426 | 426 | ]); |
427 | 427 | } |
428 | 428 | |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | if ($form->isSubmitted() && $form->isValid()) { |
446 | 446 | $inputData = $form->getData(); |
447 | 447 | |
448 | - $entity = $this->cacheReportsRepository->fetchOneBy(['id' => (int) $inputData['hidden_ID1']]); |
|
448 | + $entity = $this->cacheReportsRepository->fetchOneBy(['id' => (int)$inputData['hidden_ID1']]); |
|
449 | 449 | $entity->comment = $inputData['content_comment_field']; |
450 | 450 | |
451 | 451 | $this->cacheReportsRepository->update($entity); |