@@ -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()) |
@@ -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() |
@@ -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 |
@@ -198,9 +198,9 @@ |
||
198 | 198 | }; |
199 | 199 | |
200 | 200 | return $default_facts |
201 | - ->reject(fn (string $field): bool => array_key_exists($field, $fields)) |
|
201 | + ->reject(fn(string $field): bool => array_key_exists($field, $fields)) |
|
202 | 202 | ->sort($comparator) |
203 | - ->mapWithKeys(fn (string $fact): array => [$fact => Registry::elementFactory()->make($fact)->label()]) |
|
203 | + ->mapWithKeys(fn(string $fact): array => [$fact => Registry::elementFactory()->make($fact)->label()]) |
|
204 | 204 | ->all(); |
205 | 205 | } |
206 | 206 |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | try { |
58 | 58 | return $this->media_file_service->mediaFolders($tree) |
59 | - ->filter(fn (string $path): bool => stripos($path, $query) !== false); |
|
59 | + ->filter(fn(string $path): bool => stripos($path, $query) !== false); |
|
60 | 60 | } catch (FilesystemException $ex) { |
61 | 61 | return new Collection(); |
62 | 62 | } |