@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | public function getSidebarContent(Individual $individual): string |
| 102 | 102 | { |
| 103 | 103 | $html = $individual->facts(static::HANDLED_FACTS) |
| 104 | - ->map(static fn (Fact $fact): string =>view('fact', ['fact' => $fact, 'record' => $individual])) |
|
| 104 | + ->map(static fn(Fact $fact): string =>view('fact', ['fact' => $fact, 'record' => $individual])) |
|
| 105 | 105 | ->implode(''); |
| 106 | 106 | |
| 107 | 107 | return strip_tags($html, '<a><div><span><i>'); |
@@ -114,6 +114,6 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public function supportedFacts(): Collection |
| 116 | 116 | { |
| 117 | - return new Collection(array_map(static fn (string $tag): string => 'INDI:' . $tag, static::HANDLED_FACTS)); |
|
| 117 | + return new Collection(array_map(static fn(string $tag): string => 'INDI:' . $tag, static::HANDLED_FACTS)); |
|
| 118 | 118 | } |
| 119 | 119 | } |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | - $callback = static fn (Fact $fact): bool => preg_match('/(?:^1|\n\d) NOTE/', $fact->gedcom()) === 1; |
|
| 145 | + $callback = static fn(Fact $fact): bool => preg_match('/(?:^1|\n\d) NOTE/', $fact->gedcom()) === 1; |
|
| 146 | 146 | |
| 147 | 147 | $this->facts = $facts->filter($callback); |
| 148 | 148 | |
@@ -130,9 +130,9 @@ |
||
| 130 | 130 | |
| 131 | 131 | if ($one_line_only) { |
| 132 | 132 | return |
| 133 | - '<div class="fact_NOTE">' . |
|
| 134 | - I18N::translate('<span class="label">%1$s:</span> <span class="field" dir="auto">%2$s</span>', $label, $html) . |
|
| 135 | - '</div>'; |
|
| 133 | + '<div class="fact_NOTE">' . |
|
| 134 | + I18N::translate('<span class="label">%1$s:</span> <span class="field" dir="auto">%2$s</span>', $label, $html) . |
|
| 135 | + '</div>'; |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | return |
@@ -828,7 +828,7 @@ |
||
| 828 | 828 | public static function chr(int $code): string |
| 829 | 829 | { |
| 830 | 830 | if ($code < 0 || $code > 0x1FFFFF) { |
| 831 | - throw new InvalidArgumentException((string)$code); |
|
| 831 | + throw new InvalidArgumentException((string) $code); |
|
| 832 | 832 | } |
| 833 | 833 | |
| 834 | 834 | if ($code <= 0x7F) { |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | /** @var Collection<int,GedcomRecord> $records */ |
| 94 | 94 | $records = $rows->map(function (object $row) use ($tree): ?GedcomRecord { |
| 95 | 95 | return $this->data_fix_service->getRecordByType($row->xref, $tree, $row->type); |
| 96 | - })->filter(static function (?GedcomRecord $record) use ($module, $params): bool { |
|
| 96 | + })->filter(static function (?GedcomRecord $record) use ($module, $params) : bool { |
|
| 97 | 97 | return $record instanceof GedcomRecord && !$record->isPendingDeletion() && $module->doesRecordNeedUpdate($record, $params); |
| 98 | 98 | }); |
| 99 | 99 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function make(int $timestamp, UserInterface $user = null): TimestampInterface |
| 47 | 47 | { |
| 48 | - $user ??= Auth::user(); |
|
| 48 | + $user ??= Auth::user(); |
|
| 49 | 49 | $timezone = $user->getPreference(UserInterface::PREF_TIME_ZONE, Site::getPreference('TIMEZONE')); |
| 50 | 50 | $locale = I18N::locale()->code(); |
| 51 | 51 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public function fromString(?string $string, string $format = 'Y-m-d H:i:s', UserInterface $user = null): TimestampInterface |
| 63 | 63 | { |
| 64 | - $string ??= date($format); |
|
| 64 | + $string ??= date($format); |
|
| 65 | 65 | $timestamp = date_create_from_format($format, $string); |
| 66 | 66 | |
| 67 | 67 | if ($timestamp === false) { |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | } else { |
| 127 | 127 | $match = []; |
| 128 | 128 | if (preg_match('/NOW([+\-]\d+)/', $attrs['default'], $match) > 0) { |
| 129 | - $date = Registry::timestampFactory()->now()->addDays((int)$match[1]); |
|
| 129 | + $date = Registry::timestampFactory()->now()->addDays((int) $match[1]); |
|
| 130 | 130 | $this->input['default'] = strtoupper($date->format('d M Y')); |
| 131 | 131 | } else { |
| 132 | 132 | $this->input['default'] = $attrs['default']; |
@@ -85,9 +85,9 @@ |
||
| 85 | 85 | $filesystem = new Filesystem(new LocalFilesystemAdapter(self::ROOT_DIR)); |
| 86 | 86 | |
| 87 | 87 | $scripts = $filesystem->listContents('app', FilesystemReader::LIST_DEEP) |
| 88 | - ->filter(static fn (StorageAttributes $file): bool => $file->isFile()) |
|
| 89 | - ->map(static fn (StorageAttributes $file): string => $file->path()) |
|
| 90 | - ->filter(static fn (string $script): bool => !str_contains($script, 'Interface.php') && !str_contains($script, 'Abstract')); |
|
| 88 | + ->filter(static fn(StorageAttributes $file): bool => $file->isFile()) |
|
| 89 | + ->map(static fn(StorageAttributes $file): string => $file->path()) |
|
| 90 | + ->filter(static fn(string $script): bool => !str_contains($script, 'Interface.php') && !str_contains($script, 'Abstract')); |
|
| 91 | 91 | |
| 92 | 92 | foreach ($scripts as $script) { |
| 93 | 93 | $class = strtr($script, ['app/' => '', '.php' => '', '/' => '\\']); |
@@ -154,7 +154,7 @@ |
||
| 154 | 154 | { |
| 155 | 155 | $tree = Validator::attributes($request)->treeOptional(); |
| 156 | 156 | $default = Site::getPreference('DEFAULT_GEDCOM'); |
| 157 | - $tree ??= $this->tree_service->all()[$default] ?? $this->tree_service->all()->first(); |
|
| 157 | + $tree ??= $this->tree_service->all()[$default] ?? $this->tree_service->all()->first(); |
|
| 158 | 158 | |
| 159 | 159 | $status_code = $exception->getCode(); |
| 160 | 160 | |