@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function index(): Response |
15 | 15 | { |
16 | - return $this->render('kitchensink/index.html.twig'); |
|
16 | + return $this->render('kitchensink/index.html.twig'); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | /** |
@@ -104,7 +104,7 @@ |
||
104 | 104 | |
105 | 105 | $arr = preg_split('/\s+/', $searchtext); |
106 | 106 | |
107 | - $this->coordinatesRepository->setLatLon((float) $arr[0], (float) $arr[1]); |
|
107 | + $this->coordinatesRepository->setLatLon((float)$arr[0], (float)$arr[1]); |
|
108 | 108 | |
109 | 109 | return $this->coordinatesRepository->getAllCoordinatesFormatsAsArray(); |
110 | 110 | } |
@@ -209,8 +209,8 @@ discard block |
||
209 | 209 | 0, |
210 | 210 | ]; |
211 | 211 | } |
212 | - $lw = (float) $this->nLon; |
|
213 | - $bw = (float) $this->nLat; |
|
212 | + $lw = (float)$this->nLon; |
|
213 | + $bw = (float)$this->nLat; |
|
214 | 214 | |
215 | 215 | //WGS84 Datum |
216 | 216 | //Große Halbachse a und Abplattung f |
@@ -229,9 +229,9 @@ discard block |
||
229 | 229 | |
230 | 230 | //Koeffizienten zur Berechnung der Meridianbogenlänge |
231 | 231 | $e0 = $c * (pi() / 180) * (1 - 3 * $ex2 / 4 + 45 * $ex4 / 64 - 175 * $ex6 / 256 + 11025 * $ex8 / 16384); |
232 | - $e2 = $c * (- 3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
232 | + $e2 = $c * (-3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
233 | 233 | $e4 = $c * (15 * $ex4 / 256 - 105 * $ex6 / 1024 + 2205 * $ex8 / 16384); |
234 | - $e6 = $c * (- 35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
234 | + $e6 = $c * (-35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
235 | 235 | |
236 | 236 | //Längenzone lz und Breitenzone (Band) bz |
237 | 237 | $lzn = intval(($lw + 180) / 6) + 1; |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | if ($lzn < 10) { |
258 | 258 | $lz = '0' . $lzn; |
259 | 259 | } |
260 | - $bd = (int) (1 + ($bw + 80) / 8); |
|
260 | + $bd = (int)(1 + ($bw + 80) / 8); |
|
261 | 261 | $bz = substr($b_sel, $bd - 1, 1); |
262 | 262 | |
263 | 263 | //Geographische Breite in Radianten br |
@@ -302,20 +302,20 @@ discard block |
||
302 | 302 | $ew = 0.9996 * ($nd * $cos1 * $dl + $nd * $cos3 * (1 - $tan2 + $etasq) * $dl3 / 6 + |
303 | 303 | $nd * $cos5 * (5 - 18 * $tan2 + $tan4) * $dl5 / 120) + 500000; |
304 | 304 | |
305 | - $nk = $nw - (int) $nw; |
|
305 | + $nk = $nw - (int)$nw; |
|
306 | 306 | if ($nk < 0.5) { |
307 | - $nw = '' . (int) $nw; |
|
307 | + $nw = '' . (int)$nw; |
|
308 | 308 | } else { |
309 | - $nw = '' . ((int) $nw + 1); |
|
309 | + $nw = '' . ((int)$nw + 1); |
|
310 | 310 | } |
311 | 311 | |
312 | 312 | while (strlen($nw) < 7) { |
313 | 313 | $nw = '0' . $nw; |
314 | 314 | } |
315 | 315 | |
316 | - $nk = $ew - (int) $ew; |
|
316 | + $nk = $ew - (int)$ew; |
|
317 | 317 | if ($nk < 0.5) { |
318 | - $ew = '0' . (int) $ew; |
|
318 | + $ew = '0' . (int)$ew; |
|
319 | 319 | } else { |
320 | 320 | $ew = '0' . intval($ew + 1); |
321 | 321 | } |
@@ -376,8 +376,8 @@ discard block |
||
376 | 376 | 0, |
377 | 377 | ]; |
378 | 378 | } |
379 | - $lw = (float) $lw; |
|
380 | - $bw = (float) $bw; |
|
379 | + $lw = (float)$lw; |
|
380 | + $bw = (float)$bw; |
|
381 | 381 | |
382 | 382 | // Quellsystem WGS 84 Datum |
383 | 383 | // Große Halbachse a und Abplattung fq |
@@ -461,8 +461,8 @@ discard block |
||
461 | 461 | 0, |
462 | 462 | ]; |
463 | 463 | } |
464 | - $lp = (float) $lp; |
|
465 | - $bp = (float) $bp; |
|
464 | + $lp = (float)$lp; |
|
465 | + $bp = (float)$bp; |
|
466 | 466 | |
467 | 467 | // Potsdam Datum |
468 | 468 | // Große Halbachse a und Abplattung f |
@@ -480,9 +480,9 @@ discard block |
||
480 | 480 | |
481 | 481 | // Koeffizienten zur Berechnung der Meridianbogenlänge |
482 | 482 | $e0 = $c * (pi() / 180) * (1 - 3 * $ex2 / 4 + 45 * $ex4 / 64 - 175 * $ex6 / 256 + 11025 * $ex8 / 16384); |
483 | - $e2 = $c * (- 3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
483 | + $e2 = $c * (-3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
484 | 484 | $e4 = $c * (15 * $ex4 / 256 - 105 * $ex6 / 1024 + 2205 * $ex8 / 16384); |
485 | - $e6 = $c * (- 35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
485 | + $e6 = $c * (-35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
486 | 486 | |
487 | 487 | // Breite in Radianten |
488 | 488 | $br = $bp * pi() / 180; |
@@ -520,18 +520,18 @@ discard block |
||
520 | 520 | $rw = ($nd * $cos1 * $dl + $nd * $cos3 * (1 - $tan2 + $etasq) * $dl3 / 6 + |
521 | 521 | $nd * $cos5 * (5 - 18 * $tan2 + $tan4) * $dl5 / 120 + $kz * 1e6 + 500000); |
522 | 522 | |
523 | - $nk = $hw - (int) $hw; |
|
523 | + $nk = $hw - (int)$hw; |
|
524 | 524 | if ($nk < 0.5) { |
525 | - $hw = (int) $hw; |
|
525 | + $hw = (int)$hw; |
|
526 | 526 | } else { |
527 | - $hw = ((int) $hw) + 1; |
|
527 | + $hw = ((int)$hw) + 1; |
|
528 | 528 | } |
529 | 529 | |
530 | - $nk = $rw - (int) $rw; |
|
530 | + $nk = $rw - (int)$rw; |
|
531 | 531 | if ($nk < 0.5) { |
532 | - $rw = (int) $rw; |
|
532 | + $rw = (int)$rw; |
|
533 | 533 | } else { |
534 | - $rw = (int) ($rw + 1); |
|
534 | + $rw = (int)($rw + 1); |
|
535 | 535 | } |
536 | 536 | |
537 | 537 | return [ |
@@ -555,8 +555,8 @@ discard block |
||
555 | 555 | $lat_base = 52.15517440; |
556 | 556 | $lon_base = 5.38720621; |
557 | 557 | |
558 | - for ($i = 0; $i <= 6; $i ++) { |
|
559 | - for ($j = 0; $j <= 5; $j ++) { |
|
558 | + for ($i = 0; $i <= 6; $i++) { |
|
559 | + for ($j = 0; $j <= 5; $j++) { |
|
560 | 560 | $rpq[$i][$j] = 0; |
561 | 561 | $spq[$i][$j] = 0; |
562 | 562 | } |
@@ -591,8 +591,8 @@ discard block |
||
591 | 591 | $xOrigin = 0; |
592 | 592 | $yOrigin = 0; |
593 | 593 | |
594 | - for ($q = 0; $q <= 5; $q ++) { |
|
595 | - for ($p = 0; $p <= 6; $p ++) { |
|
594 | + for ($q = 0; $q <= 5; $q++) { |
|
595 | + for ($p = 0; $p <= 6; $p++) { |
|
596 | 596 | $xOrigin = $xOrigin + ($rpq[$p][$q] * ((pow($dlat, $p)) * (pow($dlon, $q)))); |
597 | 597 | $yOrigin = $yOrigin + ($spq[$p][$q] * ((pow($dlat, $p)) * (pow($dlon, $q)))); |
598 | 598 | } |
@@ -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 | } |
@@ -187,9 +187,9 @@ discard block |
||
187 | 187 | public function getEntityFromDatabaseArray(array $data) |
188 | 188 | { |
189 | 189 | $entity = new GeoCacheReportStatusEntity(); |
190 | - $entity->id = (int) $data['id']; |
|
191 | - $entity->name = (string) $data['name']; |
|
192 | - $entity->transId = (int) $data['trans_id']; |
|
190 | + $entity->id = (int)$data['id']; |
|
191 | + $entity->name = (string)$data['name']; |
|
192 | + $entity->transId = (int)$data['trans_id']; |
|
193 | 193 | |
194 | 194 | return $entity; |
195 | 195 | } |
@@ -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 GeoCacheReportReasonsEntity(); |
191 | - $entity->id = (int) $data['id']; |
|
192 | - $entity->name = (string) $data['name']; |
|
193 | - $entity->transId = (int) $data['trans_id']; |
|
194 | - $entity->order = (int) $data['order']; |
|
191 | + $entity->id = (int)$data['id']; |
|
192 | + $entity->name = (string)$data['name']; |
|
193 | + $entity->transId = (int)$data['trans_id']; |
|
194 | + $entity->order = (int)$data['order']; |
|
195 | 195 | |
196 | 196 | return $entity; |
197 | 197 | } |
@@ -270,7 +270,9 @@ |
||
270 | 270 | $entity->comment = (string) $data['comment']; |
271 | 271 | $entity->cache = $this->cachesRepository->fetchOneBy(['cache_id' => $entity->cacheid]); |
272 | 272 | $entity->user = $this->userRepository->fetchOneById($entity->userid); |
273 | - if ($entity->adminid) $entity->admin = $this->userRepository->fetchOneById($entity->adminid); |
|
273 | + if ($entity->adminid) { |
|
274 | + $entity->admin = $this->userRepository->fetchOneById($entity->adminid); |
|
275 | + } |
|
274 | 276 | $entity->reportReason = $this->cacheReportReasonsRepository->fetchOneBy(['id' => $entity->reason]); |
275 | 277 | $entity->reportStatus = $this->cacheReportStatusRepository->fetchOneBy(['id' => $entity->status]); |
276 | 278 |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $databaseArray |
183 | 183 | ); |
184 | 184 | |
185 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
185 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
186 | 186 | |
187 | 187 | return $entity; |
188 | 188 | } |
@@ -266,16 +266,16 @@ discard block |
||
266 | 266 | { |
267 | 267 | |
268 | 268 | $entity = new GeoCacheReportsEntity(); |
269 | - $entity->id = (int) $data['id']; |
|
269 | + $entity->id = (int)$data['id']; |
|
270 | 270 | $entity->dateCreated = new DateTime($data['date_created']); |
271 | - $entity->cacheid = (int) $data['cacheid']; |
|
272 | - $entity->userid = (int) $data['userid']; |
|
273 | - $entity->reason = (int) $data['reason']; |
|
274 | - $entity->note = (string) $data['note']; |
|
275 | - $entity->status = (int) $data['status']; |
|
276 | - $entity->adminid = (int) $data['adminid']; |
|
271 | + $entity->cacheid = (int)$data['cacheid']; |
|
272 | + $entity->userid = (int)$data['userid']; |
|
273 | + $entity->reason = (int)$data['reason']; |
|
274 | + $entity->note = (string)$data['note']; |
|
275 | + $entity->status = (int)$data['status']; |
|
276 | + $entity->adminid = (int)$data['adminid']; |
|
277 | 277 | $entity->lastmodified = date('Y-m-d H:i:s'); |
278 | - $entity->comment = (string) $data['comment']; |
|
278 | + $entity->comment = (string)$data['comment']; |
|
279 | 279 | $entity->cache = $this->cachesRepository->fetchOneBy(['cache_id' => $entity->cacheid]); |
280 | 280 | $entity->user = $this->userRepository->fetchOneById($entity->userid); |
281 | 281 | if ($entity->adminid) $entity->admin = $this->userRepository->fetchOneById($entity->adminid); |
@@ -19,19 +19,19 @@ |
||
19 | 19 | $builder |
20 | 20 | ->add( |
21 | 21 | 'content_support_searchfield', null, [ |
22 | - 'attr' => [ |
|
23 | - 'placeholder' => 'OC / GC / Name / Owner / %%%', |
|
24 | - 'autofocus' => 'autofocus', |
|
25 | - 'size' => '10%', |
|
26 | - 'minlength' => '3', |
|
27 | - 'maxlength' => '100', |
|
28 | - 'style' => 'width: 250px;' |
|
29 | - ], |
|
30 | - 'required' => true, |
|
31 | - 'disabled' => false, |
|
32 | - 'label' => false, |
|
33 | - 'trim' => true |
|
34 | - ] |
|
22 | + 'attr' => [ |
|
23 | + 'placeholder' => 'OC / GC / Name / Owner / %%%', |
|
24 | + 'autofocus' => 'autofocus', |
|
25 | + 'size' => '10%', |
|
26 | + 'minlength' => '3', |
|
27 | + 'maxlength' => '100', |
|
28 | + 'style' => 'width: 250px;' |
|
29 | + ], |
|
30 | + 'required' => true, |
|
31 | + 'disabled' => false, |
|
32 | + 'label' => false, |
|
33 | + 'trim' => true |
|
34 | + ] |
|
35 | 35 | ) |
36 | 36 | ->add( |
37 | 37 | 'search_All', SubmitType::class, [ |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $databaseArray |
149 | 149 | ); |
150 | 150 | |
151 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
151 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
152 | 152 | |
153 | 153 | return $entity; |
154 | 154 | } |
@@ -228,11 +228,11 @@ discard block |
||
228 | 228 | public function getEntityFromDatabaseArray(array $data) |
229 | 229 | { |
230 | 230 | $entity = new GeoCacheAdoptionsEntity(); |
231 | - $entity->id = (int) $data['id']; |
|
232 | - $entity->cacheId = (int) $data['cache_id']; |
|
231 | + $entity->id = (int)$data['id']; |
|
232 | + $entity->cacheId = (int)$data['cache_id']; |
|
233 | 233 | $entity->date = new DateTime($data['date']); |
234 | - $entity->fromUserId = (int) $data['from_user_id']; |
|
235 | - $entity->toUserId = (int) $data['to_user_id']; |
|
234 | + $entity->fromUserId = (int)$data['from_user_id']; |
|
235 | + $entity->toUserId = (int)$data['to_user_id']; |
|
236 | 236 | $entity->fromUser = $this->userRepository->fetchOneById($entity->fromUserId); |
237 | 237 | $entity->toUser = $this->userRepository->fetchOneById($entity->toUserId); |
238 | 238 |
@@ -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 | } |