Passed
Push — feature/code-analysis ( 4fe35d...c99b5b )
by Jonathan
11:08 queued 07:29
created
app/Module/GeoDispersion/Views/GeoAnalysisTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function icon(ModuleInterface $module): string
39 39
     {
40
-        return view($module->name() . '::icons/view-table', ['type' => $this->type()]);
40
+        return view($module->name().'::icons/view-table', ['type' => $this->type()]);
41 41
     }
42 42
 
43 43
     /**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function globalTabContent(GeoDispersionModule $module, GeoAnalysisResult $result, array $params): string
67 67
     {
68
-        return view($module->name() . '::geoanalysisview-tab-glb-table', $params + [
68
+        return view($module->name().'::geoanalysisview-tab-glb-table', $params + [
69 69
             'result'    =>  $result
70 70
         ]);
71 71
     }
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
     /**
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     {
251 251
         $user = Auth::check() ? Auth::user() : new DefaultUser();
252 252
 
253
-        return view($this->name() . '::sidebar/title', [
253
+        return view($this->name().'::sidebar/title', [
254 254
             'module_name'   =>  $this->name(),
255 255
             'sosa_numbers'  =>  app(SosaRecordsService::class)->sosaNumbers($individual->tree(), $user, $individual)
256 256
         ]);
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         $sosa_root = Registry::individualFactory()->make($sosa_root_xref, $individual->tree());
267 267
         $user = Auth::check() ? Auth::user() : new DefaultUser();
268 268
 
269
-        return view($this->name() . '::sidebar/content', [
269
+        return view($this->name().'::sidebar/content', [
270 270
             'sosa_ancestor' =>  $individual,
271 271
             'sosa_root'     =>  $sosa_root,
272 272
             'sosa_numbers'  =>  app(SosaRecordsService::class)->sosaNumbers($individual->tree(), $user, $individual)
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     public function listSubscribedHooks(): array
313 313
     {
314 314
         return [
315
-            app()->makeWith(SosaIconHook::class, [ 'module' => $this ])
315
+            app()->makeWith(SosaIconHook::class, ['module' => $this])
316 316
         ];
317 317
     }
318 318
 }
Please login to merge, or discard this patch.
app/Http/Middleware/AuthTreePreference.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         // Permissions are configured
48 48
         if (is_numeric($permission_level)) {
49 49
             // Logged in with the correct role?
50
-            if (Auth::accessLevel($tree, $user) <= (int) $permission_level) {
50
+            if (Auth::accessLevel($tree, $user) <= (int)$permission_level) {
51 51
                     return $handler->handle($request);
52 52
             }
53 53
 
@@ -62,6 +62,6 @@  discard block
 block discarded – undo
62 62
             throw new HttpAccessDeniedException();
63 63
         }
64 64
 
65
-        return redirect(route(LoginPage::class, ['tree' => $tree->name(), 'url' => (string) $request->getUri()]));
65
+        return redirect(route(LoginPage::class, ['tree' => $tree->name(), 'url' => (string)$request->getUri()]));
66 66
     }
67 67
 }
Please login to merge, or discard this patch.
app/Module/Sosa/Http/RequestHandlers/AncestorsListFamily.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,14 +86,14 @@
 block discarded – undo
86 86
         $nb_families_all = $list_families->count();
87 87
 
88 88
         /** @var \Illuminate\Support\Collection<int, \Fisharebest\Webtrees\Family> $list_families */
89
-        $list_families = $list_families->mapWithKeys(function (stdClass $value) use ($tree): ?array {
89
+        $list_families = $list_families->mapWithKeys(function(stdClass $value) use ($tree): ?array {
90 90
                 $fam = Registry::familyFactory()->make($value->f_id, $tree);
91
-                return ($fam !== null && $fam->canShow()) ? [(int) $value->majs_sosa => $fam] : null;
91
+                return ($fam !== null && $fam->canShow()) ? [(int)$value->majs_sosa => $fam] : null;
92 92
         })->filter();
93 93
 
94 94
         $nb_families_shown = $list_families->count();
95 95
 
96
-        return $this->viewResponse($this->module->name() . '::list-ancestors-fam-tab', [
96
+        return $this->viewResponse($this->module->name().'::list-ancestors-fam-tab', [
97 97
             'module_name'       =>  $this->module->name(),
98 98
             'title'             =>  I18N::translate('Sosa Ancestors'),
99 99
             'tree'              =>  $tree,
Please login to merge, or discard this patch.
app/Module/Sosa/Http/RequestHandlers/SosaComputeAction.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             $user = $user_id == -1 ? new DefaultUser() : $this->user_service->find($user_id);
60 60
 
61 61
             /** @var SosaCalculatorService $sosa_calc_service */
62
-            $sosa_calc_service = app()->makeWith(SosaCalculatorService::class, [ 'tree' => $tree, 'user' => $user]);
62
+            $sosa_calc_service = app()->makeWith(SosaCalculatorService::class, ['tree' => $tree, 'user' => $user]);
63 63
 
64 64
             if (
65 65
                 $partial_from !== '' &&
@@ -71,8 +71,7 @@  discard block
 block discarded – undo
71 71
             }
72 72
 
73 73
             return $res ?
74
-                response('', 200) :
75
-                response(
74
+                response('', 200) : response(
76 75
                     I18N::translate('An error occurred while computing Sosa ancestors.'),
77 76
                     StatusCodeInterface::STATUS_INTERNAL_SERVER_ERROR
78 77
                 );
Please login to merge, or discard this patch.
app/Module/Sosa/Http/RequestHandlers/AncestorsListIndividual.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,14 +86,14 @@
 block discarded – undo
86 86
         $nb_ancestors_all = $list_ancestors->count();
87 87
 
88 88
         /** @var \Illuminate\Support\Collection<int, \Fisharebest\Webtrees\Individual> $list_ancestors */
89
-        $list_ancestors = $list_ancestors->mapWithKeys(function (stdClass $value) use ($tree): ?array {
89
+        $list_ancestors = $list_ancestors->mapWithKeys(function(stdClass $value) use ($tree): ?array {
90 90
                 $indi = Registry::individualFactory()->make($value->majs_i_id, $tree);
91
-                return ($indi !== null && $indi->canShowName()) ? [(int) $value->majs_sosa => $indi] : null;
91
+                return ($indi !== null && $indi->canShowName()) ? [(int)$value->majs_sosa => $indi] : null;
92 92
         })->filter();
93 93
 
94 94
         $nb_ancestors_shown = $list_ancestors->count();
95 95
 
96
-        return $this->viewResponse($this->module->name() . '::list-ancestors-indi-tab', [
96
+        return $this->viewResponse($this->module->name().'::list-ancestors-indi-tab', [
97 97
             'module_name'       =>  $this->module->name(),
98 98
             'title'             =>  I18N::translate('Sosa Ancestors'),
99 99
             'tree'              =>  $tree,
Please login to merge, or discard this patch.
app/Module/Sosa/Http/RequestHandlers/SosaComputeModal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 
60 60
         $tree = Validator::attributes($request)->tree();
61 61
 
62
-        return response(view($this->module->name() . '::modals/sosa-compute', [
62
+        return response(view($this->module->name().'::modals/sosa-compute', [
63 63
             'tree'          => $tree,
64 64
             'xref'          => Validator::attributes($request)->isXref()->string('xref', '')
65 65
         ]));
Please login to merge, or discard this patch.
app/Module/Sosa/Http/RequestHandlers/AncestorsList.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
             Validator::attributes($request)->integer('gen', 0)
70 70
         );
71 71
 
72
-        return $this->viewResponse($this->module->name() . '::list-ancestors-page', [
72
+        return $this->viewResponse($this->module->name().'::list-ancestors-page', [
73 73
             'module_name'       =>  $this->module->name(),
74 74
             'title'             =>  I18N::translate('Sosa Ancestors'),
75 75
             'tree'              =>  $tree,
Please login to merge, or discard this patch.
app/Module/Sosa/Http/RequestHandlers/SosaConfig.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,11 +86,10 @@
 block discarded – undo
86 86
         $max_gen_system = app(SosaRecordsService::class)->maxSystemGenerations();
87 87
         foreach ($users_root as $key => $user_root) {
88 88
             $users_root[$key]['max_gen'] = is_numeric($user_root['max_gen']) ?
89
-                (int) $user_root['max_gen'] :
90
-                $max_gen_system;
89
+                (int)$user_root['max_gen'] : $max_gen_system;
91 90
         };
92 91
 
93
-        return $this->viewResponse($this->module->name() . '::config-page', [
92
+        return $this->viewResponse($this->module->name().'::config-page', [
94 93
             'module_name'       =>  $this->module->name(),
95 94
             'title'             =>  I18N::translate('Sosa Configuration'),
96 95
             'tree'              =>  $tree,
Please login to merge, or discard this patch.