Passed
Push — feature/code-analysis ( 60fe63...00c5b4 )
by Jonathan
11:49
created
app/Module/GeoDispersion/Http/RequestHandlers/MapAdapterDeleteAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,14 +79,14 @@
 block discarded – undo
79 79
                 'success'
80 80
             );
81 81
             //phpcs:ignore Generic.Files.LineLength.TooLong
82
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” has been deleted.');
82
+            Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” has been deleted.');
83 83
         } else {
84 84
             FlashMessages::addMessage(
85 85
                 I18N::translate('An error occured while deleting the map configuration.'),
86 86
                 'danger'
87 87
             );
88 88
             //phpcs:ignore Generic.Files.LineLength.TooLong
89
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” could not be deleted. See error log.');
89
+            Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” could not be deleted. See error log.');
90 90
         }
91 91
 
92 92
         return Registry::responseFactory()->redirect(GeoAnalysisViewEditPage::class, [
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewAddAction.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,10 +98,10 @@  discard block
 block discarded – undo
98 98
                 'success'
99 99
             );
100 100
             //phpcs:ignore Generic.Files.LineLength.TooLong
101
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $new_view_id . '” has been added.');
101
+            Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$new_view_id.'” has been added.');
102 102
             return Registry::responseFactory()->redirect(
103 103
                 GeoAnalysisViewEditPage::class,
104
-                ['tree' => $tree->name(), 'view_id' => $new_view_id ]
104
+                ['tree' => $tree->name(), 'view_id' => $new_view_id]
105 105
             );
106 106
         } else {
107 107
             FlashMessages::addMessage(
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                 'danger'
110 110
             );
111 111
             //phpcs:ignore Generic.Files.LineLength.TooLong
112
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : A new View could not be added. See error log.');
112
+            Log::addConfigurationLog('Module '.$this->module->title().' : A new View could not be added. See error log.');
113 113
             return Registry::responseFactory()->redirect(AdminConfigPage::class, ['tree' => $tree->name()]);
114 114
         }
115 115
     }
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewEditAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,14 +102,14 @@
 block discarded – undo
102 102
                 'success'
103 103
             );
104 104
             //phpcs:ignore Generic.Files.LineLength.TooLong
105
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been updated.');
105
+            Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” has been updated.');
106 106
         } catch (Throwable $ex) {
107 107
             FlashMessages::addMessage(
108 108
                 I18N::translate('An error occured while updating the geographical dispersion analysis view.'),
109 109
                 'danger'
110 110
             );
111 111
             //phpcs:ignore Generic.Files.LineLength.TooLong
112
-            Log::addErrorLog('Module ' . $this->module->title() . ' : Error when updating view “' . $view->id() . '”: ' . $ex->getMessage());
112
+            Log::addErrorLog('Module '.$this->module->title().' : Error when updating view “'.$view->id().'”: '.$ex->getMessage());
113 113
         }
114 114
 
115 115
         return Registry::responseFactory()->redirect(GeoAnalysisViewEditPage::class, [
Please login to merge, or discard this patch.
Module/GeoDispersion/Http/RequestHandlers/MapAdapterDeleteInvalidAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
                 'danger'
101 101
             );
102 102
             //phpcs:ignore Generic.Files.LineLength.TooLong
103
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : Error when deleting invalid map configurations: ' . $ex->getMessage());
103
+            Log::addConfigurationLog('Module '.$this->module->title().' : Error when deleting invalid map configurations: '.$ex->getMessage());
104 104
         }
105 105
 
106 106
         return Registry::responseFactory()->redirect(GeoAnalysisViewEditPage::class, [
Please login to merge, or discard this patch.
Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewDeleteAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,14 +79,14 @@
 block discarded – undo
79 79
                 'success'
80 80
             );
81 81
             //phpcs:ignore Generic.Files.LineLength.TooLong
82
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been deleted.');
82
+            Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” has been deleted.');
83 83
         } else {
84 84
             FlashMessages::addMessage(
85 85
                 I18N::translate('An error occured while deleting the geographical dispersion analysis view.'),
86 86
                 'danger'
87 87
             );
88 88
             //phpcs:ignore Generic.Files.LineLength.TooLong
89
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” could not be deleted. See error log.');
89
+            Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” could not be deleted. See error log.');
90 90
         }
91 91
 
92 92
         return Registry::responseFactory()->redirect(AdminConfigPage::class, ['tree' => $tree->name()]);
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
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
         );
56 56
 
57 57
         return Registry::responseFactory()->response(Registry::cache()->file()->remember(
58
-            'map-properties-' . $map_id,
59
-            function () use ($map_id): array {
58
+            'map-properties-'.$map_id,
59
+            function() use ($map_id): array {
60 60
                 $map = $this->map_definition_service->find($map_id);
61 61
                 if ($map === null) {
62 62
                     throw new HttpNotFoundException(I18N::translate('The map could not be found.'));
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
                 collect($map->features())
67 67
                     ->map(fn(Feature $feature): ?stdClass => $feature->getProperties())
68 68
                     ->filter()
69
-                    ->map(fn(stdClass $properties): array => array_keys(get_object_vars($properties)))
70
-                    ->each(function (array $properties) use (&$features): void {
69
+                    ->map(fn(stdClass $properties) : array => array_keys(get_object_vars($properties)))
70
+                    ->each(function(array $properties) use (&$features) : void {
71 71
                         $features = count($features) === 0 ? $properties : array_intersect($features, $properties);
72 72
                     });
73 73
 
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
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $module_name = $this->module->name();
66 66
         return Registry::responseFactory()->response(['data' => $this->geoview_data_service->all($tree, true)
67 67
             ->map(fn(AbstractGeoAnalysisView $view) => [
68
-                'edit' => view($module_name . '::admin/view-table-options', [
68
+                'edit' => view($module_name.'::admin/view-table-options', [
69 69
                     'view_id' => $view->id(),
70 70
                     'view_enabled' => $view->isEnabled(),
71 71
                     'view_edit_route' => route(GeoAnalysisViewEditPage::class, [
@@ -83,16 +83,16 @@  discard block
 block discarded – undo
83 83
                     ]),
84 84
                 ]),
85 85
                 'enabled' =>  [
86
-                    'display' => view($module_name . '::components/yes-no-icons', ['yes' => $view->isEnabled()]),
86
+                    'display' => view($module_name.'::components/yes-no-icons', ['yes' => $view->isEnabled()]),
87 87
                     'raw' => $view->isEnabled() ? 0 : 1
88 88
                 ],
89 89
                 'type' =>  $view->icon($module),
90 90
                 'description' => [
91
-                    'display' => '<bdi>' . e($view->description()) . '</bdi>',
91
+                    'display' => '<bdi>'.e($view->description()).'</bdi>',
92 92
                     'raw' => e($view->description())
93 93
                 ],
94 94
                 'analysis' => [
95
-                    'display' => '<bdi>' . e($view->analysis()->title()) . '</bdi>',
95
+                    'display' => '<bdi>'.e($view->analysis()->title()).'</bdi>',
96 96
                     'raw' => e($view->analysis()->title())
97 97
                 ],
98 98
                 'place_depth' => [
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/MapAdapterAddAction.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $view = $this->geoview_data_service->find($tree, $view_id);
83 83
 
84 84
         $map = $this->map_definition_service->find(Validator::parsedBody($request)->string('map_adapter_map', ''));
85
-        $mapping_property   = Validator::parsedBody($request)->string('map_adapter_property_selected', '');
85
+        $mapping_property = Validator::parsedBody($request)->string('map_adapter_property_selected', '');
86 86
 
87 87
         $mapper = null;
88 88
         try {
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
                 'success'
114 114
             );
115 115
             //phpcs:ignore Generic.Files.LineLength.TooLong
116
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $new_adapter_id . '” has been added.');
116
+            Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$new_adapter_id.'” has been added.');
117 117
         } else {
118 118
             FlashMessages::addMessage(
119 119
                 I18N::translate('An error occured while adding a new map configuration.'),
120 120
                 'danger'
121 121
             );
122 122
             //phpcs:ignore Generic.Files.LineLength.TooLong
123
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter could not be added. See error log.');
123
+            Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter could not be added. See error log.');
124 124
         }
125 125
 
126 126
         return Registry::responseFactory()->redirect(GeoAnalysisViewEditPage::class, [
Please login to merge, or discard this patch.
Module/GeoDispersion/PlaceMappers/Config/FilteredTopPlaceMapperConfig.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         return [
65 65
             'topPlaces' => $this->topPlaces()
66
-                ->map(fn(Place $place): array => [ $place->tree()->id(), $place->gedcomName() ])
66
+                ->map(fn(Place $place): array => [$place->tree()->id(), $place->gedcomName()])
67 67
                 ->toArray()
68 68
         ];
69 69
     }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                     ->filter(
87 87
                         /** @psalm-suppress MissingClosureParamType */
88 88
                         fn($item): bool => is_array($item) && count($item) === 2
89
-                    )->map(function (array $item): ?Place {
89
+                    )->map(function(array $item): ?Place {
90 90
                         try {
91 91
                             return new Place($item[1], $this->tree_service->find($item[0]));
92 92
                         } catch (RuntimeException $ex) {
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function configContent(ModuleInterface $module, Tree $tree): string
108 108
     {
109
-        return view($module->name() . '::mappers/filtered-top-config', [
109
+        return view($module->name().'::mappers/filtered-top-config', [
110 110
             'tree'          =>  $tree,
111 111
             'top_places'    =>  $this->topPlaces()
112 112
         ]);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $top_places = Validator::parsedBody($request)->array('mapper_filt_top_places');
129 129
         $config = ['topPlaces' => []];
130 130
         foreach ($top_places as $top_place_id) {
131
-            $place = Place::find((int) $top_place_id, $tree);
131
+            $place = Place::find((int)$top_place_id, $tree);
132 132
             if (mb_strlen($place->gedcomName()) > 0) {
133 133
                 $config['topPlaces'][] = $place;
134 134
             }
Please login to merge, or discard this patch.