@@ -10,14 +10,9 @@ |
||
10 | 10 | use Symfony\Component\HttpFoundation\Request; |
11 | 11 | use Symfony\Component\HttpFoundation\Response; |
12 | 12 | use Symfony\Component\Routing\Annotation\Route; |
13 | -use Oc\Repository\Exception\RecordAlreadyExistsException; |
|
14 | -use Oc\Repository\Exception\RecordNotFoundException; |
|
15 | -use Oc\Repository\Exception\RecordNotPersistedException; |
|
16 | -use Oc\Repository\Exception\RecordsNotFoundException; |
|
17 | 13 | use Oc\Repository\CachesRepository; |
18 | 14 | use Oc\Repository\UserRepository; |
19 | 15 | use Oc\Repository\SecurityRolesRepository; |
20 | -use Oc\Entity\CachesEntity; |
|
21 | 16 | |
22 | 17 | class CachesController extends AbstractController |
23 | 18 | { |
@@ -52,9 +52,9 @@ |
||
52 | 52 | } else { |
53 | 53 | return $this->render( |
54 | 54 | 'backend/caches/basicview.html.twig', [ |
55 | - 'cachesForm' => $form->createView(), |
|
56 | - 'caches_by_searchfield' => $fetchedCaches |
|
57 | - ] |
|
55 | + 'cachesForm' => $form->createView(), |
|
56 | + 'caches_by_searchfield' => $fetchedCaches |
|
57 | + ] |
|
58 | 58 | ); |
59 | 59 | } |
60 | 60 | } |
@@ -225,7 +225,7 @@ |
||
225 | 225 | $fetchedCaches = $qb->execute()->fetchAll(); |
226 | 226 | |
227 | 227 | $array_size = count($fetchedCaches); |
228 | - for ($i = 0; $i < $array_size; $i ++) { |
|
228 | + for ($i = 0; $i < $array_size; $i++) { |
|
229 | 229 | // replace existing log passwords with something different |
230 | 230 | if ($fetchedCaches[$i]["logpw"] != '') { |
231 | 231 | $fetchedCaches[$i]["logpw"] = 1; |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Doctrine\DBAL\Connection; |
6 | 6 | use Oc\Entity\CachesEntity; |
7 | 7 | use Oc\Repository\Exception\RecordAlreadyExistsException; |
8 | -use Oc\Repository\Exception\RecordNotFoundException; |
|
9 | 8 | use Oc\Repository\Exception\RecordNotPersistedException; |
10 | 9 | use Oc\Repository\Exception\RecordsNotFoundException; |
11 | 10 |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $databaseArray |
122 | 122 | ); |
123 | 123 | |
124 | - $entity->cacheId = (int) $this->connection->lastInsertId(); |
|
124 | + $entity->cacheId = (int)$this->connection->lastInsertId(); |
|
125 | 125 | |
126 | 126 | return $entity; |
127 | 127 | } |
@@ -243,41 +243,41 @@ discard block |
||
243 | 243 | { |
244 | 244 | $entity = new CachesEntity(); |
245 | 245 | |
246 | - $entity->cacheId = (int) $data['cache_id']; |
|
247 | - $entity->uuid = (string) $data['uuid']; |
|
248 | - $entity->node = (int) $data['node']; |
|
246 | + $entity->cacheId = (int)$data['cache_id']; |
|
247 | + $entity->uuid = (string)$data['uuid']; |
|
248 | + $entity->node = (int)$data['node']; |
|
249 | 249 | $entity->dateCreated = new DateTime($data['date_created']); |
250 | - $entity->isPublishdate = (int) $data['is_publishdate']; |
|
250 | + $entity->isPublishdate = (int)$data['is_publishdate']; |
|
251 | 251 | $entity->lastModified = new DateTime($data['last_modified']); |
252 | - $entity->okapiSyncbase = (string) $data['okapi_syncbase']; |
|
252 | + $entity->okapiSyncbase = (string)$data['okapi_syncbase']; |
|
253 | 253 | $entity->listingLastModified = new DateTime($data['listing_last_modified']); |
254 | 254 | $entity->metaLastModified = new DateTime($data['meta_last_modified']); |
255 | - $entity->userId = (int) $data['user_id']; |
|
256 | - $entity->name = (string) $data['name']; |
|
255 | + $entity->userId = (int)$data['user_id']; |
|
256 | + $entity->name = (string)$data['name']; |
|
257 | 257 | $entity->longitude = $data['longitude']; |
258 | 258 | $entity->latitude = $data['latitude']; |
259 | - $entity->type = (int) $data['type']; |
|
260 | - $entity->status = (int) $data['status']; |
|
261 | - $entity->country = (string) $data['country']; |
|
259 | + $entity->type = (int)$data['type']; |
|
260 | + $entity->status = (int)$data['status']; |
|
261 | + $entity->country = (string)$data['country']; |
|
262 | 262 | $entity->dateHidden = new DateTime($data['date_hidden']); |
263 | - $entity->size = (int) $data['size']; |
|
264 | - $entity->difficulty = (int) $data['difficulty']; |
|
265 | - $entity->terrain = (int) $data['terrain']; |
|
266 | - $entity->logpw = (string) $data['logpw']; |
|
263 | + $entity->size = (int)$data['size']; |
|
264 | + $entity->difficulty = (int)$data['difficulty']; |
|
265 | + $entity->terrain = (int)$data['terrain']; |
|
266 | + $entity->logpw = (string)$data['logpw']; |
|
267 | 267 | $entity->searchTime = $data['search_time']; |
268 | 268 | $entity->wayLength = $data['way_length']; |
269 | - $entity->wpGc = (string) $data['wp_gc']; |
|
270 | - $entity->wpGcMaintained = (string) $data['wp_gc_maintained']; |
|
271 | - $entity->wpNc = (string) $data['wp_nc']; |
|
272 | - $entity->wpOc = (string) $data['wp_oc']; |
|
273 | - $entity->descLanguages = (string) $data['desc_languages']; |
|
274 | - $entity->defaultDesclang = (string) $data['default_desclang']; |
|
269 | + $entity->wpGc = (string)$data['wp_gc']; |
|
270 | + $entity->wpGcMaintained = (string)$data['wp_gc_maintained']; |
|
271 | + $entity->wpNc = (string)$data['wp_nc']; |
|
272 | + $entity->wpOc = (string)$data['wp_oc']; |
|
273 | + $entity->descLanguages = (string)$data['desc_languages']; |
|
274 | + $entity->defaultDesclang = (string)$data['default_desclang']; |
|
275 | 275 | $entity->dateActivate = new DateTime($data['date_activate']); |
276 | - $entity->needNpaRecalc = (int) $data['need_npa_recalc']; |
|
277 | - $entity->showCachelists = (int) $data['show_cachelists']; |
|
278 | - $entity->protectOldCoords = (int) $data['protect_old_coords']; |
|
279 | - $entity->needsMaintenance = (int) $data['needs_maintenance']; |
|
280 | - $entity->listingOutdated = (int) $data['listing_outdated']; |
|
276 | + $entity->needNpaRecalc = (int)$data['need_npa_recalc']; |
|
277 | + $entity->showCachelists = (int)$data['show_cachelists']; |
|
278 | + $entity->protectOldCoords = (int)$data['protect_old_coords']; |
|
279 | + $entity->needsMaintenance = (int)$data['needs_maintenance']; |
|
280 | + $entity->listingOutdated = (int)$data['listing_outdated']; |
|
281 | 281 | $entity->flagsLastModified = new DateTime($data['flags_last_modified']); |
282 | 282 | |
283 | 283 | return $entity; |