Passed
Push — main ( f9aaf7...4197a4 )
by Jonathan
14:34
created
app/Module/PatronymicLineage/PatronymicLineageModule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@  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/lineages', static function (Map $router): void {
66
+            $router->attach('', '/module-maj/lineages', static function(Map $router): void {
67 67
 
68
-                $router->attach('', '/Page', static function (Map $router): void {
68
+                $router->attach('', '/Page', static function(Map $router): void {
69 69
 
70 70
                     $router->get(SurnamesList::class, '/{tree}/list{/alpha}', SurnamesList::class);
71 71
                     $router->get(LineagesPage::class, '/{tree}/lineage/{surname}', LineagesPage::class);
@@ -122,6 +122,6 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function headContent(): string
124 124
     {
125
-        return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">';
125
+        return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">';
126 126
     }
127 127
 }
Please login to merge, or discard this patch.
app/Module/PatronymicLineage/Http/RequestHandlers/LineagesPage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,16 +75,16 @@
 block discarded – undo
75 75
 
76 76
         $initial = mb_substr($surname, 0, 1);
77 77
         $initials_list = collect($this->indilist_module->surnameAlpha($tree, false, false, I18N::locale()))
78
-            ->reject(function (int $count, string $initial): bool {
78
+            ->reject(function(int $count, string $initial): bool {
79 79
 
80 80
                 return $initial === '@' || $initial === ',';
81 81
             });
82 82
 
83
-        $title = I18N::translate('Patronymic Lineages') . ' — ' . $surname;
83
+        $title = I18N::translate('Patronymic Lineages').' — '.$surname;
84 84
 
85 85
         $lineages = app()->make(LineageBuilder::class, ['surname' => $surname])->buildLineages();
86 86
 
87
-        return $this->viewResponse($this->module->name() . '::lineages-page', [
87
+        return $this->viewResponse($this->module->name().'::lineages-page', [
88 88
             'title'         =>  $title,
89 89
             'module'        =>  $this->module,
90 90
             'tree'          =>  $tree,
Please login to merge, or discard this patch.
app/Module/PatronymicLineage/Http/RequestHandlers/SurnamesList.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
         $initial = $request->getAttribute('alpha');
74 74
         $initials_list = collect($this->indilist_module->surnameAlpha($tree, false, false, I18N::locale()))
75
-            ->reject(function (int $count, string $initial): bool {
75
+            ->reject(function(int $count, string $initial): bool {
76 76
 
77 77
                 return $initial === '@' || $initial === ',';
78 78
             });
@@ -80,17 +80,17 @@  discard block
 block discarded – undo
80 80
         $show_all = $request->getQueryParams()['show_all'] ?? 'no';
81 81
 
82 82
         if ($show_all === 'yes') {
83
-            $title = I18N::translate('Patronymic Lineages') . ' — ' . I18N::translate('All');
83
+            $title = I18N::translate('Patronymic Lineages').' — '.I18N::translate('All');
84 84
             $surnames = $this->indilist_module->surnames($tree, '', '', false, false, I18N::locale());
85 85
         } elseif ($initial !== null && mb_strlen($initial) == 1) {
86
-            $title = I18N::translate('Patronymic Lineages') . ' — ' . $initial;
86
+            $title = I18N::translate('Patronymic Lineages').' — '.$initial;
87 87
             $surnames = $this->indilist_module->surnames($tree, '', $initial, false, false, I18N::locale());
88 88
         } else {
89
-            $title =  I18N::translate('Patronymic Lineages');
89
+            $title = I18N::translate('Patronymic Lineages');
90 90
             $surnames = [];
91 91
         }
92 92
 
93
-        return $this->viewResponse($this->module->name() . '::surnames-page', [
93
+        return $this->viewResponse($this->module->name().'::surnames-page', [
94 94
             'title'         =>  $title,
95 95
             'module'        =>  $this->module,
96 96
             'tree'          =>  $tree,
Please login to merge, or discard this patch.
app/Module/PatronymicLineage/Model/LineageNode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function addFamily(Family $fams): object
69 69
     {
70 70
         if (!$this->linked_fams->has($fams->xref())) {
71
-            $this->linked_fams->put($fams->xref(), (object) [
71
+            $this->linked_fams->put($fams->xref(), (object)[
72 72
                 'family'   =>  $fams,
73 73
                 'children' =>  new Collection()
74 74
             ]);
@@ -135,6 +135,6 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function hasFollowUpSurname(): bool
137 137
     {
138
-        return mb_strlen($this->followUpSurname()) > 0 ;
138
+        return mb_strlen($this->followUpSurname()) > 0;
139 139
     }
140 140
 }
Please login to merge, or discard this patch.
app/Module/PatronymicLineage/Model/LineageBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
             }
108 108
         }
109 109
       
110
-        return $root_lineages->sort(function (LineageRootNode $a, LineageRootNode $b) {
110
+        return $root_lineages->sort(function(LineageRootNode $a, LineageRootNode $b) {
111 111
 
112 112
             if ($a->numberChildNodes() == $b->numberChildNodes()) {
113 113
                 return 0;
Please login to merge, or discard this patch.
app/Module/WelcomeBlock/Http/RequestHandlers/MatomoStats.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,12 +81,12 @@
 block discarded – undo
81 81
             }
82 82
         } catch (Throwable $ex) {
83 83
             return $this->viewResponse('errors/unhandled-exception', [
84
-                'error' => I18N::translate('Error while retrieving Matomo statistics: ') .
84
+                'error' => I18N::translate('Error while retrieving Matomo statistics: ').
85 85
                     (Auth::isAdmin() ? $ex->getMessage() : I18N::translate('Log in as admin for error details'))
86 86
             ], StatusCodeInterface::STATUS_INTERNAL_SERVER_ERROR);
87 87
         }
88 88
 
89
-        return $this->viewResponse($this->module->name() . '::matomo-stats', [
89
+        return $this->viewResponse($this->module->name().'::matomo-stats', [
90 90
             'visits_year'   =>  $nb_visits_year,
91 91
             'visits_today'  =>  $nb_visits_today
92 92
         ]);
Please login to merge, or discard this patch.
app/Module/WelcomeBlock/Services/MatomoStatsService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
     public function visitsThisYear(WelcomeBlockModule $module, int $block_id): ?int
41 41
     {
42 42
         return Registry::cache()->file()->remember(
43
-            $module->name() . '-matomovisits-yearly-' . $block_id,
44
-            function () use ($module, $block_id): ?int {
43
+            $module->name().'-matomovisits-yearly-'.$block_id,
44
+            function() use ($module, $block_id) : ?int {
45 45
                 $visits_year = $this->visits($module, $block_id, 'year');
46 46
                 if ($visits_year === null) {
47 47
                     return null;
48 48
                 }
49
-                $visits_today = (int) $this->visits($module, $block_id, 'day');
49
+                $visits_today = (int)$this->visits($module, $block_id, 'day');
50 50
 
51 51
                 return $visits_year - $visits_today;
52 52
             },
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
     public function visitsToday(WelcomeBlockModule $module, int $block_id): ?int
65 65
     {
66 66
         return Registry::cache()->array()->remember(
67
-            $module->name() . '-matomovisits-daily-' . $block_id,
68
-            function () use ($module, $block_id): ?int {
67
+            $module->name().'-matomovisits-daily-'.$block_id,
68
+            function() use ($module, $block_id) : ?int {
69 69
                 return $this->visits($module, $block_id, 'day');
70 70
             }
71 71
         );
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                 ]);
108 108
 
109 109
                 if ($response->getStatusCode() === StatusCodeInterface::STATUS_OK) {
110
-                    $result = json_decode((string) $response->getBody(), true)['value'] ?? null;
110
+                    $result = json_decode((string)$response->getBody(), true)['value'] ?? null;
111 111
                     if ($result !== null) {
112 112
                         return (int)$result;
113 113
                     }
Please login to merge, or discard this patch.
app/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.
app/Module/IsSourced/Hooks/IsSourcedStatusHook.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,21 +66,21 @@
 block discarded – undo
66 66
     {
67 67
         if ($use_long && $record instanceof Individual) {
68 68
             return
69
-                view($this->module()->name() . '::icons/source-status', [
69
+                view($this->module()->name().'::icons/source-status', [
70 70
                     'module_name' => $this->module()->name(),
71 71
                     'source_status' => $this->source_status_service->sourceStatusForRecord($record),
72 72
                     'context'  => 'INDI',
73
-                    'size_style' => $size ]) .
74
-                view($this->module()->name() . '::icons/source-status', [
73
+                    'size_style' => $size]).
74
+                view($this->module()->name().'::icons/source-status', [
75 75
                     'module_name' => $this->module()->name(),
76 76
                     'source_status' => $this->source_status_service->sourceStatusForBirth($record),
77 77
                     'context'  => 'INDI:BIRT',
78
-                    'size_style' => $size ]) .
79
-                ($record->isDead() ? view($this->module()->name() . '::icons/source-status', [
78
+                    'size_style' => $size]).
79
+                ($record->isDead() ? view($this->module()->name().'::icons/source-status', [
80 80
                     'module_name' => $this->module()->name(),
81 81
                     'source_status' => $this->source_status_service->sourceStatusForDeath($record),
82 82
                     'context'  => 'INDI:DEAT',
83
-                    'size_style' => $size ]) : '') ;
83
+                    'size_style' => $size]) : '');
84 84
         }
85 85
         return '';
86 86
     }
Please login to merge, or discard this patch.