@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | { |
101 | 101 | if ($record instanceof Individual) { |
102 | 102 | $facts = $record->facts(static::INDIVIDUAL_EVENTS, true) |
103 | - ->merge($record->spouseFamilies()->map(fn (Family $family): Collection => $family->facts(static::FAMILY_EVENTS, true))); |
|
103 | + ->merge($record->spouseFamilies()->map(fn(Family $family): Collection => $family->facts(static::FAMILY_EVENTS, true))); |
|
104 | 104 | } elseif ($record instanceof Family) { |
105 | 105 | $facts = $record->facts(static::FAMILY_EVENTS, true); |
106 | 106 | } else { |
@@ -110,11 +110,11 @@ discard block |
||
110 | 110 | // iCalendar only supports exact Gregorian dates. |
111 | 111 | $facts = $facts |
112 | 112 | ->flatten() |
113 | - ->filter(fn (Fact $fact): bool => $fact->date()->isOK()) |
|
114 | - ->filter(fn (Fact $fact): bool => $fact->date()->qual1 === '') |
|
115 | - ->filter(fn (Fact $fact): bool => $fact->date()->minimumDate() instanceof GregorianDate) |
|
116 | - ->filter(fn (Fact $fact): bool => $fact->date()->minimumJulianDay() === $fact->date()->maximumJulianDay()) |
|
117 | - ->mapWithKeys(fn (Fact $fact): array => [ |
|
113 | + ->filter(fn(Fact $fact): bool => $fact->date()->isOK()) |
|
114 | + ->filter(fn(Fact $fact): bool => $fact->date()->qual1 === '') |
|
115 | + ->filter(fn(Fact $fact): bool => $fact->date()->minimumDate() instanceof GregorianDate) |
|
116 | + ->filter(fn(Fact $fact): bool => $fact->date()->minimumJulianDay() === $fact->date()->maximumJulianDay()) |
|
117 | + ->mapWithKeys(fn(Fact $fact): array => [ |
|
118 | 118 | route(static::class, ['tree' => $record->tree()->name(), 'xref' => $fact->record()->xref(), 'fact_id' => $fact->id()]) => |
119 | 119 | $fact->label() . ' — ' . $fact->date()->display(false, null, false), |
120 | 120 | ]); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $record = Auth::checkRecordAccess($record); |
150 | 150 | |
151 | 151 | $fact = $record->facts() |
152 | - ->filter(fn (Fact $fact): bool => $fact->id() === $fact_id) |
|
152 | + ->filter(fn(Fact $fact): bool => $fact->id() === $fact_id) |
|
153 | 153 | ->first(); |
154 | 154 | |
155 | 155 | if ($fact instanceof Fact) { |
@@ -119,7 +119,7 @@ |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | // We may use markup to display values, but not when editing them. |
122 | - $values = array_map(fn (string $x): string => strip_tags($x), $values); |
|
122 | + $values = array_map(fn(string $x): string => strip_tags($x), $values); |
|
123 | 123 | |
124 | 124 | return view('components/select', [ |
125 | 125 | 'id' => $id, |
@@ -259,7 +259,7 @@ |
||
259 | 259 | private function fetchIpRangesForAsn(string $asn): array |
260 | 260 | { |
261 | 261 | return Registry::cache()->file()->remember('whois-asn-' . $asn, static function () use ($asn): array { |
262 | - $mapper = fn (AsnRouteInfo $route_info): ?RangeInterface => IPFactory::rangeFromString($route_info->route ?: $route_info->route6); |
|
262 | + $mapper = fn(AsnRouteInfo $route_info): ?RangeInterface => IPFactory::rangeFromString($route_info->route ?: $route_info->route6); |
|
263 | 263 | |
264 | 264 | try { |
265 | 265 | $loader = new CurlLoader(self::WHOIS_TIMEOUT); |
@@ -805,7 +805,7 @@ |
||
805 | 805 | |
806 | 806 | default: |
807 | 807 | $subtags = Registry::elementFactory()->make($this->tag())->subtags(); |
808 | - $subtags = array_map(fn (string $tag): string => $this->tag() . ':' . $tag, array_keys($subtags)); |
|
808 | + $subtags = array_map(fn(string $tag): string => $this->tag() . ':' . $tag, array_keys($subtags)); |
|
809 | 809 | $subtags = array_combine(range(1, count($subtags)), $subtags); |
810 | 810 | |
811 | 811 | $facts = $facts |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | if ($note->canShow()) { |
171 | 171 | $noterec = $note->gedcom(); |
172 | 172 | $nt = preg_match("/0 @$nmatch[1]@ NOTE (.*)/", $noterec, $n1match); |
173 | - $data .= self::printNoteRecord($tree, $nt > 0 ? $n1match[1] : '', 1, $noterec); |
|
173 | + $data .= self::printNoteRecord($tree, $nt > 0 ? $n1match[1] : '', 1, $noterec); |
|
174 | 174 | } |
175 | 175 | } else { |
176 | 176 | $data = '<div class="fact_NOTE"><span class="label">' . I18N::translate('Note') . '</span>: <span class="field error">' . $nmatch[1] . '</span></div>'; |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | } |
271 | 271 | }, |
272 | 272 | $age_string |
273 | - ) ; |
|
273 | + ); |
|
274 | 274 | } |
275 | 275 | } |
276 | 276 | |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | if (preg_match_all('/\n3 (?:_HEB|ROMN) (.+)/', $placerec, $matches)) { |
428 | 428 | foreach ($matches[1] as $match) { |
429 | 429 | $wt_place = new Place($match, $tree); |
430 | - $html .= ' - ' . $wt_place->fullName(); |
|
430 | + $html .= ' - ' . $wt_place->fullName(); |
|
431 | 431 | } |
432 | 432 | } |
433 | 433 | |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | // Links to external maps |
442 | 442 | $html .= app(ModuleService::class) |
443 | 443 | ->findByInterface(ModuleMapLinkInterface::class) |
444 | - ->map(fn (ModuleMapLinkInterface $module): string => ' ' . $module->mapLink($event)) |
|
444 | + ->map(fn(ModuleMapLinkInterface $module): string => ' ' . $module->mapLink($event)) |
|
445 | 445 | ->implode(''); |
446 | 446 | } |
447 | 447 | |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | } |
523 | 523 | |
524 | 524 | // Create a label for a subtag |
525 | - $fn = fn ($subtag) => Registry::elementFactory()->make($record->tag() . ':' . $subtag)->label(); |
|
525 | + $fn = fn($subtag) => Registry::elementFactory()->make($record->tag() . ':' . $subtag)->label(); |
|
526 | 526 | |
527 | 527 | $addfacts = array_merge(self::checkFactUnique($uniquefacts, $record->facts()), $addfacts); |
528 | 528 | $quickfacts = array_intersect($quickfacts, $addfacts); |
@@ -127,7 +127,7 @@ |
||
127 | 127 | |
128 | 128 | $shares = $this->module_service |
129 | 129 | ->findByInterface(ModuleShareInterface::class) |
130 | - ->map(fn (ModuleShareInterface $module) => $module->share($individual)) |
|
130 | + ->map(fn(ModuleShareInterface $module) => $module->share($individual)) |
|
131 | 131 | ->filter(); |
132 | 132 | |
133 | 133 | return $this->viewResponse('individual-page', [ |
@@ -78,7 +78,7 @@ |
||
78 | 78 | break; |
79 | 79 | } |
80 | 80 | |
81 | - $name_facts = array_map(fn (string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names); |
|
81 | + $name_facts = array_map(fn(string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names); |
|
82 | 82 | |
83 | 83 | $facts = [ |
84 | 84 | 'i' => [ |
@@ -62,14 +62,14 @@ |
||
62 | 62 | $individual = Auth::checkIndividualAccess($individual, true); |
63 | 63 | |
64 | 64 | // Create a dummy individual, so that we can create new/empty facts. |
65 | - $dummy = Registry::individualFactory()->new('', '0 @@ INDI', null, $tree); |
|
65 | + $dummy = Registry::individualFactory()->new('', '0 @@ INDI', null, $tree); |
|
66 | 66 | |
67 | 67 | // Default names facts. |
68 | 68 | $surname_tradition = SurnameTradition::create($tree->getPreference('SURNAME_TRADITION')); |
69 | 69 | $names = $surname_tradition->newParentNames($individual, $sex); |
70 | - $name_facts = array_map(fn (string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names); |
|
70 | + $name_facts = array_map(fn(string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names); |
|
71 | 71 | |
72 | - $facts = [ |
|
72 | + $facts = [ |
|
73 | 73 | 'i' => [ |
74 | 74 | new Fact('1 SEX ' . $sex, $dummy, ''), |
75 | 75 | ...$name_facts, |
@@ -67,7 +67,7 @@ |
||
67 | 67 | // Default names facts. |
68 | 68 | $surname_tradition = SurnameTradition::create($tree->getPreference('SURNAME_TRADITION')); |
69 | 69 | $names = $surname_tradition->newChildNames($family->husband(), $family->wife(), $sex); |
70 | - $name_facts = array_map(fn (string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names); |
|
70 | + $name_facts = array_map(fn(string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names); |
|
71 | 71 | |
72 | 72 | $facts = [ |
73 | 73 | 'i' => [ |