Passed
Branch main (f9aaf7)
by Jonathan
14:43
created
app/Module/Hooks/Services/HookService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function all(bool $include_disabled = false): Collection
76 76
     {
77
-        return Registry::cache()->array()->remember('all-hooks', function () use ($include_disabled): Collection {
77
+        return Registry::cache()->array()->remember('all-hooks', function() use ($include_disabled): Collection {
78 78
             $hooks_info = DB::table('maj_hook_order')
79 79
                 ->get()
80 80
                 ->groupBy(['majho_hook_name', 'majho_module_name']);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                     ) as $hook_instance
105 105
                 ) {
106 106
                     $hook_module_info = $hook_info->get($hook_instance->module()->name(), collect())->first();
107
-                    $hook_order = $hook_module_info instanceof stdClass ? (int) $hook_module_info->majho_hook_order : 0;
107
+                    $hook_order = $hook_module_info instanceof stdClass ? (int)$hook_module_info->majho_hook_order : 0;
108 108
                     $hook_collector->register($hook_instance, $hook_order);
109 109
                 }
110 110
             }
Please login to merge, or discard this patch.
app/Module/MiscExtensions/Hooks/TitlesCardHook.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,10 +57,9 @@
 block discarded – undo
57 57
             return '';
58 58
         }
59 59
 
60
-        $titles = $this->individualTitles($individual, '/(.*?) ((' . $title_separator .  ')(.*))/i');
60
+        $titles = $this->individualTitles($individual, '/(.*?) (('.$title_separator.')(.*))/i');
61 61
 
62
-        return count($titles) === 0 ? '' :
63
-            view($this->module()->name() . '::components/card-titles', [ 'titles' => $titles ]);
62
+        return count($titles) === 0 ? '' : view($this->module()->name().'::components/card-titles', ['titles' => $titles]);
64 63
     }
65 64
 
66 65
     /**
Please login to merge, or discard this patch.
app/Module/MiscExtensions/Http/RequestHandlers/AdminConfigAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
             return redirect(route(AdminConfigPage::class));
54 54
         }
55 55
 
56
-        $params = (array) $request->getParsedBody();
56
+        $params = (array)$request->getParsedBody();
57 57
 
58 58
         $this->module->setPreference('MAJ_TITLE_PREFIX', $params['MAJ_TITLE_PREFIX'] ?? '');
59 59
         $this->module->setPreference('MAJ_DISPLAY_CNIL', $params['MAJ_DISPLAY_CNIL'] ?? '');
Please login to merge, or discard this patch.
app/Module/MiscExtensions/Http/RequestHandlers/AdminConfigPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
             throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
55 55
         }
56 56
 
57
-        return $this->viewResponse($this->module->name() . '::admin/config', [
57
+        return $this->viewResponse($this->module->name().'::admin/config', [
58 58
             'module'    =>  $this->module,
59 59
             'title'     =>  $this->module->title()
60 60
         ]);
Please login to merge, or discard this patch.
app/Module/MiscExtensions/MiscExtensionsModule.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function boot(): void
68 68
     {
69 69
         $this->traitBoot();
70
-        View::registerCustomView('::modules/privacy-policy/page', $this->name() . '::privacy-policy');
70
+        View::registerCustomView('::modules/privacy-policy/page', $this->name().'::privacy-policy');
71 71
     }
72 72
 
73 73
     /**
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function loadRoutes(Map $router): void
78 78
     {
79
-        $router->attach('', '', static function (Map $router): void {
79
+        $router->attach('', '', static function(Map $router): void {
80 80
 
81
-            $router->attach('', '/module-maj/misc', static function (Map $router): void {
81
+            $router->attach('', '/module-maj/misc', static function(Map $router): void {
82 82
 
83
-                $router->attach('', '/config/admin', static function (Map $router): void {
83
+                $router->attach('', '/config/admin', static function(Map $router): void {
84 84
 
85 85
                     $router->get(AdminConfigPage::class, '', AdminConfigPage::class);
86 86
                     $router->post(AdminConfigAction::class, '', AdminConfigAction::class);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     public function listSubscribedHooks(): array
115 115
     {
116 116
         return [
117
-            app()->makeWith(TitlesCardHook::class, [ 'module' => $this ])
117
+            app()->makeWith(TitlesCardHook::class, ['module' => $this])
118 118
         ];
119 119
     }
120 120
 }
Please login to merge, or discard this patch.
app/Module/ModuleMyArtJaubTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function boot(): void
35 35
     {
36
-        View::registerNamespace($this->name(), $this->resourcesFolder() . 'views/');
36
+        View::registerNamespace($this->name(), $this->resourcesFolder().'views/');
37 37
 
38 38
         $this->loadRoutes(app(RouterContainer::class)->getMap());
39 39
     }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function resourcesFolder(): string
45 45
     {
46
-        return Webtrees::MODULES_DIR . trim($this->name(), '_') . '/resources/';
46
+        return Webtrees::MODULES_DIR.trim($this->name(), '_').'/resources/';
47 47
     }
48 48
 
49 49
     /**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function customTranslations(string $language): array
71 71
     {
72
-        $translation_file = $this->resourcesFolder() . 'lang/' . $language . '/messages.php';
72
+        $translation_file = $this->resourcesFolder().'lang/'.$language.'/messages.php';
73 73
 
74 74
         try {
75 75
             $translation  = new Translation($translation_file);
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
     {
95 95
         /** @var ModuleThemeInterface $theme */
96 96
         $theme = app(ModuleThemeInterface::class);
97
-        $css_file = $this->resourcesFolder() . 'css/' . $theme->name() . '.min.css';
97
+        $css_file = $this->resourcesFolder().'css/'.$theme->name().'.min.css';
98 98
 
99 99
         if (file_exists($css_file)) {
100
-            return $this->assetUrl('css/' . $theme->name() . '.min.css');
100
+            return $this->assetUrl('css/'.$theme->name().'.min.css');
101 101
         } else {
102 102
             return $this->assetUrl('css/default.min.css');
103 103
         }
Please login to merge, or discard this patch.
app/Module/Sosa/SosaModule.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     // How to update the database schema for this module
74 74
     private const SCHEMA_TARGET_VERSION   = 3;
75 75
     private const SCHEMA_SETTING_NAME     = 'MAJ_SOSA_SCHEMA_VERSION';
76
-    private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__ . '\Schema';
76
+    private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__.'\Schema';
77 77
 /**
78 78
      * {@inheritDoc}
79 79
      * @see \Fisharebest\Webtrees\Module\AbstractModule::title()
@@ -113,25 +113,25 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function loadRoutes(Map $router): void
115 115
     {
116
-        $router->attach('', '', static function (Map $router): void {
116
+        $router->attach('', '', static function(Map $router): void {
117 117
 
118
-            $router->attach('', '/module-maj/sosa', static function (Map $router): void {
118
+            $router->attach('', '/module-maj/sosa', static function(Map $router): void {
119 119
 
120
-                $router->attach('', '/list', static function (Map $router): void {
120
+                $router->attach('', '/list', static function(Map $router): void {
121 121
                     $router->tokens(['gen' => '\d+']);
122 122
                     $router->get(AncestorsList::class, '/ancestors/{tree}{/gen}', AncestorsList::class);
123
-                    $router->get(AncestorsListIndividual::class, '/ancestors/{tree}/{gen}/tab/individuals', AncestorsListIndividual::class);    //phpcs:ignore Generic.Files.LineLength.TooLong
124
-                    $router->get(AncestorsListFamily::class, '/ancestors/{tree}/{gen}/tab/families', AncestorsListFamily::class);   //phpcs:ignore Generic.Files.LineLength.TooLong
123
+                    $router->get(AncestorsListIndividual::class, '/ancestors/{tree}/{gen}/tab/individuals', AncestorsListIndividual::class); //phpcs:ignore Generic.Files.LineLength.TooLong
124
+                    $router->get(AncestorsListFamily::class, '/ancestors/{tree}/{gen}/tab/families', AncestorsListFamily::class); //phpcs:ignore Generic.Files.LineLength.TooLong
125 125
                     $router->get(MissingAncestorsList::class, '/missing/{tree}{/gen}', MissingAncestorsList::class);
126 126
                 });
127 127
 
128
-                $router->attach('', '/statistics/{tree}', static function (Map $router): void {
128
+                $router->attach('', '/statistics/{tree}', static function(Map $router): void {
129 129
 
130 130
                     $router->get(SosaStatistics::class, '', SosaStatistics::class);
131 131
                     $router->get(PedigreeCollapseData::class, '/pedigreecollapse', PedigreeCollapseData::class);
132 132
                 });
133 133
 
134
-                $router->attach('', '/config/{tree}', static function (Map $router): void {
134
+                $router->attach('', '/config/{tree}', static function(Map $router): void {
135 135
 
136 136
                     $router->get(SosaConfig::class, '', SosaConfig::class);
137 137
                     $router->post(SosaConfigAction::class, '', SosaConfigAction::class);
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      */
231 231
     public function headContent(): string
232 232
     {
233
-        return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">';
233
+        return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">';
234 234
     }
235 235
 
236 236
     /**
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      */
240 240
     public function bodyContent(): string
241 241
     {
242
-        return '<script src="' . $this->assetUrl('js/sosa.min.js') . '"></script>';
242
+        return '<script src="'.$this->assetUrl('js/sosa.min.js').'"></script>';
243 243
     }
244 244
 
245 245
     /**
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
         $individual = Registry::individualFactory()->make($xref, $tree);
257 257
 
258
-        return view($this->name() . '::sidebar/title', [
258
+        return view($this->name().'::sidebar/title', [
259 259
             'module_name'   =>  $this->name(),
260 260
             'sosa_numbers'  =>  app(SosaRecordsService::class)->sosaNumbers($tree, $user, $individual)
261 261
         ]);
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         $sosa_root = Registry::individualFactory()->make($sosa_root_xref, $individual->tree());
272 272
         $user = Auth::check() ? Auth::user() : new DefaultUser();
273 273
 
274
-        return view($this->name() . '::sidebar/content', [
274
+        return view($this->name().'::sidebar/content', [
275 275
             'sosa_ancestor' =>  $individual,
276 276
             'sosa_root'     =>  $sosa_root,
277 277
             'sosa_numbers'  =>  app(SosaRecordsService::class)->sosaNumbers($individual->tree(), $user, $individual)
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     public function listSubscribedHooks(): array
318 318
     {
319 319
         return [
320
-            app()->makeWith(SosaIconHook::class, [ 'module' => $this ])
320
+            app()->makeWith(SosaIconHook::class, ['module' => $this])
321 321
         ];
322 322
     }
323 323
 }
Please login to merge, or discard this patch.
app/Module/Sosa/Hooks/SosaIconHook.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
             $record instanceof Individual &&
70 70
             $this->sosa_records_service->isSosa($record->tree(), Auth::user(), $record)
71 71
         ) {
72
-            return view($this->module->name() . '::icons/sosa', [ 'size_style' => $size ]);
72
+            return view($this->module->name().'::icons/sosa', ['size_style' => $size]);
73 73
         }
74 74
         return '';
75 75
     }
Please login to merge, or discard this patch.
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.