@@ -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 = [ |
@@ -79,7 +79,7 @@ |
||
79 | 79 | ->select(['d_gid as id', 'd_year as year', 'd_fact AS fact', 'd_type AS type']) |
80 | 80 | ->where('d_file', '=', $this->tree->id()) |
81 | 81 | ->where('d_fact', '=', $fact) |
82 | - ->where('d_julianday1', '=', function (Builder $query) use ($operation, $fact): void { |
|
82 | + ->where('d_julianday1', '=', function (Builder $query) use ($operation, $fact) : void { |
|
83 | 83 | $query->selectRaw($operation . '(d_julianday1)') |
84 | 84 | ->from('dates') |
85 | 85 | ->where('d_file', '=', $this->tree->id()) |
@@ -326,7 +326,8 @@ discard block |
||
326 | 326 | <li class="wt-initials-list-item d-flex"> |
327 | 327 | <?php if ($count > 0) : ?> |
328 | 328 | <a href="<?= e($this->listUrl($tree, ['alpha' => $letter, 'tree' => $tree->name()])) ?>" class="wt-initial px-1<?= $letter === $alpha ? ' active' : '' ?> '" title="<?= I18N::number($count) ?>"><?= $this->surnameInitial((string) $letter) ?></a> |
329 | - <?php else : ?> |
|
329 | + <?php else { |
|
330 | + : ?> |
|
330 | 331 | <span class="wt-initial px-1 text-muted"><?= $this->surnameInitial((string) $letter) ?></span> |
331 | 332 | |
332 | 333 | <?php endif ?> |
@@ -380,6 +381,7 @@ discard block |
||
380 | 381 | |
381 | 382 | if ($show === 'indi' || $show === 'surn') { |
382 | 383 | $surns = $this->surnames($tree, $surname, $alpha, $show_marnm === 'yes', $families, I18N::locale()); |
384 | +} |
|
383 | 385 | if ($show === 'surn') { |
384 | 386 | // Show the surname list |
385 | 387 | switch ($tree->getPreference('SURNAME_LIST_STYLE')) { |
@@ -112,7 +112,7 @@ |
||
112 | 112 | '<div class="gedcom-data" dir="ltr">' . |
113 | 113 | preg_replace_callback( |
114 | 114 | '/@(' . Gedcom::REGEX_XREF . ')@/', |
115 | - static function (array $match) use ($tree): string { |
|
115 | + static function (array $match) use ($tree) : string { |
|
116 | 116 | $record = Registry::gedcomRecordFactory()->make($match[1], $tree); |
117 | 117 | |
118 | 118 | return $record ? '<a href="' . e($record->url()) . '">' . $match[0] . '</a>' : $match[0]; |
@@ -52,7 +52,7 @@ |
||
52 | 52 | */ |
53 | 53 | public function find(?int $user_id): ?User |
54 | 54 | { |
55 | - return Registry::cache()->array()->remember('user-' . $user_id, static function () use ($user_id): ?User { |
|
55 | + return Registry::cache()->array()->remember('user-' . $user_id, static function () use ($user_id) : ?User { |
|
56 | 56 | return DB::table('user') |
57 | 57 | ->where('user_id', '=', $user_id) |
58 | 58 | ->get() |
@@ -330,7 +330,7 @@ |
||
330 | 330 | |
331 | 331 | $language = app(ModuleService::class) |
332 | 332 | ->findByInterface(ModuleLanguageInterface::class, true) |
333 | - ->first(fn (ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag()); |
|
333 | + ->first(fn(ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag()); |
|
334 | 334 | |
335 | 335 | |
336 | 336 |
@@ -76,7 +76,7 @@ |
||
76 | 76 | { |
77 | 77 | $language = app(ModuleService::class) |
78 | 78 | ->findByInterface(ModuleLanguageInterface::class, true) |
79 | - ->first(fn (ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag()); |
|
79 | + ->first(fn(ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag()); |
|
80 | 80 | |
81 | 81 | $path = $this->getCloseRelationship($individual1, $individual2); |
82 | 82 |
@@ -120,17 +120,17 @@ |
||
120 | 120 | // Which facts and events are handled by other modules? |
121 | 121 | $sidebar_facts = $this->module_service |
122 | 122 | ->findByComponent(ModuleSidebarInterface::class, $individual->tree(), Auth::user()) |
123 | - ->map(fn (ModuleSidebarInterface $sidebar): Collection => $sidebar->supportedFacts()); |
|
123 | + ->map(fn(ModuleSidebarInterface $sidebar): Collection => $sidebar->supportedFacts()); |
|
124 | 124 | |
125 | 125 | $tab_facts = $this->module_service |
126 | 126 | ->findByComponent(ModuleTabInterface::class, $individual->tree(), Auth::user()) |
127 | - ->map(fn (ModuleTabInterface $tab): Collection => $tab->supportedFacts()); |
|
127 | + ->map(fn(ModuleTabInterface $tab): Collection => $tab->supportedFacts()); |
|
128 | 128 | |
129 | 129 | $exclude_facts = $sidebar_facts->merge($tab_facts)->flatten(); |
130 | 130 | |
131 | 131 | // The individual’s own facts |
132 | 132 | $individual_facts = $individual->facts() |
133 | - ->filter(fn (Fact $fact): bool => !$exclude_facts->contains($fact->tag())); |
|
133 | + ->filter(fn(Fact $fact): bool => !$exclude_facts->contains($fact->tag())); |
|
134 | 134 | |
135 | 135 | $relative_facts = new Collection(); |
136 | 136 |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | $access_level = $access_level ?? Auth::accessLevel($this->tree); |
785 | 785 | |
786 | 786 | // Convert BIRT into INDI:BIRT, etc. |
787 | - $filter = array_map(fn (string $tag): string => $this->tag() . ':' . $tag, $filter); |
|
787 | + $filter = array_map(fn(string $tag): string => $this->tag() . ':' . $tag, $filter); |
|
788 | 788 | |
789 | 789 | $facts = new Collection(); |
790 | 790 | if ($this->canShow($access_level)) { |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | |
805 | 805 | default: |
806 | 806 | $subtags = Registry::elementFactory()->make($this->tag())->subtags(); |
807 | - $subtags = array_map(fn (string $tag): string => $this->tag() . ':' . $tag, array_keys($subtags)); |
|
807 | + $subtags = array_map(fn(string $tag): string => $this->tag() . ':' . $tag, array_keys($subtags)); |
|
808 | 808 | $subtags = array_combine(range(1, count($subtags)), $subtags); |
809 | 809 | |
810 | 810 | $facts = $facts |