Passed
Branch feature/2.1-geodispersion-dev (38d49e)
by Jonathan
04:17
created
src/Webtrees/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.
src/Webtrees/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.
src/Webtrees/Module/IsSourced/IsSourcedModule.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function headContent(): string
73 73
     {
74
-        return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">';
74
+        return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">';
75 75
     }
76 76
 
77 77
     /**
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function bodyContent(): string
82 82
     {
83
-        return '<script src="' . $this->assetUrl('js/issourced.min.js') . '"></script>';
83
+        return '<script src="'.$this->assetUrl('js/issourced.min.js').'"></script>';
84 84
     }
85 85
 
86 86
     /**
@@ -102,14 +102,14 @@  discard block
 block discarded – undo
102 102
         $source_status_service = app(SourceStatusService::class);
103 103
 
104 104
         $spouse_families_status = $individual->spouseFamilies()->map(
105
-            function (Family $sfamily) use ($source_status_service): array {
106
-                return [ $sfamily, $source_status_service->sourceStatusForMarriage($sfamily)];
105
+            function(Family $sfamily) use ($source_status_service): array {
106
+                return [$sfamily, $source_status_service->sourceStatusForMarriage($sfamily)];
107 107
             }
108
-        )->filter(function (array $item): bool {
108
+        )->filter(function(array $item): bool {
109 109
             return $item[1]->isSet();
110 110
         });
111 111
 
112
-        return view($this->name() . '::sidebar/content', [
112
+        return view($this->name().'::sidebar/content', [
113 113
             'module_name'               => $this->name(),
114 114
             'individual'                =>  $individual,
115 115
             'source_status_individual'  =>  $source_status_service->sourceStatusForRecord($individual),
Please login to merge, or discard this patch.
src/Webtrees/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.
src/Webtrees/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.
src/Webtrees/Module/Certificates/CertificatesModule.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -99,16 +99,16 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function loadRoutes($router): void
101 101
     {
102
-        $router->attach('', '', static function (Map $router): void {
102
+        $router->attach('', '', static function(Map $router): void {
103 103
 
104
-            $router->attach('', '/module-maj/certificates', static function (Map $router): void {
104
+            $router->attach('', '/module-maj/certificates', static function(Map $router): void {
105 105
 
106
-                $router->attach('', '/admin', static function (Map $router): void {
106
+                $router->attach('', '/admin', static function(Map $router): void {
107 107
 
108 108
                     $router->get(AdminTreesPage::class, '/trees', AdminTreesPage::class)
109
-                        ->extras(['middleware' => [ AuthAdministrator::class ]]);
109
+                        ->extras(['middleware' => [AuthAdministrator::class]]);
110 110
 
111
-                    $router->attach('', '/config/{tree}', static function (Map $router): void {
111
+                    $router->attach('', '/config/{tree}', static function(Map $router): void {
112 112
 
113 113
                         $router->extras([
114 114
                             'middleware' => [
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                         'permission_preference' =>  'MAJ_CERTIF_SHOW_CERT'
127 127
                     ]);
128 128
 
129
-                $router->attach('', '/certificate/{tree}/{cid}', static function (Map $router): void {
129
+                $router->attach('', '/certificate/{tree}/{cid}', static function(Map $router): void {
130 130
 
131 131
                     $router->extras([
132 132
                         'middleware'            =>  [AuthTreePreference::class],
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      */
165 165
     public function headContent(): string
166 166
     {
167
-        return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">';
167
+        return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">';
168 168
     }
169 169
 
170 170
     /**
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      */
174 174
     public function listUrl(Tree $tree, array $parameters = []): string
175 175
     {
176
-        return route(CertificatesList::class, ['tree' => $tree->name() ] + $parameters);
176
+        return route(CertificatesList::class, ['tree' => $tree->name()] + $parameters);
177 177
     }
178 178
 
179 179
     /**
@@ -191,6 +191,6 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function listIsEmpty(Tree $tree): bool
193 193
     {
194
-        return Auth::accessLevel($tree) > (int) $tree->getPreference('MAJ_CERTIF_SHOW_CERT', (string) Auth::PRIV_HIDE);
194
+        return Auth::accessLevel($tree) > (int)$tree->getPreference('MAJ_CERTIF_SHOW_CERT', (string)Auth::PRIV_HIDE);
195 195
     }
196 196
 }
Please login to merge, or discard this patch.
src/Webtrees/Module/Certificates/Model/Certificate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -202,11 +202,11 @@
 block discarded – undo
202 202
     {
203 203
         $sort_prefix = '';
204 204
         if (preg_match_all('/\b([A-Z]{3,})\b/', $this->description(), $matches, PREG_SET_ORDER) >= 1) {
205
-            $sort_prefix = implode('_', array_map(function ($match) {
205
+            $sort_prefix = implode('_', array_map(function($match) {
206 206
                 return $match[1];
207
-            }, $matches)) . '_';
207
+            }, $matches)).'_';
208 208
         }
209
-        return $sort_prefix . $this->description();
209
+        return $sort_prefix.$this->description();
210 210
     }
211 211
 
212 212
     /**
Please login to merge, or discard this patch.
src/Webtrees/Module/Certificates/Model/Watermark.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,6 +125,6 @@
 block discarded – undo
125 125
      */
126 126
     private function stringLengthEstimate(int $text_length, int $font_size): int
127 127
     {
128
-        return $text_length * (int) ceil(($font_size + 2) * 0.5);
128
+        return $text_length * (int)ceil(($font_size + 2) * 0.5);
129 129
     }
130 130
 }
Please login to merge, or discard this patch.
src/Webtrees/Module/Certificates/Http/RequestHandlers/CertificatesList.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
 
80 80
         $title = I18N::translate('Certificates');
81 81
 
82
-        $cities = array_map(function (string $item): array {
82
+        $cities = array_map(function(string $item): array {
83 83
             return [$this->url_obfuscator_service->obfuscate($item), $item];
84 84
         }, $this->certif_filesystem->cities($tree));
85 85
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             $certificates = $this->certif_filesystem->certificatesForCity($tree, $city);
91 91
         }
92 92
 
93
-        return $this->viewResponse($this->module->name() . '::certificates-list', [
93
+        return $this->viewResponse($this->module->name().'::certificates-list', [
94 94
             'title'                     =>  $title,
95 95
             'tree'                      =>  $tree,
96 96
             'module_name'               =>  $this->module->name(),
Please login to merge, or discard this patch.