@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | return redirect($admin_config_route); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $view_id = (int) $request->getAttribute('view_id'); |
|
| 67 | + $view_id = (int)$request->getAttribute('view_id'); |
|
| 68 | 68 | $view = $this->geoview_data_service->find($tree, $view_id, true); |
| 69 | 69 | |
| 70 | 70 | if ($view === null) { |
@@ -75,20 +75,20 @@ discard block |
||
| 75 | 75 | return redirect($admin_config_route); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - if ($this->geoview_data_service->updateStatus($view, (bool) $request->getAttribute('enable', false)) > 0) { |
|
| 78 | + if ($this->geoview_data_service->updateStatus($view, (bool)$request->getAttribute('enable', false)) > 0) { |
|
| 79 | 79 | FlashMessages::addMessage( |
| 80 | 80 | I18N::translate('The geographical dispersion analysis view has been successfully updated'), |
| 81 | 81 | 'success' |
| 82 | 82 | ); |
| 83 | 83 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 84 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been updated.'); |
|
| 84 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” has been updated.'); |
|
| 85 | 85 | } else { |
| 86 | 86 | FlashMessages::addMessage( |
| 87 | 87 | I18N::translate('An error occured while updating the geographical dispersion analysis view'), |
| 88 | 88 | 'danger' |
| 89 | 89 | ); |
| 90 | 90 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 91 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” could not be updated. See error log.'); |
|
| 91 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” could not be updated. See error log.'); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | return redirect($admin_config_route); |
@@ -78,13 +78,13 @@ discard block |
||
| 78 | 78 | return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - $view_id = (int) $request->getAttribute('view_id'); |
|
| 81 | + $view_id = (int)$request->getAttribute('view_id'); |
|
| 82 | 82 | $view = $this->geoview_data_service->find($tree, $view_id); |
| 83 | 83 | |
| 84 | - $params = (array) $request->getParsedBody(); |
|
| 84 | + $params = (array)$request->getParsedBody(); |
|
| 85 | 85 | |
| 86 | 86 | $map = $this->map_definition_service->find($params['map_adapter_map'] ?? ''); |
| 87 | - $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
| 87 | + $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
| 88 | 88 | |
| 89 | 89 | $mapper = null; |
| 90 | 90 | try { |
@@ -115,14 +115,14 @@ discard block |
||
| 115 | 115 | 'success' |
| 116 | 116 | ); |
| 117 | 117 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 118 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $new_adapter_id . '” has been added.'); |
|
| 118 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$new_adapter_id.'” has been added.'); |
|
| 119 | 119 | } else { |
| 120 | 120 | FlashMessages::addMessage( |
| 121 | 121 | I18N::translate('An error occured while adding a new map configuration'), |
| 122 | 122 | 'danger' |
| 123 | 123 | ); |
| 124 | 124 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 125 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter could not be added. See error log.'); |
|
| 125 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter could not be added. See error log.'); |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | return redirect(route(GeoAnalysisViewEditPage::class, [ |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | return redirect($admin_config_route); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $view_id = (int) $request->getAttribute('view_id'); |
|
| 67 | + $view_id = (int)$request->getAttribute('view_id'); |
|
| 68 | 68 | $view = $this->geoview_data_service->find($tree, $view_id, true); |
| 69 | 69 | |
| 70 | 70 | if ($view === null) { |
@@ -81,14 +81,14 @@ discard block |
||
| 81 | 81 | 'success' |
| 82 | 82 | ); |
| 83 | 83 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 84 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been deleted.'); |
|
| 84 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” has been deleted.'); |
|
| 85 | 85 | } else { |
| 86 | 86 | FlashMessages::addMessage( |
| 87 | 87 | I18N::translate('An error occured while deleting the geographical dispersion analysis view'), |
| 88 | 88 | 'danger' |
| 89 | 89 | ); |
| 90 | 90 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 91 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” could not be deleted. See error log.'); |
|
| 91 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” could not be deleted. See error log.'); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | return redirect($admin_config_route); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | ); |
| 64 | 64 | return redirect($admin_config_route); |
| 65 | 65 | } |
| 66 | - $adapter_id = (int) $request->getAttribute('adapter_id'); |
|
| 66 | + $adapter_id = (int)$request->getAttribute('adapter_id'); |
|
| 67 | 67 | $map_adapter = $this->mapadapter_data_service->find($adapter_id); |
| 68 | 68 | |
| 69 | 69 | if ($map_adapter === null) { |
@@ -80,14 +80,14 @@ discard block |
||
| 80 | 80 | 'success' |
| 81 | 81 | ); |
| 82 | 82 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 83 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” has been deleted.'); |
|
| 83 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” has been deleted.'); |
|
| 84 | 84 | } else { |
| 85 | 85 | FlashMessages::addMessage( |
| 86 | 86 | I18N::translate('An error occured while deleting the map configuration'), |
| 87 | 87 | 'danger' |
| 88 | 88 | ); |
| 89 | 89 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 90 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” could not be deleted. See error log.'); |
|
| 90 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” could not be deleted. See error log.'); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | return redirect(route(GeoAnalysisViewEditPage::class, [ |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $tree = $request->getAttribute('tree'); |
| 74 | 74 | assert($tree instanceof Tree); |
| 75 | 75 | |
| 76 | - $view_id = (int) $request->getAttribute('view_id'); |
|
| 76 | + $view_id = (int)$request->getAttribute('view_id'); |
|
| 77 | 77 | $view = $this->geoview_data_service->find($tree, $view_id, true); |
| 78 | 78 | |
| 79 | 79 | if ($view === 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('Add a map configuration'), |
| 88 | 88 | 'tree' => $tree, |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $module_name = $this->module->name(); |
| 71 | 71 | return response(['data' => $this->geoview_data_service->all($tree, true) |
| 72 | 72 | ->map(fn(AbstractGeoAnalysisView $view) => [ |
| 73 | - "edit" => view($module_name . '::admin/view-table-options', [ |
|
| 73 | + "edit" => view($module_name.'::admin/view-table-options', [ |
|
| 74 | 74 | 'view_id' => $view->id(), |
| 75 | 75 | 'view_enabled' => $view->isEnabled(), |
| 76 | 76 | 'view_edit_route' => route(GeoAnalysisViewEditPage::class, [ |
@@ -88,16 +88,16 @@ discard block |
||
| 88 | 88 | ]), |
| 89 | 89 | ]), |
| 90 | 90 | "enabled" => [ |
| 91 | - 'display' => view($module_name . '::components/yes-no-icons', ['yes' => $view->isEnabled()]), |
|
| 91 | + 'display' => view($module_name.'::components/yes-no-icons', ['yes' => $view->isEnabled()]), |
|
| 92 | 92 | 'raw' => $view->isEnabled() ? 0 : 1 |
| 93 | 93 | ], |
| 94 | 94 | "type" => $view->icon($module), |
| 95 | 95 | "description" => [ |
| 96 | - 'display' => '<span dir="auto">' . e($view->description()) . '</span>', |
|
| 96 | + 'display' => '<span dir="auto">'.e($view->description()).'</span>', |
|
| 97 | 97 | 'raw' => e($view->description()) |
| 98 | 98 | ], |
| 99 | 99 | "analysis" => [ |
| 100 | - 'display' => '<span dir="auto">' . e($view->analysis()->title()) . '</span>', |
|
| 100 | + 'display' => '<span dir="auto">'.e($view->analysis()->title()).'</span>', |
|
| 101 | 101 | 'raw' => e($view->analysis()->title()) |
| 102 | 102 | ], |
| 103 | 103 | "place_depth" => [ |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | $map_id = $request->getQueryParams()['map_id'] ?? $request->getAttribute('map_id') ?? ''; |
| 52 | 52 | |
| 53 | - return response(Registry::cache()->file()->remember('map-properties-' . $map_id, function () use ($map_id) { |
|
| 53 | + return response(Registry::cache()->file()->remember('map-properties-'.$map_id, function() use ($map_id) { |
|
| 54 | 54 | $map = $this->map_definition_service->find($map_id); |
| 55 | 55 | if ($map === null) { |
| 56 | 56 | throw new HttpNotFoundException(I18N::translate('The map could not be found.')); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | ->map(fn(Feature $feature): ?stdClass => $feature->getProperties()) |
| 62 | 62 | ->filter() |
| 63 | 63 | ->map(fn(stdClass $properties) => array_keys(get_object_vars($properties))) |
| 64 | - ->each(function (array $properties) use (&$features) { |
|
| 64 | + ->each(function(array $properties) use (&$features) { |
|
| 65 | 65 | $features = count($features) === 0 ? $properties : array_intersect($features, $properties); |
| 66 | 66 | }); |
| 67 | 67 | |
@@ -73,13 +73,13 @@ discard block |
||
| 73 | 73 | return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
| 74 | 74 | } |
| 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 | - $params = (array) $request->getParsedBody(); |
|
| 79 | + $params = (array)$request->getParsedBody(); |
|
| 80 | 80 | |
| 81 | 81 | $map = $this->map_definition_service->find($params['map_adapter_map'] ?? ''); |
| 82 | - $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
| 82 | + $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
| 83 | 83 | |
| 84 | 84 | $mapper = null; |
| 85 | 85 | try { |
@@ -103,14 +103,14 @@ discard block |
||
| 103 | 103 | 'success' |
| 104 | 104 | ); |
| 105 | 105 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 106 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” has been updated.'); |
|
| 106 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” has been updated.'); |
|
| 107 | 107 | } else { |
| 108 | 108 | FlashMessages::addMessage( |
| 109 | 109 | I18N::translate('An error occured while updating the map configuration'), |
| 110 | 110 | 'danger' |
| 111 | 111 | ); |
| 112 | 112 | //phpcs:ignore Generic.Files.LineLength.TooLong |
| 113 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” could not be updated. See error log.'); |
|
| 113 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” could not be updated. See error log.'); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | return redirect(route(GeoAnalysisViewEditPage::class, [ |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function icon(ModuleInterface $module): string |
| 38 | 38 | { |
| 39 | - return view($module->name() . '::icons/view-table', ['type' => $this->type()]); |
|
| 39 | + return view($module->name().'::icons/view-table', ['type' => $this->type()]); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function globalTabContent(ModuleInterface $module, GeoAnalysisResult $result, array $params): string |
| 65 | 65 | { |
| 66 | - return view($module->name() . '::geoanalysisview-tab-glb-table', $params + [ |
|
| 66 | + return view($module->name().'::geoanalysisview-tab-glb-table', $params + [ |
|
| 67 | 67 | 'result' => $result |
| 68 | 68 | ]); |
| 69 | 69 | } |