@@ -61,9 +61,9 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public function loadRoutes(Map $router): void |
| 63 | 63 | { |
| 64 | - $router->attach('', '', static function (Map $router): void { |
|
| 64 | + $router->attach('', '', static function(Map $router): void { |
|
| 65 | 65 | |
| 66 | - $router->attach('', '/module-maj/welcomeblock/{block_id}', static function (Map $router): void { |
|
| 66 | + $router->attach('', '/module-maj/welcomeblock/{block_id}', static function(Map $router): void { |
|
| 67 | 67 | $router->tokens(['block_id' => '\d+']); |
| 68 | 68 | $router->get(MatomoStats::class, '/matomostats', MatomoStats::class); |
| 69 | 69 | }); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $fab_login_block_view = app(\Fisharebest\Webtrees\Module\LoginBlockModule::class) |
| 92 | 92 | ->getBlock($tree, $block_id, ModuleBlockInterface::CONTEXT_EMBED); |
| 93 | 93 | |
| 94 | - $content = view($this->name() . '::block-embed', [ |
|
| 94 | + $content = view($this->name().'::block-embed', [ |
|
| 95 | 95 | 'block_id' => $block_id, |
| 96 | 96 | 'fab_welcome_block_view' => $fab_welcome_block_view, |
| 97 | 97 | 'fab_login_block_view' => $fab_login_block_view, |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function editBlockConfiguration(Tree $tree, int $block_id): string |
| 129 | 129 | { |
| 130 | - return view($this->name() . '::config', $this->matomoSettings($block_id)); |
|
| 130 | + return view($this->name().'::config', $this->matomoSettings($block_id)); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | */ |
| 137 | 137 | public function saveBlockConfiguration(ServerRequestInterface $request, int $block_id): void |
| 138 | 138 | { |
| 139 | - $params = (array) $request->getParsedBody(); |
|
| 139 | + $params = (array)$request->getParsedBody(); |
|
| 140 | 140 | |
| 141 | 141 | $matomo_enabled = $params['matomo_enabled'] == 'yes'; |
| 142 | 142 | $this->setBlockSetting($block_id, 'matomo_enabled', $matomo_enabled ? 'yes' : 'no'); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | ->setBlockSetting($block_id, 'matomo_token', trim($params['matomo_token'])) |
| 160 | 160 | ->setBlockSetting($block_id, 'matomo_siteid', $params['matomo_siteid']); |
| 161 | 161 | |
| 162 | - Registry::cache()->file()->forget($this->name() . '-matomovisits-yearly-' . $block_id); |
|
| 162 | + Registry::cache()->file()->forget($this->name().'-matomovisits-yearly-'.$block_id); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | 'matomo_enabled' => $this->isMatomoEnabled($block_id), |
| 186 | 186 | 'matomo_url' => $this->getBlockSetting($block_id, 'matomo_url'), |
| 187 | 187 | 'matomo_token' => $this->getBlockSetting($block_id, 'matomo_token'), |
| 188 | - 'matomo_siteid' => (int) $this->getBlockSetting($block_id, 'matomo_siteid', '0') |
|
| 188 | + 'matomo_siteid' => (int)$this->getBlockSetting($block_id, 'matomo_siteid', '0') |
|
| 189 | 189 | ]; |
| 190 | 190 | } |
| 191 | 191 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | // How to update the database schema for this module |
| 71 | 71 | private const SCHEMA_TARGET_VERSION = 3; |
| 72 | 72 | private const SCHEMA_SETTING_NAME = 'MAJ_SOSA_SCHEMA_VERSION'; |
| 73 | - private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__ . '\Schema'; |
|
| 73 | + private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__.'\Schema'; |
|
| 74 | 74 | /** |
| 75 | 75 | * {@inheritDoc} |
| 76 | 76 | * @see \Fisharebest\Webtrees\Module\AbstractModule::title() |
@@ -110,25 +110,25 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | public function loadRoutes(Map $router): void |
| 112 | 112 | { |
| 113 | - $router->attach('', '', static function (Map $router): void { |
|
| 113 | + $router->attach('', '', static function(Map $router): void { |
|
| 114 | 114 | |
| 115 | - $router->attach('', '/module-maj/sosa', static function (Map $router): void { |
|
| 115 | + $router->attach('', '/module-maj/sosa', static function(Map $router): void { |
|
| 116 | 116 | |
| 117 | - $router->attach('', '/list', static function (Map $router): void { |
|
| 117 | + $router->attach('', '/list', static function(Map $router): void { |
|
| 118 | 118 | $router->tokens(['gen' => '\d+']); |
| 119 | 119 | $router->get(AncestorsList::class, '/ancestors/{tree}{/gen}', AncestorsList::class); |
| 120 | - $router->get(AncestorsListIndividual::class, '/ancestors/{tree}/{gen}/tab/individuals', AncestorsListIndividual::class); //phpcs:ignore Generic.Files.LineLength.TooLong |
|
| 121 | - $router->get(AncestorsListFamily::class, '/ancestors/{tree}/{gen}/tab/families', AncestorsListFamily::class); //phpcs:ignore Generic.Files.LineLength.TooLong |
|
| 120 | + $router->get(AncestorsListIndividual::class, '/ancestors/{tree}/{gen}/tab/individuals', AncestorsListIndividual::class); //phpcs:ignore Generic.Files.LineLength.TooLong |
|
| 121 | + $router->get(AncestorsListFamily::class, '/ancestors/{tree}/{gen}/tab/families', AncestorsListFamily::class); //phpcs:ignore Generic.Files.LineLength.TooLong |
|
| 122 | 122 | $router->get(MissingAncestorsList::class, '/missing/{tree}{/gen}', MissingAncestorsList::class); |
| 123 | 123 | }); |
| 124 | 124 | |
| 125 | - $router->attach('', '/statistics/{tree}', static function (Map $router): void { |
|
| 125 | + $router->attach('', '/statistics/{tree}', static function(Map $router): void { |
|
| 126 | 126 | |
| 127 | 127 | $router->get(SosaStatistics::class, '', SosaStatistics::class); |
| 128 | 128 | $router->get(PedigreeCollapseData::class, '/pedigreecollapse', PedigreeCollapseData::class); |
| 129 | 129 | }); |
| 130 | 130 | |
| 131 | - $router->attach('', '/config/{tree}', static function (Map $router): void { |
|
| 131 | + $router->attach('', '/config/{tree}', static function(Map $router): void { |
|
| 132 | 132 | |
| 133 | 133 | $router->get(SosaConfig::class, '', SosaConfig::class); |
| 134 | 134 | $router->post(SosaConfigAction::class, '', SosaConfigAction::class); |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | public function headContent(): string |
| 229 | 229 | { |
| 230 | - return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">'; |
|
| 230 | + return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">'; |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /** |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | public function bodyContent(): string |
| 238 | 238 | { |
| 239 | - return '<script src="' . $this->assetUrl('js/sosa.min.js') . '"></script>'; |
|
| 239 | + return '<script src="'.$this->assetUrl('js/sosa.min.js').'"></script>'; |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | /** |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | |
| 253 | 253 | $individual = Registry::individualFactory()->make($xref, $tree); |
| 254 | 254 | |
| 255 | - return view($this->name() . '::sidebar/title', [ |
|
| 255 | + return view($this->name().'::sidebar/title', [ |
|
| 256 | 256 | 'module_name' => $this->name(), |
| 257 | 257 | 'sosa_numbers' => app(SosaRecordsService::class)->sosaNumbers($tree, $user, $individual) |
| 258 | 258 | ]); |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $sosa_root = Registry::individualFactory()->make($sosa_root_xref, $individual->tree()); |
| 269 | 269 | $user = Auth::check() ? Auth::user() : new DefaultUser(); |
| 270 | 270 | |
| 271 | - return view($this->name() . '::sidebar/content', [ |
|
| 271 | + return view($this->name().'::sidebar/content', [ |
|
| 272 | 272 | 'sosa_ancestor' => $individual, |
| 273 | 273 | 'sosa_root' => $sosa_root, |
| 274 | 274 | 'sosa_numbers' => app(SosaRecordsService::class)->sosaNumbers($individual->tree(), $user, $individual) |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | // How to update the database schema for this module |
| 76 | 76 | private const SCHEMA_TARGET_VERSION = 2; |
| 77 | 77 | private const SCHEMA_SETTING_NAME = 'MAJ_GEODISP_SCHEMA_VERSION'; |
| 78 | - private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__ . '\Schema'; |
|
| 78 | + private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__.'\Schema'; |
|
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | 81 | * {@inheritDoc} |
@@ -125,13 +125,13 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | public function loadRoutes(Map $router): void |
| 127 | 127 | { |
| 128 | - $router->attach('', '', static function (Map $router): void { |
|
| 128 | + $router->attach('', '', static function(Map $router): void { |
|
| 129 | 129 | |
| 130 | - $router->attach('', '/module-maj/geodispersion', static function (Map $router): void { |
|
| 131 | - $router->attach('', '/admin', static function (Map $router): void { |
|
| 130 | + $router->attach('', '/module-maj/geodispersion', static function(Map $router): void { |
|
| 131 | + $router->attach('', '/admin', static function(Map $router): void { |
|
| 132 | 132 | $router->get(AdminConfigPage::class, '/config{/tree}', AdminConfigPage::class); |
| 133 | 133 | |
| 134 | - $router->attach('', '/analysis-views/{tree}', static function (Map $router): void { |
|
| 134 | + $router->attach('', '/analysis-views/{tree}', static function(Map $router): void { |
|
| 135 | 135 | $router->tokens(['view_id' => '\d+', 'enable' => '[01]']); |
| 136 | 136 | $router->extras([ |
| 137 | 137 | 'middleware' => [ |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | //phpcs:enable |
| 151 | 151 | }); |
| 152 | 152 | |
| 153 | - $router->attach('', '/map-adapters/{tree}', static function (Map $router): void { |
|
| 153 | + $router->attach('', '/map-adapters/{tree}', static function(Map $router): void { |
|
| 154 | 154 | $router->tokens(['adapter_id' => '\d+', 'view_id' => '\d+']); |
| 155 | 155 | $router->extras([ |
| 156 | 156 | 'middleware' => [ |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | |
| 175 | 175 | $router->get(GeoAnalysisViewsList::class, '/list/{tree}', GeoAnalysisViewsList::class); |
| 176 | 176 | |
| 177 | - $router->attach('', '/analysisview/{tree}/{view_id}', static function (Map $router): void { |
|
| 177 | + $router->attach('', '/analysisview/{tree}/{view_id}', static function(Map $router): void { |
|
| 178 | 178 | $router->tokens(['view_id' => '\d+']); |
| 179 | 179 | $router->get(GeoAnalysisViewPage::class, '', GeoAnalysisViewPage::class); |
| 180 | 180 | $router->get(GeoAnalysisViewTabs::class, '/tabs', GeoAnalysisViewTabs::class); |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public function headContent(): string |
| 214 | 214 | { |
| 215 | - return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">'; |
|
| 215 | + return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">'; |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | /** |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $tree = $request->getAttribute('tree'); |
| 80 | 80 | assert($tree instanceof Tree); |
| 81 | 81 | |
| 82 | - $view_id = (int) $request->getAttribute('view_id'); |
|
| 82 | + $view_id = (int)$request->getAttribute('view_id'); |
|
| 83 | 83 | $view = $this->geoview_data_service->find($tree, $view_id, true); |
| 84 | 84 | |
| 85 | 85 | if ($view === null) { |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | ); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - return $this->viewResponse($this->module->name() . '::admin/view-edit', [ |
|
| 91 | + return $this->viewResponse($this->module->name().'::admin/view-edit', [ |
|
| 92 | 92 | 'module' => $this->module, |
| 93 | 93 | 'title' => I18N::translate('Edit the geographical dispersion analysis view - %s', $view->type()), |
| 94 | 94 | 'tree' => $tree, |
@@ -68,14 +68,14 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | |
| 71 | - $view_id = (int) $request->getAttribute('view_id'); |
|
| 71 | + $view_id = (int)$request->getAttribute('view_id'); |
|
| 72 | 72 | $view = $this->geoview_data_service->find($tree, $view_id, true); |
| 73 | 73 | |
| 74 | - $params = (array) $request->getParsedBody(); |
|
| 74 | + $params = (array)$request->getParsedBody(); |
|
| 75 | 75 | |
| 76 | 76 | $description = $params['view_description'] ?? ''; |
| 77 | - $place_depth = (int) ($params['view_depth'] ?? 1); |
|
| 78 | - $top_places = (int) ($params['view_top_places'] ?? 0); |
|
| 77 | + $place_depth = (int)($params['view_depth'] ?? 1); |
|
| 78 | + $top_places = (int)($params['view_top_places'] ?? 0); |
|
| 79 | 79 | |
| 80 | 80 | $analysis = null; |
| 81 | 81 | try { |
@@ -105,14 +105,14 @@ discard block |
||
| 105 | 105 | 'success' |
| 106 | 106 | ); |
| 107 | 107 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 108 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been updated.'); |
|
| 108 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” has been updated.'); |
|
| 109 | 109 | } else { |
| 110 | 110 | FlashMessages::addMessage( |
| 111 | 111 | I18N::translate('An error occured while updating the geographical dispersion analysis view'), |
| 112 | 112 | 'danger' |
| 113 | 113 | ); |
| 114 | 114 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 115 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” could not be updated. See error log.'); |
|
| 115 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” could not be updated. See error log.'); |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | return redirect($admin_config_route); |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | $tree = $request->getAttribute('tree'); |
| 66 | 66 | assert($tree instanceof Tree); |
| 67 | 67 | |
| 68 | - $adapter_id = (int) $request->getAttribute('adapter_id'); |
|
| 68 | + $adapter_id = (int)$request->getAttribute('adapter_id'); |
|
| 69 | 69 | $map_adapter = $this->mapadapter_data_service->find($adapter_id); |
| 70 | 70 | |
| 71 | 71 | $mapper_class = $request->getQueryParams()['mapper'] ?? ''; |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | $tree = $request->getAttribute('tree'); |
| 69 | 69 | assert($tree instanceof Tree); |
| 70 | 70 | |
| 71 | - return $this->viewResponse($this->module->name() . '::admin/view-add', [ |
|
| 71 | + return $this->viewResponse($this->module->name().'::admin/view-add', [ |
|
| 72 | 72 | 'module' => $this->module, |
| 73 | 73 | 'title' => I18N::translate('Add a geographical dispersion analysis view'), |
| 74 | 74 | 'tree' => $tree, |
@@ -69,11 +69,11 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | |
| 72 | - $params = (array) $request->getParsedBody(); |
|
| 72 | + $params = (array)$request->getParsedBody(); |
|
| 73 | 73 | |
| 74 | 74 | $type = $params['view_type'] ?? ''; |
| 75 | 75 | $description = $params['view_description'] ?? ''; |
| 76 | - $place_depth = (int) ($params['view_depth'] ?? 1); |
|
| 76 | + $place_depth = (int)($params['view_depth'] ?? 1); |
|
| 77 | 77 | |
| 78 | 78 | $analysis = null; |
| 79 | 79 | try { |
@@ -105,9 +105,9 @@ discard block |
||
| 105 | 105 | 'success' |
| 106 | 106 | ); |
| 107 | 107 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 108 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $new_view_id . '” has been added.'); |
|
| 108 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$new_view_id.'” has been added.'); |
|
| 109 | 109 | return redirect( |
| 110 | - route(GeoAnalysisViewEditPage::class, ['tree' => $tree->name(), 'view_id' => $new_view_id ]) |
|
| 110 | + route(GeoAnalysisViewEditPage::class, ['tree' => $tree->name(), 'view_id' => $new_view_id]) |
|
| 111 | 111 | ); |
| 112 | 112 | } else { |
| 113 | 113 | FlashMessages::addMessage( |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | 'danger' |
| 116 | 116 | ); |
| 117 | 117 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 118 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : A new View could not be added. See error log.'); |
|
| 118 | + Log::addConfigurationLog('Module '.$this->module->title().' : A new View could not be added. See error log.'); |
|
| 119 | 119 | return redirect($admin_config_route); |
| 120 | 120 | } |
| 121 | 121 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $tree = $request->getAttribute('tree'); |
| 74 | 74 | assert($tree instanceof Tree); |
| 75 | 75 | |
| 76 | - $adapter_id = (int) $request->getAttribute('adapter_id'); |
|
| 76 | + $adapter_id = (int)$request->getAttribute('adapter_id'); |
|
| 77 | 77 | $map_adapter = $this->mapadapter_data_service->find($adapter_id); |
| 78 | 78 | |
| 79 | 79 | if ($map_adapter === null) { |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | ); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - return $this->viewResponse($this->module->name() . '::admin/map-adapter-edit', [ |
|
| 85 | + return $this->viewResponse($this->module->name().'::admin/map-adapter-edit', [ |
|
| 86 | 86 | 'module' => $this->module, |
| 87 | 87 | 'title' => I18N::translate('Edit the map configuration'), |
| 88 | 88 | 'tree' => $tree, |