@@ -53,7 +53,7 @@ |
||
53 | 53 | */ |
54 | 54 | public function handle(ServerRequestInterface $request): ResponseInterface |
55 | 55 | { |
56 | - $place_id = (int) $request->getQueryParams()['place_id']; |
|
56 | + $place_id = (int) $request->getQueryParams()['place_id']; |
|
57 | 57 | |
58 | 58 | $place = $this->map_data_service->findById($place_id); |
59 | 59 | $parent = $place->parent(); |
@@ -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; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | '_TODO', |
68 | 68 | 'CHAN', |
69 | 69 | ]; |
70 | - protected const BHEIGHT = 30; |
|
70 | + protected const BHEIGHT = 30; |
|
71 | 71 | |
72 | 72 | // Box height |
73 | 73 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | $params = (array) $request->getParsedBody(); |
154 | 154 | |
155 | - $add = $params['add'] ?? ''; |
|
155 | + $add = $params['add'] ?? ''; |
|
156 | 156 | |
157 | 157 | Auth::checkComponentAccess($this, ModuleChartInterface::class, $tree, $user); |
158 | 158 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | */ |
53 | 53 | public function find($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() |
@@ -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]; |
@@ -294,7 +294,7 @@ |
||
294 | 294 | { |
295 | 295 | $tmp = round($degrees, self::PRECISION); |
296 | 296 | |
297 | - return ($tmp < 0 ? $negative : $positive) . (string)abs($tmp); |
|
297 | + return ($tmp < 0 ? $negative : $positive) . (string) abs($tmp); |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | /** |
@@ -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 | 'class' => 'wt-chart-pedigree', |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | 'generations' => 2, |
139 | 139 | 'chart_style' => DescendancyChartModule::CHART_STYLE_TREE, |
140 | 140 | ]); |
141 | - $content = view('modules/charts/chart', [ |
|
141 | + $content = view('modules/charts/chart', [ |
|
142 | 142 | 'block_id' => $block_id, |
143 | 143 | 'chart_url' => $chart_url, |
144 | 144 | 'class' => 'wt-chart-descendants', |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | break; |
152 | 152 | |
153 | 153 | case 'hourglass': |
154 | - $module = $this->module_service->findByInterface(HourglassChartModule::class)->first(); |
|
154 | + $module = $this->module_service->findByInterface(HourglassChartModule::class)->first(); |
|
155 | 155 | |
156 | 156 | if ($module instanceof HourglassChartModule) { |
157 | 157 | $title = $module->chartTitle($individual); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | 'ajax' => true, |
160 | 160 | 'generations' => 2, |
161 | 161 | ]); |
162 | - $content = view('modules/charts/chart', [ |
|
162 | + $content = view('modules/charts/chart', [ |
|
163 | 163 | 'block_id' => $block_id, |
164 | 164 | 'chart_url' => $chart_url, |
165 | 165 | 'class' => 'wt-chart-hourglass', |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | $default_xref = $gedcomid ?: $PEDIGREE_ROOT_ID; |
266 | 266 | |
267 | 267 | $type = $this->getBlockSetting($block_id, 'type', 'pedigree'); |
268 | - $xref = $this->getBlockSetting($block_id, 'pid', $default_xref); |
|
268 | + $xref = $this->getBlockSetting($block_id, 'pid', $default_xref); |
|
269 | 269 | |
270 | 270 | $charts = [ |
271 | 271 | 'pedigree' => I18N::translate('Pedigree'), |
@@ -160,13 +160,13 @@ discard block |
||
160 | 160 | |
161 | 161 | if ($place_id === 0) { |
162 | 162 | $breadcrumbs[] = I18N::translate('Add'); |
163 | - $title .= ' — ' . I18N::translate('Add'); |
|
163 | + $title .= ' — ' . I18N::translate('Add'); |
|
164 | 164 | $latitude = GedcomService::INVALID_COORD; |
165 | 165 | $longitude = GedcomService::INVALID_COORD; |
166 | 166 | $map_bounds = $parent->boundingRectangle(); |
167 | 167 | } else { |
168 | 168 | $breadcrumbs[] = I18N::translate('Edit'); |
169 | - $title .= ' — ' . I18N::translate('Edit'); |
|
169 | + $title .= ' — ' . I18N::translate('Edit'); |
|
170 | 170 | $latitude = $location->latitude(); |
171 | 171 | $longitude = $location->longitude(); |
172 | 172 | $map_bounds = $location->boundingRectangle(); |
@@ -217,8 +217,8 @@ discard block |
||
217 | 217 | |
218 | 218 | $parent_id = (int) $request->getQueryParams()['parent_id']; |
219 | 219 | $place_id = (int) $request->getQueryParams()['place_id']; |
220 | - $lat = $this->gedcom_service->writeLatitude((float)$params['new_place_lati']); |
|
221 | - $lng = $this->gedcom_service->writeLongitude((float)$params['new_place_long']); |
|
220 | + $lat = $this->gedcom_service->writeLatitude((float) $params['new_place_lati']); |
|
221 | + $lng = $this->gedcom_service->writeLongitude((float) $params['new_place_long']); |
|
222 | 222 | $hierarchy = $this->getHierarchy($parent_id); |
223 | 223 | $level = count($hierarchy); |
224 | 224 | $icon = $params['icon']; |
@@ -534,8 +534,8 @@ discard block |
||
534 | 534 | |
535 | 535 | $places[] = [ |
536 | 536 | 'pl_level' => $level, |
537 | - 'pl_long' => (float)strtr($row[$count - 4], ['E' => '', 'W' => '-', ',' => '.']), |
|
538 | - 'pl_lati' => (float)strtr($row[$count - 3], ['N' => '', 'S' => '-', ',' => '.']), |
|
537 | + 'pl_long' => (float) strtr($row[$count - 4], ['E' => '', 'W' => '-', ',' => '.']), |
|
538 | + 'pl_lati' => (float) strtr($row[$count - 3], ['N' => '', 'S' => '-', ',' => '.']), |
|
539 | 539 | 'pl_zoom' => $row[$count - 2], |
540 | 540 | 'pl_icon' => $row[$count - 1], |
541 | 541 | 'fqpn' => $fqdn, |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $create_form = ''; |
223 | 223 | foreach ($media_trees as $media_tree => $media_directory) { |
224 | 224 | if (str_starts_with($row[0], $media_directory)) { |
225 | - $tmp = substr($row[0], strlen($media_directory)); |
|
225 | + $tmp = substr($row[0], strlen($media_directory)); |
|
226 | 226 | $create_form .= |
227 | 227 | '<p><a href="#" data-toggle="modal" data-backdrop="static" data-target="#modal-create-media-from-file" data-file="' . e($tmp) . '" data-url="' . e(route('create-media-from-file', ['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>'; |
228 | 228 | } |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | // This will work for local filesystems. For remote filesystems, we will |
318 | 318 | // need to copy the file locally to work out the image size. |
319 | 319 | $imgsize = getimagesize(Webtrees::DATA_DIR . $file); |
320 | - $html .= '<dt>' . I18N::translate('Image dimensions') . '</dt>'; |
|
320 | + $html .= '<dt>' . I18N::translate('Image dimensions') . '</dt>'; |
|
321 | 321 | /* I18N: image dimensions, width × height */ |
322 | 322 | $html .= '<dd>' . I18N::translate('%1$s × %2$s pixels', I18N::number($imgsize['0']), I18N::number($imgsize['1'])) . '</dd>'; |
323 | 323 | } catch (Throwable $ex) { |