@@ -54,7 +54,7 @@ discard block |
||
| 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; |
@@ -332,14 +332,14 @@ discard block |
||
| 332 | 332 | case 'sis': |
| 333 | 333 | case 'sib': |
| 334 | 334 | $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], Factory::individual()->make($path[$n - 1], $tree), Factory::individual()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px;">' . view('icons/arrow-right') . '</div></div>'; |
| 335 | - $x += 2; |
|
| 335 | + $x += 2; |
|
| 336 | 336 | break; |
| 337 | 337 | case 'son': |
| 338 | 338 | case 'dau': |
| 339 | 339 | case 'chi': |
| 340 | 340 | if ($n > 2 && preg_match('/fat|mot|par/', $relationships[$n - 2])) { |
| 341 | 341 | $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], Factory::individual()->make($path[$n - 1], $tree), Factory::individual()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: start;">' . view('icons/arrow-down') . '</div></div>'; |
| 342 | - $x += 2; |
|
| 342 | + $x += 2; |
|
| 343 | 343 | } else { |
| 344 | 344 | $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], Factory::individual()->make($path[$n - 1], $tree), Factory::individual()->make($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width:50%; line-height: 64px;">' . view('icons/arrow-down') . '</div></div>'; |
| 345 | 345 | } |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | case 'par': |
| 351 | 351 | if ($n > 2 && preg_match('/son|dau|chi/', $relationships[$n - 2])) { |
| 352 | 352 | $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], Factory::individual()->make($path[$n - 1], $tree), Factory::individual()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: end;">' . view('icons/arrow-down') . '</div></div>'; |
| 353 | - $x += 2; |
|
| 353 | + $x += 2; |
|
| 354 | 354 | } else { |
| 355 | 355 | $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], Factory::individual()->make($path[$n - 1], $tree), Factory::individual()->make($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width: 50%; line-height: 32px">' . view('icons/arrow-up') . '</div></div>'; |
| 356 | 356 | } |
@@ -648,17 +648,17 @@ discard block |
||
| 648 | 648 | */ |
| 649 | 649 | private function oldStyleRelationshipPath(Tree $tree, array $path): array |
| 650 | 650 | { |
| 651 | - $spouse_codes = [ |
|
| 651 | + $spouse_codes = [ |
|
| 652 | 652 | 'M' => 'hus', |
| 653 | 653 | 'F' => 'wif', |
| 654 | 654 | 'U' => 'spo', |
| 655 | 655 | ]; |
| 656 | - $parent_codes = [ |
|
| 656 | + $parent_codes = [ |
|
| 657 | 657 | 'M' => 'fat', |
| 658 | 658 | 'F' => 'mot', |
| 659 | 659 | 'U' => 'par', |
| 660 | 660 | ]; |
| 661 | - $child_codes = [ |
|
| 661 | + $child_codes = [ |
|
| 662 | 662 | 'M' => 'son', |
| 663 | 663 | 'F' => 'dau', |
| 664 | 664 | 'U' => 'chi', |
@@ -59,5 +59,5 @@ |
||
| 59 | 59 | * |
| 60 | 60 | * @return Location |
| 61 | 61 | */ |
| 62 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Location; |
|
| 62 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Location; |
|
| 63 | 63 | } |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | * |
| 90 | 90 | * @return Location |
| 91 | 91 | */ |
| 92 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Location |
|
| 92 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Location |
|
| 93 | 93 | { |
| 94 | 94 | return new Location($xref, $gedcom, $pending, $tree); |
| 95 | 95 | } |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | $alpha = $request->getQueryParams()['alpha'] ?? ''; |
| 137 | 137 | |
| 138 | 138 | // All individuals with this surname |
| 139 | - $surname = $request->getQueryParams()['surname'] ?? ''; |
|
| 139 | + $surname = $request->getQueryParams()['surname'] ?? ''; |
|
| 140 | 140 | |
| 141 | 141 | // All individuals |
| 142 | 142 | $show_all = $request->getQueryParams()['show_all'] ?? 'no'; |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | 'tree' => $tree->name(), |
| 190 | 190 | 'show_all' => 'yes', |
| 191 | 191 | ]; |
| 192 | - $show = $request->getQueryParams()['show'] ?? 'surn'; |
|
| 192 | + $show = $request->getQueryParams()['show'] ?? 'surn'; |
|
| 193 | 193 | } |
| 194 | 194 | } elseif ($surname !== '') { |
| 195 | 195 | $alpha = $this->localization_service->initialLetter($surname, I18N::locale()); // so we can highlight the initial letter |
@@ -46,8 +46,8 @@ |
||
| 46 | 46 | string $color_male = null, |
| 47 | 47 | string $color_unknown = null |
| 48 | 48 | ): string { |
| 49 | - $color_female = $color_female ?? '#ffd1dc'; |
|
| 50 | - $color_male = $color_male ?? '#84beff'; |
|
| 49 | + $color_female = $color_female ?? '#ffd1dc'; |
|
| 50 | + $color_male = $color_male ?? '#84beff'; |
|
| 51 | 51 | $color_unknown = $color_unknown ?? '#777777'; |
| 52 | 52 | |
| 53 | 53 | $data = [ |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | $chart_color1 = (string) $this->theme->parameter('distribution-chart-no-values'); |
| 102 | 102 | $chart_color2 = (string) $this->theme->parameter('distribution-chart-high-values'); |
| 103 | 103 | $color_from = $color_from ?? $chart_color1; |
| 104 | - $color_to = $color_to ?? $chart_color2; |
|
| 104 | + $color_to = $color_to ?? $chart_color2; |
|
| 105 | 105 | |
| 106 | 106 | $data = [ |
| 107 | 107 | [ |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | string $color_dead = null |
| 60 | 60 | ): string { |
| 61 | 61 | $color_living = $color_living ?? '#ffffff'; |
| 62 | - $color_dead = $color_dead ?? '#cccccc'; |
|
| 62 | + $color_dead = $color_dead ?? '#cccccc'; |
|
| 63 | 63 | |
| 64 | 64 | $data = [ |
| 65 | 65 | [ |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $tot_l |
| 75 | 75 | ]; |
| 76 | 76 | |
| 77 | - $data[] = [ |
|
| 77 | + $data[] = [ |
|
| 78 | 78 | I18N::translate('Dead'), |
| 79 | 79 | $tot_d |
| 80 | 80 | ]; |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $chart_color1 = (string) $this->theme->parameter('distribution-chart-no-values'); |
| 70 | 70 | $chart_color2 = (string) $this->theme->parameter('distribution-chart-high-values'); |
| 71 | 71 | $color_from = $color_from ?? $chart_color1; |
| 72 | - $color_to = $color_to ?? $chart_color2; |
|
| 72 | + $color_to = $color_to ?? $chart_color2; |
|
| 73 | 73 | |
| 74 | 74 | $tot = 0; |
| 75 | 75 | foreach ($given as $count) { |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | ]; |
| 85 | 85 | |
| 86 | 86 | foreach ($given as $name => $count) { |
| 87 | - $data[] = [ $name, $count ]; |
|
| 87 | + $data[] = [$name, $count]; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | $data[] = [ |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | $chart_color1 = (string) $this->theme->parameter('distribution-chart-no-values'); |
| 129 | 129 | $chart_color2 = (string) $this->theme->parameter('distribution-chart-high-values'); |
| 130 | 130 | $color_from = $color_from ?? $chart_color1; |
| 131 | - $color_to = $color_to ?? $chart_color2; |
|
| 131 | + $color_to = $color_to ?? $chart_color2; |
|
| 132 | 132 | |
| 133 | 133 | $tot = 0; |
| 134 | 134 | foreach ($all_surnames as $surn => $surnames) { |