@@ -212,14 +212,14 @@ |
||
| 212 | 212 | default: |
| 213 | 213 | $alt_link = I18N::translate('Show place hierarchy'); |
| 214 | 214 | $alt_url = $this->listUrl($tree, ['action2' => 'hierarchy', 'place_id' => $place_id]); |
| 215 | - $content .= view('modules/place-hierarchy/list', ['columns' => $this->getList($tree)]); |
|
| 215 | + $content .= view('modules/place-hierarchy/list', ['columns' => $this->getList($tree)]); |
|
| 216 | 216 | break; |
| 217 | 217 | case 'hierarchy': |
| 218 | 218 | case 'hierarchy-e': |
| 219 | 219 | $alt_link = I18N::translate('Show all places in a list'); |
| 220 | 220 | $alt_url = $this->listUrl($tree, ['action2' => 'list', 'place_id' => 0]); |
| 221 | 221 | $data = $this->getHierarchy($place); |
| 222 | - $content .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data); |
|
| 222 | + $content .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data); |
|
| 223 | 223 | if (null === $data || $action2 === 'hierarchy-e') { |
| 224 | 224 | $content .= view('modules/place-hierarchy/events', [ |
| 225 | 225 | 'indilist' => $this->search_service->searchIndividualsInPlace($place), |
@@ -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, |
@@ -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' => [ |
@@ -72,9 +72,9 @@ |
||
| 72 | 72 | // Default names facts. |
| 73 | 73 | $surname_tradition = SurnameTradition::create($tree->getPreference('SURNAME_TRADITION')); |
| 74 | 74 | $names = $surname_tradition->newSpouseNames($individual, $sex); |
| 75 | - $name_facts = array_map(fn (string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names); |
|
| 75 | + $name_facts = array_map(fn(string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names); |
|
| 76 | 76 | |
| 77 | - $facts = [ |
|
| 77 | + $facts = [ |
|
| 78 | 78 | 'i' => [ |
| 79 | 79 | new Fact('1 SEX ' . $sex, $dummyi, ''), |
| 80 | 80 | ...$name_facts, |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | $spouse = $family->spouses()->first(); |
| 73 | 73 | assert($spouse instanceof Individual); |
| 74 | 74 | $names = $surname_tradition->newSpouseNames($spouse, $sex); |
| 75 | - $name_facts = array_map(fn (string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names); |
|
| 75 | + $name_facts = array_map(fn(string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names); |
|
| 76 | 76 | |
| 77 | 77 | $facts = [ |
| 78 | 78 | 'i' => [ |