@@ -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]; |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | /** @var Collection<GedcomRecord> $records */ |
| 95 | 95 | $records = $rows->map(function (stdClass $row) use ($tree): ?GedcomRecord { |
| 96 | 96 | return $this->data_fix_service->getRecordByType($row->xref, $tree, $row->type); |
| 97 | - })->filter(static function (?GedcomRecord $record) use ($module, $params): bool { |
|
| 97 | + })->filter(static function (?GedcomRecord $record) use ($module, $params) : bool { |
|
| 98 | 98 | return $record instanceof GedcomRecord && !$record->isPendingDeletion() && $module->doesRecordNeedUpdate($record, $params); |
| 99 | 99 | }); |
| 100 | 100 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | $create_form = ''; |
| 233 | 233 | foreach ($media_trees as $media_tree => $media_directory) { |
| 234 | 234 | if (str_starts_with($row[0], $media_directory)) { |
| 235 | - $tmp = substr($row[0], strlen($media_directory)); |
|
| 235 | + $tmp = substr($row[0], strlen($media_directory)); |
|
| 236 | 236 | $create_form .= |
| 237 | 237 | '<p><a href="#" data-toggle="modal" data-backdrop="static" data-target="#modal-create-media-from-file" data-file="' . e($tmp) . '" data-url="' . e(route(CreateMediaObjectFromFile::class, ['tree' => $media_tree])) . '" onclick="document.getElementById(\'modal-create-media-from-file-form\').action=this.dataset.url; document.getElementById(\'file\').value=this.dataset.file;">' . I18N::translate('Create') . '</a> — ' . e($media_tree) . '<p>'; |
| 238 | 238 | } |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | // This will work for local filesystems. For remote filesystems, we will |
| 328 | 328 | // need to copy the file locally to work out the image size. |
| 329 | 329 | $imgsize = getimagesize(Webtrees::DATA_DIR . $file); |
| 330 | - $html .= '<dt>' . I18N::translate('Image dimensions') . '</dt>'; |
|
| 330 | + $html .= '<dt>' . I18N::translate('Image dimensions') . '</dt>'; |
|
| 331 | 331 | /* I18N: image dimensions, width × height */ |
| 332 | 332 | $html .= '<dd>' . I18N::translate('%1$s × %2$s pixels', I18N::number($imgsize['0']), I18N::number($imgsize['1'])) . '</dd>'; |
| 333 | 333 | } catch (Throwable $ex) { |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | // Request for a non-existent location? |
| 88 | - if ($parent_id !== null && $parent->id() === null) { |
|
| 88 | + if ($parent_id !== null && $parent->id() === null) { |
|
| 89 | 89 | return redirect(route(__CLASS__)); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -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() |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | 'generations' => 3, |
| 118 | 118 | 'layout' => PedigreeChartModule::STYLE_RIGHT, |
| 119 | 119 | ]); |
| 120 | - $content = view('modules/charts/chart', [ |
|
| 120 | + $content = view('modules/charts/chart', [ |
|
| 121 | 121 | 'block_id' => $block_id, |
| 122 | 122 | 'chart_url' => $chart_url, |
| 123 | 123 | ]); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | 'generations' => 2, |
| 138 | 138 | 'chart_style' => DescendancyChartModule::CHART_STYLE_TREE, |
| 139 | 139 | ]); |
| 140 | - $content = view('modules/charts/chart', [ |
|
| 140 | + $content = view('modules/charts/chart', [ |
|
| 141 | 141 | 'block_id' => $block_id, |
| 142 | 142 | 'chart_url' => $chart_url, |
| 143 | 143 | ]); |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | break; |
| 150 | 150 | |
| 151 | 151 | case 'hourglass': |
| 152 | - $module = $this->module_service->findByInterface(HourglassChartModule::class)->first(); |
|
| 152 | + $module = $this->module_service->findByInterface(HourglassChartModule::class)->first(); |
|
| 153 | 153 | |
| 154 | 154 | if ($module instanceof HourglassChartModule) { |
| 155 | 155 | $title = $module->chartTitle($individual); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | 'ajax' => true, |
| 158 | 158 | 'generations' => 2, |
| 159 | 159 | ]); |
| 160 | - $content = view('modules/charts/chart', [ |
|
| 160 | + $content = view('modules/charts/chart', [ |
|
| 161 | 161 | 'block_id' => $block_id, |
| 162 | 162 | 'chart_url' => $chart_url, |
| 163 | 163 | ]); |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | $default_xref = $gedcomid ?: $PEDIGREE_ROOT_ID; |
| 263 | 263 | |
| 264 | 264 | $type = $this->getBlockSetting($block_id, 'type', 'pedigree'); |
| 265 | - $xref = $this->getBlockSetting($block_id, 'pid', $default_xref); |
|
| 265 | + $xref = $this->getBlockSetting($block_id, 'pid', $default_xref); |
|
| 266 | 266 | |
| 267 | 267 | $charts = [ |
| 268 | 268 | 'pedigree' => I18N::translate('Pedigree'), |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | use ModuleChartTrait; |
| 48 | 48 | |
| 49 | - protected const ROUTE_URL = '/tree/{tree}/timeline-{scale}'; |
|
| 49 | + protected const ROUTE_URL = '/tree/{tree}/timeline-{scale}'; |
|
| 50 | 50 | |
| 51 | 51 | // Defaults |
| 52 | 52 | protected const DEFAULT_SCALE = 10; |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | |
| 154 | 154 | $params = (array) $request->getParsedBody(); |
| 155 | 155 | |
| 156 | - $add = $params['add'] ?? ''; |
|
| 156 | + $add = $params['add'] ?? ''; |
|
| 157 | 157 | |
| 158 | 158 | Auth::checkComponentAccess($this, ModuleChartInterface::class, $tree, $user); |
| 159 | 159 | |
@@ -148,7 +148,7 @@ |
||
| 148 | 148 | public function mediaFileResponse(MediaFile $media_file, bool $add_watermark, bool $download): ResponseInterface |
| 149 | 149 | { |
| 150 | 150 | $filesystem = Registry::filesystem()->media($media_file->media()->tree()); |
| 151 | - $path = $media_file->filename(); |
|
| 151 | + $path = $media_file->filename(); |
|
| 152 | 152 | |
| 153 | 153 | if (!$add_watermark || !$media_file->isImage()) { |
| 154 | 154 | return $this->fileResponse($filesystem, $path, $download); |
@@ -14,7 +14,8 @@ |
||
| 14 | 14 | use Fisharebest\Webtrees\Module\ModuleCustomInterface; |
| 15 | 15 | use Fisharebest\Webtrees\Module\ModuleCustomTrait; |
| 16 | 16 | |
| 17 | -return new class () extends AbstractModule implements ModuleCustomInterface { |
|
| 17 | +return new class () extends AbstractModule implements ModuleCustomInterface |
|
| 18 | +{ |
|
| 18 | 19 | use ModuleCustomTrait; |
| 19 | 20 | |
| 20 | 21 | /** |