Completed
Push — master ( bf2650...6b9cb3 )
by Greg
06:18
created
app/Module/RelationshipsChartModule.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     use ModuleChartTrait;
55 55
     use ModuleConfigTrait;
56 56
 
57
-    protected const ROUTE_URL  = '/tree/{tree}/relationships-{ancestors}-{recursion}/{xref}{/xref2}';
57
+    protected const ROUTE_URL = '/tree/{tree}/relationships-{ancestors}-{recursion}/{xref}{/xref2}';
58 58
 
59 59
     /** It would be more correct to use PHP_INT_MAX, but this isn't friendly in URLs */
60 60
     public const UNLIMITED_RECURSION = 99;
@@ -330,14 +330,14 @@  discard block
 block discarded – undo
330 330
                         case 'sis':
331 331
                         case 'sib':
332 332
                             $table[$x + 1][$y] = '<div style="background:url(' . e(asset('css/images/hline.png')) . ') repeat-x center;  width: 94px; text-align: center"><div class="hline-text" style="height: 32px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px;">' . view('icons/arrow-right') . '</div></div>';
333
-                            $x                 += 2;
333
+                            $x += 2;
334 334
                             break;
335 335
                         case 'son':
336 336
                         case 'dau':
337 337
                         case 'chi':
338 338
                             if ($n > 2 && preg_match('/fat|mot|par/', $relationships[$n - 2])) {
339 339
                                 $table[$x + 1][$y - 1] = '<div style="background:url(' . $diagonal2 . '); width: 64px; height: 64px; text-align: center;"><div style="height: 32px; text-align: end;">' . Functions::getRelationshipNameFromPath($relationships[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: start;">' . view('icons/arrow-down') . '</div></div>';
340
-                                $x                     += 2;
340
+                                $x += 2;
341 341
                             } else {
342 342
                                 $table[$x][$y - 1] = '<div style="background:url(' . e('"' . asset('css/images/vline.png') . '"') . ') repeat-y center; height: 64px; text-align: center;"><div class="vline-text" style="display: inline-block; width:50%; line-height: 64px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->make($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width:50%; line-height: 64px;">' . view('icons/arrow-down') . '</div></div>';
343 343
                             }
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
                         case 'par':
349 349
                             if ($n > 2 && preg_match('/son|dau|chi/', $relationships[$n - 2])) {
350 350
                                 $table[$x + 1][$y + 1] = '<div style="background:url(' . $diagonal1 . '); background-position: top right; width: 64px; height: 64px; text-align: center;"><div style="height: 32px; text-align: start;">' . Functions::getRelationshipNameFromPath($relationships[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: end;">' . view('icons/arrow-down') . '</div></div>';
351
-                                $x                     += 2;
351
+                                $x += 2;
352 352
                             } else {
353 353
                                 $table[$x][$y + 1] = '<div style="background:url(' . e('"' . asset('css/images/vline.png') . '"') . ') repeat-y center; height: 64px; text-align:center; "><div class="vline-text" style="display: inline-block; width: 50%; line-height: 64px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->make($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width: 50%; line-height: 32px">' . view('icons/arrow-up') . '</div></div>';
354 354
                             }
@@ -646,17 +646,17 @@  discard block
 block discarded – undo
646 646
      */
647 647
     private function oldStyleRelationshipPath(Tree $tree, array $path): array
648 648
     {
649
-        $spouse_codes  = [
649
+        $spouse_codes = [
650 650
             'M' => 'hus',
651 651
             'F' => 'wif',
652 652
             'U' => 'spo',
653 653
         ];
654
-        $parent_codes  = [
654
+        $parent_codes = [
655 655
             'M' => 'fat',
656 656
             'F' => 'mot',
657 657
             'U' => 'par',
658 658
         ];
659
-        $child_codes   = [
659
+        $child_codes = [
660 660
             'M' => 'son',
661 661
             'F' => 'dau',
662 662
             'U' => 'chi',
Please login to merge, or discard this patch.