Passed
Branch main (f9aaf7)
by Jonathan
14:43
created
app/Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewEditAction.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
         }
70 70
 
71 71
 
72
-        $view_id = (int) $request->getAttribute('view_id');
72
+        $view_id = (int)$request->getAttribute('view_id');
73 73
         $view = $this->geoview_data_service->find($tree, $view_id, true);
74 74
 
75
-        $params = (array) $request->getParsedBody();
75
+        $params = (array)$request->getParsedBody();
76 76
 
77 77
         $description    = $params['view_description'] ?? '';
78
-        $place_depth    = (int) ($params['view_depth'] ?? 1);
79
-        $top_places     = (int) ($params['view_top_places'] ?? 0);
78
+        $place_depth    = (int)($params['view_depth'] ?? 1);
79
+        $top_places     = (int)($params['view_top_places'] ?? 0);
80 80
 
81 81
         $analysis = null;
82 82
         try {
@@ -107,14 +107,14 @@  discard block
 block discarded – undo
107 107
                 'success'
108 108
             );
109 109
             //phpcs:ignore Generic.Files.LineLength.TooLong
110
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been updated.');
110
+            Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” has been updated.');
111 111
         } catch (Throwable $ex) {
112 112
             FlashMessages::addMessage(
113 113
                 I18N::translate('An error occured while updating the geographical dispersion analysis view.'),
114 114
                 'danger'
115 115
             );
116 116
             //phpcs:ignore Generic.Files.LineLength.TooLong
117
-            Log::addErrorLog('Module ' . $this->module->title() . ' : Error when updating view “' . $view->id() . '”: ' . $ex->getMessage());
117
+            Log::addErrorLog('Module '.$this->module->title().' : Error when updating view “'.$view->id().'”: '.$ex->getMessage());
118 118
         }
119 119
 
120 120
         return redirect($admin_config_route);
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/MapAdapterMapperConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
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'] ?? '';
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewAddPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewAddAction.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/MapAdapterEditPage.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
-        $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
 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('Edit the map configuration'),
88 88
             'tree'              =>  $tree,
Please login to merge, or discard this patch.
Module/GeoDispersion/Http/RequestHandlers/MapAdapterDeleteInvalidAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             return redirect(route(AdminConfigPage::class, ['tree' => $tree]));
73 73
         }
74 74
 
75
-        $view_id = (int) $request->getAttribute('view_id');
75
+        $view_id = (int)$request->getAttribute('view_id');
76 76
         $view = $this->geoview_data_service->find($tree, $view_id);
77 77
 
78 78
         if ($view === null || !($view instanceof GeoAnalysisMap)) {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                 'danger'
100 100
             );
101 101
             //phpcs:ignore Generic.Files.LineLength.TooLong
102
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : Error when deleting invalid map configurations: ' . $ex->getMessage());
102
+            Log::addConfigurationLog('Module '.$this->module->title().' : Error when deleting invalid map configurations: '.$ex->getMessage());
103 103
         }
104 104
 
105 105
         return redirect(route(GeoAnalysisViewEditPage::class, [
Please login to merge, or discard this patch.
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.