Passed
Push — main ( f9aaf7...4197a4 )
by Jonathan
14:34
created
app/Module/GeoDispersion/GeoDispersionModule.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     // How to update the database schema for this module
77 77
     private const SCHEMA_TARGET_VERSION   = 3;
78 78
     private const SCHEMA_SETTING_NAME     = 'MAJ_GEODISP_SCHEMA_VERSION';
79
-    private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__ . '\Schema';
79
+    private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__.'\Schema';
80 80
 
81 81
     /**
82 82
      * {@inheritDoc}
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function loadRoutes(Map $router): void
128 128
     {
129
-        $router->attach('', '', static function (Map $router): void {
129
+        $router->attach('', '', static function(Map $router): void {
130 130
 
131
-            $router->attach('', '/module-maj/geodispersion', static function (Map $router): void {
132
-                $router->attach('', '/admin', static function (Map $router): void {
131
+            $router->attach('', '/module-maj/geodispersion', static function(Map $router): void {
132
+                $router->attach('', '/admin', static function(Map $router): void {
133 133
                     $router->get(AdminConfigPage::class, '/config{/tree}', AdminConfigPage::class);
134 134
 
135
-                    $router->attach('', '/analysis-views/{tree}', static function (Map $router): void {
135
+                    $router->attach('', '/analysis-views/{tree}', static function(Map $router): void {
136 136
                         $router->tokens(['view_id' => '\d+', 'enable' => '[01]']);
137 137
                         $router->extras([
138 138
                             'middleware' => [
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                         //phpcs:enable
152 152
                     });
153 153
 
154
-                    $router->attach('', '/map-adapters/{tree}', static function (Map $router): void {
154
+                    $router->attach('', '/map-adapters/{tree}', static function(Map $router): void {
155 155
                         $router->tokens(['adapter_id' => '\d+', 'view_id' => '\d+']);
156 156
                         $router->extras([
157 157
                             'middleware' => [
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
                 $router->get(GeoAnalysisViewsList::class, '/list/{tree}', GeoAnalysisViewsList::class);
178 178
 
179
-                $router->attach('', '/analysisview/{tree}/{view_id}', static function (Map $router): void {
179
+                $router->attach('', '/analysisview/{tree}/{view_id}', static function(Map $router): void {
180 180
                     $router->tokens(['view_id' => '\d+']);
181 181
                     $router->get(GeoAnalysisViewPage::class, '', GeoAnalysisViewPage::class);
182 182
                     $router->get(GeoAnalysisViewTabs::class, '/tabs', GeoAnalysisViewTabs::class);
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      */
215 215
     public function headContent(): string
216 216
     {
217
-        return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">';
217
+        return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">';
218 218
     }
219 219
 
220 220
     /**
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewEditPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $tree = $request->getAttribute('tree');
80 80
         assert($tree instanceof Tree);
81 81
 
82
-        $view_id = (int) $request->getAttribute('view_id');
82
+        $view_id = (int)$request->getAttribute('view_id');
83 83
         $view = $this->geoview_data_service->find($tree, $view_id, true);
84 84
 
85 85
         if ($view === null) {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             );
89 89
         }
90 90
 
91
-        return $this->viewResponse($this->module->name() . '::admin/view-edit', [
91
+        return $this->viewResponse($this->module->name().'::admin/view-edit', [
92 92
             'module'        =>  $this->module,
93 93
             'title'         =>  I18N::translate('Edit the geographical dispersion analysis view - %s', $view->type()),
94 94
             'tree'          =>  $tree,
Please login to merge, or discard this patch.
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/GeoAnalysisViewsList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
             ->all($tree)
68 68
             ->sortBy(fn(AbstractGeoAnalysisView $view) => $view->description());
69 69
 
70
-        return $this->viewResponse($this->module->name() . '::geoanalysisviews-list', [
70
+        return $this->viewResponse($this->module->name().'::geoanalysisviews-list', [
71 71
             'module'        =>  $this->module,
72 72
             'title'         =>  I18N::translate('Geographical dispersion'),
73 73
             'tree'          =>  $tree,
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewTabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         assert($tree instanceof Tree);
61 61
 
62 62
         $view_id = $request->getAttribute('view_id');
63
-        $view_id = is_numeric($view_id) ? (int) $view_id : 0;
63
+        $view_id = is_numeric($view_id) ? (int)$view_id : 0;
64 64
 
65 65
         $view = $this->geoviewdata_service->find($tree, $view_id);
66 66
 
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.