Completed
Push — development ( 89b96f...59cb16 )
by Thomas
05:00
created
htdocs_symfony/src/Controller/Backend/CoordinatesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
htdocs_symfony/src/Repository/CoordinatesRepository.php 2 patches
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -209,8 +209,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -436,7 +436,7 @@
 block discarded – undo
436 436
      * @param float $bp
437 437
      * @param float $lp
438 438
      *
439
-     * @return int[]
439
+     * @return integer[]
440 440
      */
441 441
     public function geo2gk($bp, $lp)
442 442
     {
Please login to merge, or discard this patch.