Passed
Push — main ( f9aaf7...4197a4 )
by Jonathan
14:34
created
app/Module/GeoDispersion/Http/RequestHandlers/AdminConfigPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
             throw new HttpAccessDeniedException();
88 88
         }
89 89
 
90
-        return $this->viewResponse($this->module->name() . '::admin/config', [
90
+        return $this->viewResponse($this->module->name().'::admin/config', [
91 91
             'module_name'       =>  $this->module->name(),
92 92
             'title'             =>  $this->module->title(),
93 93
             'tree'              =>  $tree,
Please login to merge, or discard this patch.
Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewStatusAction.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             return redirect($admin_config_route);
66 66
         }
67 67
 
68
-        $view_id = (int) $request->getAttribute('view_id');
68
+        $view_id = (int)$request->getAttribute('view_id');
69 69
         $view = $this->geoview_data_service->find($tree, $view_id, true);
70 70
 
71 71
         if ($view === null) {
@@ -77,20 +77,20 @@  discard block
 block discarded – undo
77 77
         }
78 78
 
79 79
         try {
80
-            $this->geoview_data_service->updateStatus($view, (bool) $request->getAttribute('enable', false));
80
+            $this->geoview_data_service->updateStatus($view, (bool)$request->getAttribute('enable', false));
81 81
             FlashMessages::addMessage(
82 82
                 I18N::translate('The geographical dispersion analysis view has been successfully updated.'),
83 83
                 'success'
84 84
             );
85 85
             //phpcs:ignore Generic.Files.LineLength.TooLong
86
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been updated.');
86
+            Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” has been updated.');
87 87
         } catch (Throwable $ex) {
88 88
             FlashMessages::addMessage(
89 89
                 I18N::translate('An error occured while updating the geographical dispersion analysis view.'),
90 90
                 'danger'
91 91
             );
92 92
             //phpcs:ignore Generic.Files.LineLength.TooLong
93
-            Log::addErrorLog('Module ' . $this->module->title() . ' : Error when updating view “' . $view->id() . '”: ' . $ex->getMessage());
93
+            Log::addErrorLog('Module '.$this->module->title().' : Error when updating view “'.$view->id().'”: '.$ex->getMessage());
94 94
         }
95 95
 
96 96
         return redirect($admin_config_route);
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/MapAdapterAddAction.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,13 +78,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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, [
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,9 +63,9 @@
 block discarded – undo
63 63
         assert($tree instanceof Tree);
64 64
 
65 65
         $view_id = $request->getAttribute('view_id');
66
-        $view_id = is_numeric($view_id) ? (int) $view_id : 0;
66
+        $view_id = is_numeric($view_id) ? (int)$view_id : 0;
67 67
 
68
-        return $this->viewResponse($this->module->name() . '::geoanalysisview-page', [
68
+        return $this->viewResponse($this->module->name().'::geoanalysisview-page', [
69 69
             'module_name'           =>  $this->module->name(),
70 70
             'title'                 =>  I18N::translate('Geographical dispersion'),
71 71
             'tree'                  =>  $tree,
Please login to merge, or discard this patch.
Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewDeleteAction.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/MapAdapterDeleteAction.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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, [
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/MapAdapterAddPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewListData.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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' => [
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/MapFeaturePropertyData.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
         $map_id = $request->getQueryParams()['map_id'] ?? $request->getAttribute('map_id') ?? '';
52 52
 
53 53
         return response(Registry::cache()->file()->remember(
54
-            'map-properties-' . $map_id,
55
-            function () use ($map_id): array {
54
+            'map-properties-'.$map_id,
55
+            function() use ($map_id): array {
56 56
                 $map = $this->map_definition_service->find($map_id);
57 57
                 if ($map === null) {
58 58
                     throw new HttpNotFoundException(I18N::translate('The map could not be found.'));
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
                 collect($map->features())
63 63
                     ->map(fn(Feature $feature): ?stdClass => $feature->getProperties())
64 64
                     ->filter()
65
-                    ->map(fn(stdClass $properties): array => array_keys(get_object_vars($properties)))
66
-                    ->each(function (array $properties) use (&$features): void {
65
+                    ->map(fn(stdClass $properties) : array => array_keys(get_object_vars($properties)))
66
+                    ->each(function(array $properties) use (&$features) : void {
67 67
                         $features = count($features) === 0 ? $properties : array_intersect($features, $properties);
68 68
                     });
69 69
 
Please login to merge, or discard this patch.