@@ -100,7 +100,7 @@ |
||
100 | 100 | 'danger' |
101 | 101 | ); |
102 | 102 | //phpcs:ignore Generic.Files.LineLength.TooLong |
103 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Error when deleting invalid map configurations: ' . $ex->getMessage()); |
|
103 | + Log::addConfigurationLog('Module '.$this->module->title().' : Error when deleting invalid map configurations: '.$ex->getMessage()); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | return redirect(route(GeoAnalysisViewEditPage::class, [ |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | ); |
56 | 56 | |
57 | 57 | return response(Registry::cache()->file()->remember( |
58 | - 'map-properties-' . $map_id, |
|
59 | - function () use ($map_id): array { |
|
58 | + 'map-properties-'.$map_id, |
|
59 | + function() use ($map_id): array { |
|
60 | 60 | $map = $this->map_definition_service->find($map_id); |
61 | 61 | if ($map === null) { |
62 | 62 | throw new HttpNotFoundException(I18N::translate('The map could not be found.')); |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | collect($map->features()) |
67 | 67 | ->map(fn(Feature $feature): ?stdClass => $feature->getProperties()) |
68 | 68 | ->filter() |
69 | - ->map(fn(stdClass $properties): array => array_keys(get_object_vars($properties))) |
|
70 | - ->each(function (array $properties) use (&$features): void { |
|
69 | + ->map(fn(stdClass $properties) : array => array_keys(get_object_vars($properties))) |
|
70 | + ->each(function(array $properties) use (&$features) : void { |
|
71 | 71 | $features = count($features) === 0 ? $properties : array_intersect($features, $properties); |
72 | 72 | }); |
73 | 73 |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | 'success' |
100 | 100 | ); |
101 | 101 | //phpcs:ignore Generic.Files.LineLength.TooLong |
102 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $new_view_id . '” has been added.'); |
|
102 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$new_view_id.'” has been added.'); |
|
103 | 103 | return redirect( |
104 | - route(GeoAnalysisViewEditPage::class, ['tree' => $tree->name(), 'view_id' => $new_view_id ]) |
|
104 | + route(GeoAnalysisViewEditPage::class, ['tree' => $tree->name(), 'view_id' => $new_view_id]) |
|
105 | 105 | ); |
106 | 106 | } else { |
107 | 107 | FlashMessages::addMessage( |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | 'danger' |
110 | 110 | ); |
111 | 111 | //phpcs:ignore Generic.Files.LineLength.TooLong |
112 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : A new View could not be added. See error log.'); |
|
112 | + Log::addConfigurationLog('Module '.$this->module->title().' : A new View could not be added. See error log.'); |
|
113 | 113 | return redirect($admin_config_route); |
114 | 114 | } |
115 | 115 | } |
@@ -83,7 +83,7 @@ |
||
83 | 83 | ); |
84 | 84 | } |
85 | 85 | |
86 | - return $this->viewResponse($this->module->name() . '::admin/map-adapter-edit', [ |
|
86 | + return $this->viewResponse($this->module->name().'::admin/map-adapter-edit', [ |
|
87 | 87 | 'module' => $this->module, |
88 | 88 | 'title' => I18N::translate('Add a map configuration'), |
89 | 89 | 'tree' => $tree, |
@@ -81,14 +81,14 @@ |
||
81 | 81 | 'success' |
82 | 82 | ); |
83 | 83 | //phpcs:ignore Generic.Files.LineLength.TooLong |
84 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” has been deleted.'); |
|
84 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” has been deleted.'); |
|
85 | 85 | } else { |
86 | 86 | FlashMessages::addMessage( |
87 | 87 | I18N::translate('An error occured while deleting the map configuration.'), |
88 | 88 | 'danger' |
89 | 89 | ); |
90 | 90 | //phpcs:ignore Generic.Files.LineLength.TooLong |
91 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” could not be deleted. See error log.'); |
|
91 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” could not be deleted. See error log.'); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return redirect(route(GeoAnalysisViewEditPage::class, [ |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $view = $this->geoview_data_service->find($tree, $view_id); |
83 | 83 | |
84 | 84 | $map = $this->map_definition_service->find(Validator::parsedBody($request)->string('map_adapter_map', '')); |
85 | - $mapping_property = Validator::parsedBody($request)->string('map_adapter_property_selected', ''); |
|
85 | + $mapping_property = Validator::parsedBody($request)->string('map_adapter_property_selected', ''); |
|
86 | 86 | |
87 | 87 | $mapper = null; |
88 | 88 | try { |
@@ -113,14 +113,14 @@ discard block |
||
113 | 113 | 'success' |
114 | 114 | ); |
115 | 115 | //phpcs:ignore Generic.Files.LineLength.TooLong |
116 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $new_adapter_id . '” has been added.'); |
|
116 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$new_adapter_id.'” has been added.'); |
|
117 | 117 | } else { |
118 | 118 | FlashMessages::addMessage( |
119 | 119 | I18N::translate('An error occured while adding a new map configuration.'), |
120 | 120 | 'danger' |
121 | 121 | ); |
122 | 122 | //phpcs:ignore Generic.Files.LineLength.TooLong |
123 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter could not be added. See error log.'); |
|
123 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter could not be added. See error log.'); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | return redirect(route(GeoAnalysisViewEditPage::class, [ |
@@ -63,7 +63,7 @@ |
||
63 | 63 | $tree = Validator::attributes($request)->tree(); |
64 | 64 | $view_id = Validator::attributes($request)->integer('view_id', 0); |
65 | 65 | |
66 | - return $this->viewResponse($this->module->name() . '::geoanalysisview-page', [ |
|
66 | + return $this->viewResponse($this->module->name().'::geoanalysisview-page', [ |
|
67 | 67 | 'module_name' => $this->module->name(), |
68 | 68 | 'title' => I18N::translate('Geographical dispersion'), |
69 | 69 | 'tree' => $tree, |
@@ -82,7 +82,7 @@ |
||
82 | 82 | ); |
83 | 83 | } |
84 | 84 | |
85 | - return $this->viewResponse($this->module->name() . '::admin/view-edit', [ |
|
85 | + return $this->viewResponse($this->module->name().'::admin/view-edit', [ |
|
86 | 86 | 'module' => $this->module, |
87 | 87 | 'title' => I18N::translate('Edit the geographical dispersion analysis view - %s', $view->type()), |
88 | 88 | 'tree' => $tree, |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | return [ |
65 | 65 | 'topPlaces' => $this->topPlaces() |
66 | - ->map(fn(Place $place): array => [ $place->tree()->id(), $place->gedcomName() ]) |
|
66 | + ->map(fn(Place $place): array => [$place->tree()->id(), $place->gedcomName()]) |
|
67 | 67 | ->toArray() |
68 | 68 | ]; |
69 | 69 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | ->filter( |
87 | 87 | /** @psalm-suppress MissingClosureParamType */ |
88 | 88 | fn($item): bool => is_array($item) && count($item) == 2 |
89 | - )->map(function (array $item): ?Place { |
|
89 | + )->map(function(array $item): ?Place { |
|
90 | 90 | try { |
91 | 91 | return new Place($item[1], $this->tree_service->find($item[0])); |
92 | 92 | } catch (RuntimeException $ex) { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function configContent(ModuleInterface $module, Tree $tree): string |
108 | 108 | { |
109 | - return view($module->name() . '::mappers/filtered-top-config', [ |
|
109 | + return view($module->name().'::mappers/filtered-top-config', [ |
|
110 | 110 | 'tree' => $tree, |
111 | 111 | 'top_places' => $this->topPlaces() |
112 | 112 | ]); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $top_places = Validator::parsedBody($request)->array('mapper_filt_top_places'); |
129 | 129 | $config = ['topPlaces' => []]; |
130 | 130 | foreach ($top_places as $top_place_id) { |
131 | - $place = Place::find((int) $top_place_id, $tree); |
|
131 | + $place = Place::find((int)$top_place_id, $tree); |
|
132 | 132 | if (mb_strlen($place->gedcomName()) > 0) { |
133 | 133 | $config['topPlaces'][] = $place; |
134 | 134 | } |