@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function icon(ModuleInterface $module): string |
| 47 | 47 | { |
| 48 | - return view($module->name() . '::icons/view-map', ['type' => $this->type()]); |
|
| 48 | + return view($module->name().'::icons/view-map', ['type' => $this->type()]); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function globalSettingsContent(ModuleInterface $module): string |
| 56 | 56 | { |
| 57 | - return view($module->name() . '::admin/view-edit-map', [ |
|
| 57 | + return view($module->name().'::admin/view-edit-map', [ |
|
| 58 | 58 | 'module_name' => $module->name(), |
| 59 | 59 | 'view' => $this, |
| 60 | 60 | 'colors' => $this->colors(), |
@@ -71,8 +71,8 @@ discard block |
||
| 71 | 71 | { |
| 72 | 72 | $default_color = Validator::parsedBody($request)->string('view_map_color_default', ''); |
| 73 | 73 | $stroke_color = Validator::parsedBody($request)->string('view_map_color_stroke', ''); |
| 74 | - $maxvalue_color = Validator::parsedBody($request)->string('view_map_color_maxvalue', ''); |
|
| 75 | - $hover_color = Validator::parsedBody($request)->string('view_map_color_hover', ''); |
|
| 74 | + $maxvalue_color = Validator::parsedBody($request)->string('view_map_color_maxvalue', ''); |
|
| 75 | + $hover_color = Validator::parsedBody($request)->string('view_map_color_hover', ''); |
|
| 76 | 76 | |
| 77 | 77 | try { |
| 78 | 78 | return $this->withColors(new MapColorsConfig( |
@@ -99,17 +99,16 @@ discard block |
||
| 99 | 99 | foreach ($map_adapters as $map_adapter) { |
| 100 | 100 | $adapter_result_tmp = $map_adapter->convert($result); |
| 101 | 101 | $adapter_result = $adapter_result === null ? |
| 102 | - $adapter_result_tmp : |
|
| 103 | - $adapter_result->merge($adapter_result_tmp); |
|
| 102 | + $adapter_result_tmp : $adapter_result->merge($adapter_result_tmp); |
|
| 104 | 103 | } |
| 105 | 104 | |
| 106 | 105 | if ($adapter_result === null) { |
| 107 | - return view($module->name() . '::errors/tab-error', [ |
|
| 106 | + return view($module->name().'::errors/tab-error', [ |
|
| 108 | 107 | 'message' => I18N::translate('The map could not be loaded.'), |
| 109 | 108 | ]); |
| 110 | 109 | } |
| 111 | 110 | |
| 112 | - return view($module->name() . '::geoanalysisview-tab-glb-map', $params + [ |
|
| 111 | + return view($module->name().'::geoanalysisview-tab-glb-map', $params + [ |
|
| 113 | 112 | 'result' => $adapter_result->geoAnalysisResult(), |
| 114 | 113 | 'features' => $adapter_result->features(), |
| 115 | 114 | 'colors' => $this->colors(), |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | { |
| 32 | 32 | $in_transaction = DB::connection()->getPdo()->inTransaction(); |
| 33 | 33 | |
| 34 | - DB::schema()->create('maj_geodisp_views', static function (Blueprint $table): void { |
|
| 34 | + DB::schema()->create('maj_geodisp_views', static function(Blueprint $table): void { |
|
| 35 | 35 | $table->integer('majgv_id')->autoIncrement(); |
| 36 | 36 | $table->integer('majgv_gedcom_id')->index(); |
| 37 | 37 | $table->string('majgv_view_class', 255); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $table->foreign('majgv_gedcom_id')->references('gedcom_id')->on('gedcom')->onDelete('cascade'); |
| 46 | 46 | }); |
| 47 | 47 | |
| 48 | - DB::schema()->create('maj_geodisp_mapviews', static function (Blueprint $table): void { |
|
| 48 | + DB::schema()->create('maj_geodisp_mapviews', static function(Blueprint $table): void { |
|
| 49 | 49 | $table->integer('majgm_id')->autoIncrement(); |
| 50 | 50 | $table->integer('majgm_majgv_id')->index(); |
| 51 | 51 | $table->string('majgm_map_id', 127); |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | } |
| 69 | 69 | $tree = Validator::attributes($request)->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, |
@@ -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('Edit the map configuration'), |
| 89 | 89 | 'tree' => $tree, |
@@ -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, |
@@ -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, |
@@ -61,12 +61,12 @@ |
||
| 61 | 61 | { |
| 62 | 62 | return Registry::cache()->array()->remember( |
| 63 | 63 | 'maj-geodisp-maps-all', |
| 64 | - function () use ($include_disabled): Collection { |
|
| 64 | + function() use ($include_disabled): Collection { |
|
| 65 | 65 | /** @var Collection<string, MapDefinitionInterface> $map_definitions */ |
| 66 | 66 | $map_definitions = $this->module_service |
| 67 | 67 | ->findByInterface(ModuleMapDefinitionProviderInterface::class, $include_disabled) |
| 68 | 68 | ->flatMap(fn(ModuleMapDefinitionProviderInterface $module) => $module->listMapDefinition()) |
| 69 | - ->mapWithKeys(fn(MapDefinitionInterface $map) => [ $map->id() => $map ]); |
|
| 69 | + ->mapWithKeys(fn(MapDefinitionInterface $map) => [$map->id() => $map]); |
|
| 70 | 70 | |
| 71 | 71 | return $map_definitions; |
| 72 | 72 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | ->withProperty( |
| 157 | 157 | 'places', |
| 158 | 158 | $feature_data->places() |
| 159 | - ->map(fn(GeoAnalysisPlace $place): string => $place->place()->firstParts(1)->first()) |
|
| 159 | + ->map(fn(GeoAnalysisPlace $place) : string => $place->place()->firstParts(1)->first()) |
|
| 160 | 160 | ->sort(I18N::comparator()) |
| 161 | 161 | ->toArray() |
| 162 | 162 | ); |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $features_mapping = new Collection(); |
| 189 | 189 | |
| 190 | 190 | $byplaces = $result->knownPlaces(); |
| 191 | - $byplaces->each(function (GeoAnalysisResultItem $item) use ($features_mapping, $result): void { |
|
| 191 | + $byplaces->each(function(GeoAnalysisResultItem $item) use ($features_mapping, $result): void { |
|
| 192 | 192 | $id = $this->place_mapper->map($item->place()->place(), $this->config->mapMappingProperty()); |
| 193 | 193 | |
| 194 | 194 | if ($id !== null && mb_strlen($id) > 0) { |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | } |
| 202 | 202 | }); |
| 203 | 203 | |
| 204 | - return [ $features_mapping, $result]; |
|
| 204 | + return [$features_mapping, $result]; |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |