Passed
Branch feature/2.1-geodispersion-dev (38d49e)
by Jonathan
04:17
created
src/Webtrees/Common/GeoDispersion/GeoAnalysis/GeoAnalysisResults.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function addCategory(string $description, int $order): void
91 91
     {
92
-        if(!$this->detailed->has($description)) {
92
+        if (!$this->detailed->has($description)) {
93 93
             $this->detailed->put($description, new GeoAnalysisResult($description, $order));
94 94
         }
95 95
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function addPlaceInCreatedCategory(string $category_name, GeoAnalysisPlace $place): void
104 104
     {
105
-        if($this->detailed->has($category_name)) {
105
+        if ($this->detailed->has($category_name)) {
106 106
             $this->detailed->get($category_name)->addPlace($place);
107 107
         }
108 108
     }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public function addPlaceInCategory(string $category_name, int $category_order, GeoAnalysisPlace $place): void
117 117
     {
118
-        if(!$this->detailed->has($category_name)) {
118
+        if (!$this->detailed->has($category_name)) {
119 119
             $this->addCategory($category_name, $category_order);
120 120
         }
121 121
         $this->addPlaceInCreatedCategory($category_name, $place);
Please login to merge, or discard this patch.
src/Webtrees/Common/GeoDispersion/GeoAnalysis/GeoAnalysisPlace.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@
 block discarded – undo
64 64
      */
65 65
     private function extractPlace(?Place $place, int $depth, bool $strict_depth): ?Place
66 66
     {
67
-        if($place === null) return null;
68
-        if(mb_strlen($place->gedcomName()) === 0) return null;
67
+        if ($place === null) return null;
68
+        if (mb_strlen($place->gedcomName()) === 0) return null;
69 69
         $parts = $place->lastParts($depth);
70
-        if($strict_depth && $parts->count() !== $depth) return new Place(self::INVALID_PLACE, $place->tree());
70
+        if ($strict_depth && $parts->count() !== $depth) return new Place(self::INVALID_PLACE, $place->tree());
71 71
         return new Place($parts->implode(', '), $place->tree());
72 72
     }
73 73
     
Please login to merge, or discard this patch.
src/Webtrees/Common/GeoDispersion/Maps/SimpleFilesystemMap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,11 +74,11 @@
 block discarded – undo
74 74
         $reader = new GeoJSONReader();
75 75
         try {
76 76
             $feature_collection = $reader->read($this->filesystem->read($this->path));
77
-            if($feature_collection instanceof FeatureCollection) {
77
+            if ($feature_collection instanceof FeatureCollection) {
78 78
                 return $feature_collection->getFeatures();
79 79
             }
80 80
         }
81
-        catch(Throwable $ex) { }
81
+        catch (Throwable $ex) { }
82 82
         return [];
83 83
     }
84 84
     
Please login to merge, or discard this patch.
src/Webtrees/Common/GeoDispersion/Config/GenericPlaceMapperConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,10 +91,10 @@
 block discarded – undo
91 91
      */
92 92
     public function jsonDeserialize($config): self
93 93
     {
94
-        if(is_string($config)) {
94
+        if (is_string($config)) {
95 95
             return $this->jsonDeserialize(json_decode($config));
96 96
         }
97
-        if(is_array($config)) {
97
+        if (is_array($config)) {
98 98
             return $this->setConfig($config);
99 99
         }
100 100
         return $this;
Please login to merge, or discard this patch.
src/Webtrees/Common/GeoDispersion/Config/MapColorsConfig.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@
 block discarded – undo
64 64
     public function jsonSerialize()
65 65
     {
66 66
         return [
67
-            'default'   => (string) $this->defaultColor()->toHex(),
68
-            'stroke'    => (string) $this->strokeColor()->toHex(),
69
-            'maxvalue'  => (string) $this->maxValueColor()->toHex(),
70
-            'hover'     => (string) $this->hoverColor()->toHex(),
67
+            'default'   => (string)$this->defaultColor()->toHex(),
68
+            'stroke'    => (string)$this->strokeColor()->toHex(),
69
+            'maxvalue'  => (string)$this->maxValueColor()->toHex(),
70
+            'hover'     => (string)$this->hoverColor()->toHex(),
71 71
         ];
72 72
     }
73 73
 
Please login to merge, or discard this patch.
src/Webtrees/Module/WelcomeBlock/WelcomeBlockModule.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function loadRoutes(Map $router): void
63 63
     {
64
-        $router->attach('', '', static function (Map $router): void {
64
+        $router->attach('', '', static function(Map $router): void {
65 65
 
66
-            $router->attach('', '/module-maj/welcomeblock/{block_id}', static function (Map $router): void {
66
+            $router->attach('', '/module-maj/welcomeblock/{block_id}', static function(Map $router): void {
67 67
                 $router->tokens(['block_id' => '\d+']);
68 68
                 $router->get(MatomoStats::class, '/matomostats', MatomoStats::class);
69 69
             });
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $fab_login_block_view = app(\Fisharebest\Webtrees\Module\LoginBlockModule::class)
92 92
             ->getBlock($tree, $block_id, ModuleBlockInterface::CONTEXT_EMBED);
93 93
 
94
-        $content = view($this->name() . '::block-embed', [
94
+        $content = view($this->name().'::block-embed', [
95 95
             'block_id'                  =>  $block_id,
96 96
             'fab_welcome_block_view'    =>  $fab_welcome_block_view,
97 97
             'fab_login_block_view'      =>  $fab_login_block_view,
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function editBlockConfiguration(Tree $tree, int $block_id): string
129 129
     {
130
-        return view($this->name() . '::config', $this->matomoSettings($block_id));
130
+        return view($this->name().'::config', $this->matomoSettings($block_id));
131 131
     }
132 132
 
133 133
     /**
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public function saveBlockConfiguration(ServerRequestInterface $request, int $block_id): void
138 138
     {
139
-        $params = (array) $request->getParsedBody();
139
+        $params = (array)$request->getParsedBody();
140 140
 
141 141
         $matomo_enabled = $params['matomo_enabled'] == 'yes';
142 142
         $this->setBlockSetting($block_id, 'matomo_enabled', $matomo_enabled ? 'yes' : 'no');
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             ->setBlockSetting($block_id, 'matomo_token', trim($params['matomo_token']))
160 160
             ->setBlockSetting($block_id, 'matomo_siteid', $params['matomo_siteid']);
161 161
 
162
-        Registry::cache()->file()->forget($this->name() . '-matomovisits-yearly-' . $block_id);
162
+        Registry::cache()->file()->forget($this->name().'-matomovisits-yearly-'.$block_id);
163 163
     }
164 164
 
165 165
     /**
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             'matomo_enabled' => $this->isMatomoEnabled($block_id),
186 186
             'matomo_url' => $this->getBlockSetting($block_id, 'matomo_url'),
187 187
             'matomo_token' => $this->getBlockSetting($block_id, 'matomo_token'),
188
-            'matomo_siteid'  => (int) $this->getBlockSetting($block_id, 'matomo_siteid', '0')
188
+            'matomo_siteid'  => (int)$this->getBlockSetting($block_id, 'matomo_siteid', '0')
189 189
         ];
190 190
     }
191 191
 }
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/SosaModule.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     // How to update the database schema for this module
71 71
     private const SCHEMA_TARGET_VERSION   = 3;
72 72
     private const SCHEMA_SETTING_NAME     = 'MAJ_SOSA_SCHEMA_VERSION';
73
-    private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__ . '\Schema';
73
+    private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__.'\Schema';
74 74
 /**
75 75
      * {@inheritDoc}
76 76
      * @see \Fisharebest\Webtrees\Module\AbstractModule::title()
@@ -110,25 +110,25 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public function loadRoutes(Map $router): void
112 112
     {
113
-        $router->attach('', '', static function (Map $router): void {
113
+        $router->attach('', '', static function(Map $router): void {
114 114
 
115
-            $router->attach('', '/module-maj/sosa', static function (Map $router): void {
115
+            $router->attach('', '/module-maj/sosa', static function(Map $router): void {
116 116
 
117
-                $router->attach('', '/list', static function (Map $router): void {
117
+                $router->attach('', '/list', static function(Map $router): void {
118 118
                     $router->tokens(['gen' => '\d+']);
119 119
                     $router->get(AncestorsList::class, '/ancestors/{tree}{/gen}', AncestorsList::class);
120
-                    $router->get(AncestorsListIndividual::class, '/ancestors/{tree}/{gen}/tab/individuals', AncestorsListIndividual::class);    //phpcs:ignore Generic.Files.LineLength.TooLong
121
-                    $router->get(AncestorsListFamily::class, '/ancestors/{tree}/{gen}/tab/families', AncestorsListFamily::class);   //phpcs:ignore Generic.Files.LineLength.TooLong
120
+                    $router->get(AncestorsListIndividual::class, '/ancestors/{tree}/{gen}/tab/individuals', AncestorsListIndividual::class); //phpcs:ignore Generic.Files.LineLength.TooLong
121
+                    $router->get(AncestorsListFamily::class, '/ancestors/{tree}/{gen}/tab/families', AncestorsListFamily::class); //phpcs:ignore Generic.Files.LineLength.TooLong
122 122
                     $router->get(MissingAncestorsList::class, '/missing/{tree}{/gen}', MissingAncestorsList::class);
123 123
                 });
124 124
 
125
-                $router->attach('', '/statistics/{tree}', static function (Map $router): void {
125
+                $router->attach('', '/statistics/{tree}', static function(Map $router): void {
126 126
 
127 127
                     $router->get(SosaStatistics::class, '', SosaStatistics::class);
128 128
                     $router->get(PedigreeCollapseData::class, '/pedigreecollapse', PedigreeCollapseData::class);
129 129
                 });
130 130
 
131
-                $router->attach('', '/config/{tree}', static function (Map $router): void {
131
+                $router->attach('', '/config/{tree}', static function(Map $router): void {
132 132
 
133 133
                     $router->get(SosaConfig::class, '', SosaConfig::class);
134 134
                     $router->post(SosaConfigAction::class, '', SosaConfigAction::class);
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
      */
228 228
     public function headContent(): string
229 229
     {
230
-        return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">';
230
+        return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">';
231 231
     }
232 232
 
233 233
     /**
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function bodyContent(): string
238 238
     {
239
-        return '<script src="' . $this->assetUrl('js/sosa.min.js') . '"></script>';
239
+        return '<script src="'.$this->assetUrl('js/sosa.min.js').'"></script>';
240 240
     }
241 241
 
242 242
     /**
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
         $individual = Registry::individualFactory()->make($xref, $tree);
254 254
 
255
-        return view($this->name() . '::sidebar/title', [
255
+        return view($this->name().'::sidebar/title', [
256 256
             'module_name'   =>  $this->name(),
257 257
             'sosa_numbers'  =>  app(SosaRecordsService::class)->sosaNumbers($tree, $user, $individual)
258 258
         ]);
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         $sosa_root = Registry::individualFactory()->make($sosa_root_xref, $individual->tree());
269 269
         $user = Auth::check() ? Auth::user() : new DefaultUser();
270 270
 
271
-        return view($this->name() . '::sidebar/content', [
271
+        return view($this->name().'::sidebar/content', [
272 272
             'sosa_ancestor' =>  $individual,
273 273
             'sosa_root'     =>  $sosa_root,
274 274
             'sosa_numbers'  =>  app(SosaRecordsService::class)->sosaNumbers($individual->tree(), $user, $individual)
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/GeoDispersionModule.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     // How to update the database schema for this module
76 76
     private const SCHEMA_TARGET_VERSION   = 2;
77 77
     private const SCHEMA_SETTING_NAME     = 'MAJ_GEODISP_SCHEMA_VERSION';
78
-    private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__ . '\Schema';
78
+    private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__.'\Schema';
79 79
 
80 80
     /**
81 81
      * {@inheritDoc}
@@ -125,13 +125,13 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function loadRoutes(Map $router): void
127 127
     {
128
-        $router->attach('', '', static function (Map $router): void {
128
+        $router->attach('', '', static function(Map $router): void {
129 129
 
130
-            $router->attach('', '/module-maj/geodispersion', static function (Map $router): void {
131
-                $router->attach('', '/admin', static function (Map $router): void {
130
+            $router->attach('', '/module-maj/geodispersion', static function(Map $router): void {
131
+                $router->attach('', '/admin', static function(Map $router): void {
132 132
                     $router->get(AdminConfigPage::class, '/config{/tree}', AdminConfigPage::class);
133 133
 
134
-                    $router->attach('', '/analysis-views/{tree}', static function (Map $router): void {
134
+                    $router->attach('', '/analysis-views/{tree}', static function(Map $router): void {
135 135
                         $router->tokens(['view_id' => '\d+', 'enable' => '[01]']);
136 136
                         $router->extras([
137 137
                             'middleware' => [
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
                         //phpcs:enable
151 151
                     });
152 152
 
153
-                    $router->attach('', '/map-adapters/{tree}', static function (Map $router): void {
153
+                    $router->attach('', '/map-adapters/{tree}', static function(Map $router): void {
154 154
                         $router->tokens(['adapter_id' => '\d+', 'view_id' => '\d+']);
155 155
                         $router->extras([
156 156
                             'middleware' => [
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 
175 175
                 $router->get(GeoAnalysisViewsList::class, '/list/{tree}', GeoAnalysisViewsList::class);
176 176
 
177
-                $router->attach('', '/analysisview/{tree}/{view_id}', static function (Map $router): void {
177
+                $router->attach('', '/analysisview/{tree}/{view_id}', static function(Map $router): void {
178 178
                     $router->tokens(['view_id' => '\d+']);
179 179
                     $router->get(GeoAnalysisViewPage::class, '', GeoAnalysisViewPage::class);
180 180
                     $router->get(GeoAnalysisViewTabs::class, '/tabs', GeoAnalysisViewTabs::class);
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public function headContent(): string
214 214
     {
215
-        return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">';
215
+        return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">';
216 216
     }
217 217
 
218 218
     /**
Please login to merge, or discard this patch.
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.