@@ -94,7 +94,7 @@ |
||
| 94 | 94 | |
| 95 | 95 | case 'name': |
| 96 | 96 | $name_tags = Registry::elementFactory()->make('INDI:NAME')->subtags(); |
| 97 | - $name_tags = array_map(static fn (string $tag): string => '2 ' . $tag, $name_tags); |
|
| 97 | + $name_tags = array_map(static fn(string $tag): string => '2 ' . $tag, $name_tags); |
|
| 98 | 98 | $name_tags[] = '1 NAME'; |
| 99 | 99 | |
| 100 | 100 | $records = $this->search_service->searchIndividuals([$tree], [$search]); |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function relationships(): array |
| 88 | 88 | { |
| 89 | - $pra = static fn (int $n, string $nominative, string $genitive): array => [ |
|
| 89 | + $pra = static fn(int $n, string $nominative, string $genitive): array => [ |
|
| 90 | 90 | ($n > 3 ? 'pra ×' . $n . ' ' : str_repeat('pra-', $n)) . $nominative, |
| 91 | 91 | ($n > 3 ? 'pra ×' . $n . ' ' : str_repeat('pra-', $n)) . $genitive, |
| 92 | 92 | ]; |
| 93 | 93 | |
| 94 | - $cousin = static fn (int $n, array $cousins, string $nominative, string $genitive): array => $cousins[$n] ?? [ |
|
| 94 | + $cousin = static fn(int $n, array $cousins, string $nominative, string $genitive): array => $cousins[$n] ?? [ |
|
| 95 | 95 | $nominative . ' z ' . $n . '. kolena', |
| 96 | 96 | $genitive . '%s z ' . $n . '. kolena', |
| 97 | 97 | ]; |
@@ -147,9 +147,9 @@ discard block |
||
| 147 | 147 | Relationship::fixed('prastarý otec', '%s prastarého otca')->parent()->parent()->mother(), |
| 148 | 148 | Relationship::fixed('prastarý otec', '%s prastarého otca')->parent()->parent()->parent(), |
| 149 | 149 | // Ancestors |
| 150 | - Relationship::dynamic(fn (int $n) => $pra($n - 1, 'prastarý otec', '%s prastarého otca'))->ancestor()->male(), |
|
| 151 | - Relationship::dynamic(fn (int $n) => $pra($n - 1, 'prastará matka', '%s prastarej matky'))->ancestor()->female(), |
|
| 152 | - Relationship::dynamic(fn (int $n) => $pra($n - 1, 'prastarý rodič', '%s prastarého rodiča'))->ancestor(), |
|
| 150 | + Relationship::dynamic(fn(int $n) => $pra($n - 1, 'prastarý otec', '%s prastarého otca'))->ancestor()->male(), |
|
| 151 | + Relationship::dynamic(fn(int $n) => $pra($n - 1, 'prastará matka', '%s prastarej matky'))->ancestor()->female(), |
|
| 152 | + Relationship::dynamic(fn(int $n) => $pra($n - 1, 'prastarý rodič', '%s prastarého rodiča'))->ancestor(), |
|
| 153 | 153 | // Grandchildren |
| 154 | 154 | Relationship::fixed('vnuk', '%s vnuka')->child()->son(), |
| 155 | 155 | Relationship::fixed('vnučka', '%s vnučky')->child()->daughter(), |
@@ -159,9 +159,9 @@ discard block |
||
| 159 | 159 | Relationship::fixed('pravnučka', '%s pravnučky')->child()->child()->daughter(), |
| 160 | 160 | Relationship::fixed('pravnúča', '%s pravnúčaťa')->child()->child()->child(), |
| 161 | 161 | // Descendants |
| 162 | - Relationship::dynamic(fn (int $n) => $pra($n - 1, 'pravnuk', '%s pravnuka'))->ancestor()->male(), |
|
| 163 | - Relationship::dynamic(fn (int $n) => $pra($n - 1, 'pravnučka', '%s pravnučky'))->ancestor()->female(), |
|
| 164 | - Relationship::dynamic(fn (int $n) => $pra($n - 1, 'pravnúča', '%s pravnúčaťa'))->ancestor(), |
|
| 162 | + Relationship::dynamic(fn(int $n) => $pra($n - 1, 'pravnuk', '%s pravnuka'))->ancestor()->male(), |
|
| 163 | + Relationship::dynamic(fn(int $n) => $pra($n - 1, 'pravnučka', '%s pravnučky'))->ancestor()->female(), |
|
| 164 | + Relationship::dynamic(fn(int $n) => $pra($n - 1, 'pravnúča', '%s pravnúčaťa'))->ancestor(), |
|
| 165 | 165 | // Aunts and uncles |
| 166 | 166 | Relationship::fixed('ujo', '%s uja')->mother()->brother(), |
| 167 | 167 | Relationship::fixed('ujčiná', '%s ujčinej')->mother()->brother()->wife(), |
@@ -169,20 +169,20 @@ discard block |
||
| 169 | 169 | Relationship::fixed('strýko', '%s strýka')->parent()->brother(), |
| 170 | 170 | Relationship::fixed('teta', '%s tety')->parent()->sister(), |
| 171 | 171 | // Great-aunts and great-uncles |
| 172 | - Relationship::dynamic(fn (int $n) => $pra($n - 2, 'prastrýko', '%s prastrýka'))->ancestor()->brother(), |
|
| 173 | - Relationship::dynamic(fn (int $n) => $pra($n - 2, 'prateta', '%s pratety'))->ancestor()->sister(), |
|
| 172 | + Relationship::dynamic(fn(int $n) => $pra($n - 2, 'prastrýko', '%s prastrýka'))->ancestor()->brother(), |
|
| 173 | + Relationship::dynamic(fn(int $n) => $pra($n - 2, 'prateta', '%s pratety'))->ancestor()->sister(), |
|
| 174 | 174 | // Nieces and nephews |
| 175 | 175 | Relationship::fixed('synovec', '%s synovca')->sibling()->son(), |
| 176 | 176 | Relationship::fixed('neter', '%s netere')->sibling()->daughter(), |
| 177 | 177 | // Great-nieces and great-nephews |
| 178 | 178 | Relationship::fixed('prasynovec', '%s prasynovca')->sibling()->child()->son(), |
| 179 | 179 | Relationship::fixed('praneter', '%s pranetere')->sibling()->child()->daughter(), |
| 180 | - Relationship::dynamic(fn (int $n) => $pra($n - 2, 'prasynovec', '%s prasynovca'))->sibling()->descendant()->son(), |
|
| 181 | - Relationship::dynamic(fn (int $n) => $pra($n - 2, 'praneter', '%s pranetere'))->sibling()->descendant()->daughter(), |
|
| 180 | + Relationship::dynamic(fn(int $n) => $pra($n - 2, 'prasynovec', '%s prasynovca'))->sibling()->descendant()->son(), |
|
| 181 | + Relationship::dynamic(fn(int $n) => $pra($n - 2, 'praneter', '%s pranetere'))->sibling()->descendant()->daughter(), |
|
| 182 | 182 | // Cousins |
| 183 | - Relationship::dynamic(fn (int $n): array => $cousin($n, static::FEMALE_COUSINS, '', ''))->symmetricCousin()->female(), |
|
| 184 | - Relationship::dynamic(fn (int $n): array => $cousin($n, static::MALE_COUSINS, '', ''))->symmetricCousin()->male(), |
|
| 185 | - Relationship::dynamic(fn (int $n): array => $cousin($n, static::MALE_COUSINS, '', ''))->symmetricCousin(), |
|
| 183 | + Relationship::dynamic(fn(int $n): array => $cousin($n, static::FEMALE_COUSINS, '', ''))->symmetricCousin()->female(), |
|
| 184 | + Relationship::dynamic(fn(int $n): array => $cousin($n, static::MALE_COUSINS, '', ''))->symmetricCousin()->male(), |
|
| 185 | + Relationship::dynamic(fn(int $n): array => $cousin($n, static::MALE_COUSINS, '', ''))->symmetricCousin(), |
|
| 186 | 186 | ]; |
| 187 | 187 | } |
| 188 | 188 | } |
@@ -118,15 +118,15 @@ discard block |
||
| 118 | 118 | public function relationships(): array |
| 119 | 119 | { |
| 120 | 120 | // Genitive forms in English are simple/regular, as no relationship name ends in "s". |
| 121 | - $genitive = static fn (string $s): array => [$s, $s . '’s %s']; |
|
| 121 | + $genitive = static fn(string $s): array => [$s, $s . '’s %s']; |
|
| 122 | 122 | |
| 123 | - $cousin = fn (int $up, int $down): array => $genitive( |
|
| 123 | + $cousin = fn(int $up, int $down): array => $genitive( |
|
| 124 | 124 | (static::COUSIN[min($up, $down)] ?? 'distant cousin') . |
| 125 | 125 | (static::REMOVED[abs($up - $down)] ?? ' many times removed') . |
| 126 | 126 | static::DIRECTION[$up <=> $down] |
| 127 | 127 | ); |
| 128 | 128 | |
| 129 | - $great = static fn (int $n, string $prefix, string $suffix): array => $genitive( |
|
| 129 | + $great = static fn(int $n, string $prefix, string $suffix): array => $genitive( |
|
| 130 | 130 | $prefix . ($n > 3 ? 'great ×' . $n . ' ' : str_repeat('great-', $n)) . $suffix |
| 131 | 131 | ); |
| 132 | 132 | |
@@ -221,22 +221,22 @@ discard block |
||
| 221 | 221 | Relationship::fixed('grandson', 'grandson’s %s')->child()->son(), |
| 222 | 222 | Relationship::fixed('grandchild', 'grandchild’s %s')->child()->child(), |
| 223 | 223 | // Relationships with dynamically generated names |
| 224 | - Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'aunt'))->ancestor()->sister(), |
|
| 225 | - Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'aunt'))->ancestor()->sibling()->wife(), |
|
| 226 | - Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'uncle'))->ancestor()->brother(), |
|
| 227 | - Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'uncle'))->ancestor()->sibling()->husband(), |
|
| 228 | - Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'niece'))->sibling()->descendant()->female(), |
|
| 229 | - Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'niece'))->married()->spouse()->sibling()->descendant()->female(), |
|
| 230 | - Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'nephew'))->sibling()->descendant()->male(), |
|
| 231 | - Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'nephew'))->married()->spouse()->sibling()->descendant()->male(), |
|
| 232 | - Relationship::dynamic(fn (int $n) => $great($n - 2, 'maternal ', 'grandmother'))->mother()->ancestor()->female(), |
|
| 233 | - Relationship::dynamic(fn (int $n) => $great($n - 1, 'maternal ', 'grandfather'))->mother()->ancestor()->male(), |
|
| 234 | - Relationship::dynamic(fn (int $n) => $great($n - 1, 'paternal ', 'grandmother'))->father()->ancestor()->female(), |
|
| 235 | - Relationship::dynamic(fn (int $n) => $great($n - 1, 'paternal ', 'grandfather'))->father()->ancestor()->male(), |
|
| 236 | - Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'grandparent'))->ancestor(), |
|
| 237 | - Relationship::dynamic(fn (int $n) => $great($n - 2, '', 'granddaughter'))->descendant()->female(), |
|
| 238 | - Relationship::dynamic(fn (int $n) => $great($n - 2, '', 'grandson'))->descendant()->male(), |
|
| 239 | - Relationship::dynamic(fn (int $n) => $great($n - 2, '', 'grandchild'))->descendant(), |
|
| 224 | + Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'aunt'))->ancestor()->sister(), |
|
| 225 | + Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'aunt'))->ancestor()->sibling()->wife(), |
|
| 226 | + Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'uncle'))->ancestor()->brother(), |
|
| 227 | + Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'uncle'))->ancestor()->sibling()->husband(), |
|
| 228 | + Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'niece'))->sibling()->descendant()->female(), |
|
| 229 | + Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'niece'))->married()->spouse()->sibling()->descendant()->female(), |
|
| 230 | + Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'nephew'))->sibling()->descendant()->male(), |
|
| 231 | + Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'nephew'))->married()->spouse()->sibling()->descendant()->male(), |
|
| 232 | + Relationship::dynamic(fn(int $n) => $great($n - 2, 'maternal ', 'grandmother'))->mother()->ancestor()->female(), |
|
| 233 | + Relationship::dynamic(fn(int $n) => $great($n - 1, 'maternal ', 'grandfather'))->mother()->ancestor()->male(), |
|
| 234 | + Relationship::dynamic(fn(int $n) => $great($n - 1, 'paternal ', 'grandmother'))->father()->ancestor()->female(), |
|
| 235 | + Relationship::dynamic(fn(int $n) => $great($n - 1, 'paternal ', 'grandfather'))->father()->ancestor()->male(), |
|
| 236 | + Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'grandparent'))->ancestor(), |
|
| 237 | + Relationship::dynamic(fn(int $n) => $great($n - 2, '', 'granddaughter'))->descendant()->female(), |
|
| 238 | + Relationship::dynamic(fn(int $n) => $great($n - 2, '', 'grandson'))->descendant()->male(), |
|
| 239 | + Relationship::dynamic(fn(int $n) => $great($n - 2, '', 'grandchild'))->descendant(), |
|
| 240 | 240 | Relationship::dynamic($cousin)->ancestor()->sibling()->descendant(), |
| 241 | 241 | ]; |
| 242 | 242 | } |
@@ -148,7 +148,7 @@ |
||
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | // We may use markup to display values, but not when editing them. |
| 151 | - $values = array_map(static fn (string $x): string => strip_tags($x), $values); |
|
| 151 | + $values = array_map(static fn(string $x): string => strip_tags($x), $values); |
|
| 152 | 152 | |
| 153 | 153 | return view('components/select', [ |
| 154 | 154 | 'id' => $id, |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | |
| 99 | 99 | foreach ($components as $component) { |
| 100 | 100 | // Allow for upper/lower-case mismatches, and all-numeric XREFs |
| 101 | - $component = array_map(static fn ($x): string => strtolower((string) $x), $component); |
|
| 101 | + $component = array_map(static fn($x): string => strtolower((string) $x), $component); |
|
| 102 | 102 | |
| 103 | 103 | if (!in_array(strtolower($xref), $component, true)) { |
| 104 | 104 | $individual_groups[] = DB::table('individuals') |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | ->groupBy(['surname']) |
| 120 | 120 | ->select([new Expression('n_surname /*! COLLATE utf8_bin */ AS surname'), new Expression('count(*) AS total')]) |
| 121 | 121 | ->pluck('total', 'surname') |
| 122 | - ->map(static fn (string $n): int => (int) $n) |
|
| 122 | + ->map(static fn(string $n): int => (int) $n) |
|
| 123 | 123 | ->all(); |
| 124 | 124 | |
| 125 | 125 | $all_surnames[$top_surname] = $variants; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | break; |
| 148 | 148 | |
| 149 | 149 | case 'list': |
| 150 | - uasort($all_surnames, static fn (array $a, array $b): int => array_sum($b) <=> array_sum($a)); |
|
| 150 | + uasort($all_surnames, static fn(array $a, array $b): int => array_sum($b) <=> array_sum($a)); |
|
| 151 | 151 | $content = view('lists/surnames-bullet-list', [ |
| 152 | 152 | 'module' => $module, |
| 153 | 153 | 'surnames' => $all_surnames, |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | break; |
| 158 | 158 | |
| 159 | 159 | case 'array': |
| 160 | - uasort($all_surnames, static fn (array $a, array $b): int => array_sum($b) <=> array_sum($a)); |
|
| 160 | + uasort($all_surnames, static fn(array $a, array $b): int => array_sum($b) <=> array_sum($a)); |
|
| 161 | 161 | $content = view('lists/surnames-compact-list', [ |
| 162 | 162 | 'module' => $module, |
| 163 | 163 | 'surnames' => $all_surnames, |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $currentLen = $endPos + 2; |
| 187 | 187 | $directive = substr($workingText, 0, $currentLen); |
| 188 | 188 | $workingText = substr($workingText, $currentLen); |
| 189 | - $result .= self::$waitingText . $directive; |
|
| 189 | + $result .= self::$waitingText . $directive; |
|
| 190 | 190 | self::$waitingText = ''; |
| 191 | 191 | break; |
| 192 | 192 | } |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | if ($openParIndex !== false) { |
| 300 | 300 | // Opening parentheses always inherit the following directionality |
| 301 | 301 | self::$waitingText .= $currentLetter; |
| 302 | - $workingText = substr($workingText, $currentLen); |
|
| 302 | + $workingText = substr($workingText, $currentLen); |
|
| 303 | 303 | while (true) { |
| 304 | 304 | if ($workingText === '') { |
| 305 | 305 | break; |
@@ -307,13 +307,13 @@ discard block |
||
| 307 | 307 | if (substr($workingText, 0, 1) === ' ') { |
| 308 | 308 | // Spaces following this left parenthesis inherit the following directionality too |
| 309 | 309 | self::$waitingText .= ' '; |
| 310 | - $workingText = substr($workingText, 1); |
|
| 310 | + $workingText = substr($workingText, 1); |
|
| 311 | 311 | continue; |
| 312 | 312 | } |
| 313 | 313 | if (substr($workingText, 0, 6) === ' ') { |
| 314 | 314 | // Spaces following this left parenthesis inherit the following directionality too |
| 315 | 315 | self::$waitingText .= ' '; |
| 316 | - $workingText = substr($workingText, 6); |
|
| 316 | + $workingText = substr($workingText, 6); |
|
| 317 | 317 | continue; |
| 318 | 318 | } |
| 319 | 319 | break; |
@@ -330,9 +330,9 @@ discard block |
||
| 330 | 330 | // Exceptions to this rule will be handled later during final clean-up. |
| 331 | 331 | // |
| 332 | 332 | self::$waitingText .= $currentLetter; |
| 333 | - $workingText = substr($workingText, $currentLen); |
|
| 333 | + $workingText = substr($workingText, $currentLen); |
|
| 334 | 334 | if (self::$currentState !== '') { |
| 335 | - $result .= self::$waitingText; |
|
| 335 | + $result .= self::$waitingText; |
|
| 336 | 336 | self::$waitingText = ''; |
| 337 | 337 | } |
| 338 | 338 | break 2; // double break because we're waiting for more information |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | } |
| 464 | 464 | if (substr($result . "\n", 0, self::LENGTH_START) !== self::START_LTR && substr($result . "\n", 0, self::LENGTH_START) !== self::START_RTL) { |
| 465 | 465 | $leadingText .= substr($result, 0, 1); |
| 466 | - $result = substr($result, 1); |
|
| 466 | + $result = substr($result, 1); |
|
| 467 | 467 | continue; |
| 468 | 468 | } |
| 469 | 469 | $result = substr($result, 0, self::LENGTH_START) . $leadingText . substr($result, self::LENGTH_START); |
@@ -605,11 +605,11 @@ discard block |
||
| 605 | 605 | private static function breakCurrentSpan(string &$result): void |
| 606 | 606 | { |
| 607 | 607 | // Interrupt the current span, insert that <br>, and then continue the current span |
| 608 | - $result .= self::$waitingText; |
|
| 608 | + $result .= self::$waitingText; |
|
| 609 | 609 | self::$waitingText = ''; |
| 610 | 610 | |
| 611 | 611 | $breakString = '<' . self::$currentState . 'br>'; |
| 612 | - $result .= $breakString; |
|
| 612 | + $result .= $breakString; |
|
| 613 | 613 | } |
| 614 | 614 | |
| 615 | 615 | /** |
@@ -666,7 +666,7 @@ discard block |
||
| 666 | 666 | break; |
| 667 | 667 | } // No more numeric strings |
| 668 | 668 | |
| 669 | - $tempResult .= substr($textSpan, 0, $posLRE + 3); // Copy everything preceding the numeric string |
|
| 669 | + $tempResult .= substr($textSpan, 0, $posLRE + 3); // Copy everything preceding the numeric string |
|
| 670 | 670 | $numericString = substr($textSpan, $posLRE + 3, $posPDF - $posLRE); // Separate the entire numeric string |
| 671 | 671 | $textSpan = substr($textSpan, $posPDF + 3); |
| 672 | 672 | $posColon = strpos($numericString, ':'); |
@@ -1133,7 +1133,7 @@ discard block |
||
| 1133 | 1133 | |
| 1134 | 1134 | // We're done: finish the span |
| 1135 | 1135 | $textSpan = self::starredName($textSpan, 'RTL'); // Wrap starred name in <u> and </u> tags |
| 1136 | - $result .= $textSpan . self::END_RTL; |
|
| 1136 | + $result .= $textSpan . self::END_RTL; |
|
| 1137 | 1137 | } |
| 1138 | 1138 | |
| 1139 | 1139 | if (self::$currentState !== 'LTR' && self::$currentState !== 'RTL') { |
@@ -110,24 +110,24 @@ discard block |
||
| 110 | 110 | public function relationships(): array |
| 111 | 111 | { |
| 112 | 112 | // Construct the genitive form in French |
| 113 | - $genitive = static fn (string $s, string $genitive_link): array => [$s, '%s ' . $genitive_link . $s]; |
|
| 113 | + $genitive = static fn(string $s, string $genitive_link): array => [$s, '%s ' . $genitive_link . $s]; |
|
| 114 | 114 | |
| 115 | 115 | // Functions to coumpound the name that can be indefinitely repeated |
| 116 | - $degree = static fn (int $n, string $suffix, string $genitive_link): array => |
|
| 116 | + $degree = static fn(int $n, string $suffix, string $genitive_link): array => |
|
| 117 | 117 | $genitive($suffix . ' au ' . $n . '<sup>e</sup> degré', $genitive_link); |
| 118 | 118 | |
| 119 | - $great = static fn (int $n, string $suffix, string $genitive_link): array => |
|
| 119 | + $great = static fn(int $n, string $suffix, string $genitive_link): array => |
|
| 120 | 120 | $n <= 1 ? $genitive('arrière-' . $suffix, 'de l’') : $degree($n + 1, $suffix, $genitive_link); |
| 121 | 121 | |
| 122 | - $firstCompound = static fn (int $n, string $suffix, string $genitive_link): array => |
|
| 122 | + $firstCompound = static fn(int $n, string $suffix, string $genitive_link): array => |
|
| 123 | 123 | $n <= 1 ? $genitive($suffix, $genitive_link) : $great($n - 1, $suffix, $genitive_link); |
| 124 | 124 | |
| 125 | 125 | $compound = |
| 126 | - static fn (int $n, string $first_level, string $suffix, string $genitive_none, string $genitive_first): array => |
|
| 126 | + static fn(int $n, string $first_level, string $suffix, string $genitive_none, string $genitive_first): array => |
|
| 127 | 127 | $n <= 1 ? $genitive($suffix, $genitive_none) : $firstCompound($n - 1, $first_level . $suffix, $genitive_first); |
| 128 | 128 | |
| 129 | 129 | // Functions to translate cousins' degree of relationship |
| 130 | - $symmetricCousin = static fn (int $n, string $sex): array => self::SYMMETRIC_COUSINS[$n][$sex] ?? $genitive( |
|
| 130 | + $symmetricCousin = static fn(int $n, string $sex): array => self::SYMMETRIC_COUSINS[$n][$sex] ?? $genitive( |
|
| 131 | 131 | $sex === 'F' ? 'cousine au ' . $n . '<sup>e</sup> degré' : 'cousin au ' . $n . '<sup>e</sup> degré', |
| 132 | 132 | $sex === 'F' ? 'de la ' : 'du ' |
| 133 | 133 | ); |
@@ -144,8 +144,7 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | return $genitive( |
| 146 | 146 | $sex === 'F' ? |
| 147 | - 'cousine du ' . $down . '<sup>e</sup> au ' . $up . '<sup>e</sup> degré' : |
|
| 148 | - 'cousin du ' . $down . '<sup>e</sup> au ' . $up . '<sup>e</sup> degré', |
|
| 147 | + 'cousine du ' . $down . '<sup>e</sup> au ' . $up . '<sup>e</sup> degré' : 'cousin du ' . $down . '<sup>e</sup> au ' . $up . '<sup>e</sup> degré', |
|
| 149 | 148 | $sex === 'F' ? 'de la ' : 'du ' |
| 150 | 149 | ); |
| 151 | 150 | }; |
@@ -247,31 +246,31 @@ discard block |
||
| 247 | 246 | Relationship::fixed('trisaïeul paternel', '%s du trisaïeul paternel')->father()->parent()->parent()->father(), |
| 248 | 247 | Relationship::fixed('trisaïeule', '%s de la trisaïeule')->parent()->parent()->parent()->mother(), |
| 249 | 248 | Relationship::fixed('trisaïeul', '%s du trisaïeul')->parent()->parent()->parent()->father(), |
| 250 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-mère maternelle', 'de la '))->mother()->ancestor()->female(), |
|
| 251 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-père maternel', 'du '))->mother()->ancestor()->male(), |
|
| 252 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-parent maternel', 'du '))->mother()->ancestor(), |
|
| 253 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-mère paternelle', 'de la '))->father()->ancestor()->female(), |
|
| 254 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-père paternel', 'du '))->father()->ancestor()->male(), |
|
| 255 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-parent paternel', 'du '))->father()->ancestor(), |
|
| 256 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-mère', 'de la '))->parent()->ancestor()->female(), |
|
| 257 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-père', 'du '))->parent()->ancestor()->male(), |
|
| 258 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-parent', 'du '))->parent()->ancestor(), |
|
| 249 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-mère maternelle', 'de la '))->mother()->ancestor()->female(), |
|
| 250 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-père maternel', 'du '))->mother()->ancestor()->male(), |
|
| 251 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-parent maternel', 'du '))->mother()->ancestor(), |
|
| 252 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-mère paternelle', 'de la '))->father()->ancestor()->female(), |
|
| 253 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-père paternel', 'du '))->father()->ancestor()->male(), |
|
| 254 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-parent paternel', 'du '))->father()->ancestor(), |
|
| 255 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-mère', 'de la '))->parent()->ancestor()->female(), |
|
| 256 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-père', 'du '))->parent()->ancestor()->male(), |
|
| 257 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-parent', 'du '))->parent()->ancestor(), |
|
| 259 | 258 | // Grandchildren and below |
| 260 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'petite-fille', 'de la '))->child()->descendant()->female(), |
|
| 261 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'petit-fils', 'du '))->child()->descendant()->male(), |
|
| 262 | - Relationship::dynamic(fn (int $n) => $firstCompound($n, 'petit-enfant', 'du '))->child()->descendant(), |
|
| 259 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'petite-fille', 'de la '))->child()->descendant()->female(), |
|
| 260 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'petit-fils', 'du '))->child()->descendant()->male(), |
|
| 261 | + Relationship::dynamic(fn(int $n) => $firstCompound($n, 'petit-enfant', 'du '))->child()->descendant(), |
|
| 263 | 262 | // Collateral relatives |
| 264 | - Relationship::dynamic(fn (int $n) => $compound($n, 'grand-', 'tante', 'de la ', 'de la '))->ancestor()->sister(), |
|
| 265 | - Relationship::dynamic(fn (int $n) => $compound($n, 'grand-', 'tante par alliance', 'de la ', 'de la '))->ancestor()->sibling()->wife(), |
|
| 266 | - Relationship::dynamic(fn (int $n) => $compound($n, 'grand-', 'oncle', 'de l’', 'du '))->ancestor()->brother(), |
|
| 267 | - Relationship::dynamic(fn (int $n) => $compound($n, 'grand-', 'oncle par alliance', 'de l’', 'du '))->ancestor()->sibling()->husband(), |
|
| 268 | - Relationship::dynamic(fn (int $n) => $compound($n, 'petite-', 'nièce', 'de la ', 'de la '))->sibling()->descendant()->female(), |
|
| 269 | - Relationship::dynamic(fn (int $n) => $compound($n, 'petite-', 'nièce par alliance', 'de la ', 'de la '))->married()->spouse()->sibling()->descendant()->female(), |
|
| 270 | - Relationship::dynamic(fn (int $n) => $compound($n, 'petit-', 'neveu', 'du ', 'du '))->sibling()->descendant()->male(), |
|
| 271 | - Relationship::dynamic(fn (int $n) => $compound($n, 'petit-', 'neveu par alliance', 'du ', 'du '))->married()->spouse()->sibling()->descendant()->male(), |
|
| 263 | + Relationship::dynamic(fn(int $n) => $compound($n, 'grand-', 'tante', 'de la ', 'de la '))->ancestor()->sister(), |
|
| 264 | + Relationship::dynamic(fn(int $n) => $compound($n, 'grand-', 'tante par alliance', 'de la ', 'de la '))->ancestor()->sibling()->wife(), |
|
| 265 | + Relationship::dynamic(fn(int $n) => $compound($n, 'grand-', 'oncle', 'de l’', 'du '))->ancestor()->brother(), |
|
| 266 | + Relationship::dynamic(fn(int $n) => $compound($n, 'grand-', 'oncle par alliance', 'de l’', 'du '))->ancestor()->sibling()->husband(), |
|
| 267 | + Relationship::dynamic(fn(int $n) => $compound($n, 'petite-', 'nièce', 'de la ', 'de la '))->sibling()->descendant()->female(), |
|
| 268 | + Relationship::dynamic(fn(int $n) => $compound($n, 'petite-', 'nièce par alliance', 'de la ', 'de la '))->married()->spouse()->sibling()->descendant()->female(), |
|
| 269 | + Relationship::dynamic(fn(int $n) => $compound($n, 'petit-', 'neveu', 'du ', 'du '))->sibling()->descendant()->male(), |
|
| 270 | + Relationship::dynamic(fn(int $n) => $compound($n, 'petit-', 'neveu par alliance', 'du ', 'du '))->married()->spouse()->sibling()->descendant()->male(), |
|
| 272 | 271 | // Cousins (based on canon law) |
| 273 | - Relationship::dynamic(fn (int $up, int $down) => $cousin($up, $down, 'F'))->cousin()->female(), |
|
| 274 | - Relationship::dynamic(fn (int $up, int $down) => $cousin($up, $down, 'M'))->cousin()->male(), |
|
| 272 | + Relationship::dynamic(fn(int $up, int $down) => $cousin($up, $down, 'F'))->cousin()->female(), |
|
| 273 | + Relationship::dynamic(fn(int $up, int $down) => $cousin($up, $down, 'M'))->cousin()->male(), |
|
| 275 | 274 | |
| 276 | 275 | ]; |
| 277 | 276 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | |
| 134 | 134 | $shares = $this->module_service |
| 135 | 135 | ->findByInterface(ModuleShareInterface::class) |
| 136 | - ->map(fn (ModuleShareInterface $module) => $module->share($individual)) |
|
| 136 | + ->map(fn(ModuleShareInterface $module) => $module->share($individual)) |
|
| 137 | 137 | ->filter(); |
| 138 | 138 | |
| 139 | 139 | return $this->viewResponse('individual-page', [ |
@@ -241,8 +241,8 @@ discard block |
||
| 241 | 241 | } |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | - $meta_facts = array_map(static fn (string $x): string => strip_tags($x), $meta_facts); |
|
| 245 | - $meta_facts = array_map(static fn (string $x): string => trim($x), $meta_facts); |
|
| 244 | + $meta_facts = array_map(static fn(string $x): string => strip_tags($x), $meta_facts); |
|
| 245 | + $meta_facts = array_map(static fn(string $x): string => trim($x), $meta_facts); |
|
| 246 | 246 | |
| 247 | 247 | return implode(', ', $meta_facts); |
| 248 | 248 | } |