Passed
Branch main (f9aaf7)
by Jonathan
14:43
created
app/Module/AdminTasks/AdminTasksModule.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     //How to update the database schema for this module
56 56
     private const SCHEMA_TARGET_VERSION   = 2;
57 57
     private const SCHEMA_SETTING_NAME     = 'MAJ_ADMTASKS_SCHEMA_VERSION';
58
-    private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__ . '\Schema';
58
+    private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__.'\Schema';
59 59
 
60 60
     /**
61 61
      * {@inheritDoc}
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function loadRoutes(Map $router): void
97 97
     {
98
-        $router->attach('', '', static function (Map $router): void {
98
+        $router->attach('', '', static function(Map $router): void {
99 99
 
100
-            $router->attach('', '/module-maj/admintasks', static function (Map $router): void {
100
+            $router->attach('', '/module-maj/admintasks', static function(Map $router): void {
101 101
                 $router->tokens(['enable' => '[01]']);
102 102
 
103
-                $router->attach('', '/admin', static function (Map $router): void {
103
+                $router->attach('', '/admin', static function(Map $router): void {
104 104
 
105 105
                     $router->extras([
106 106
                         'middleware' => [
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                     ]);
110 110
                     $router->get(AdminConfigPage::class, '/config', AdminConfigPage::class);
111 111
 
112
-                    $router->attach('', '/tasks', static function (Map $router): void {
112
+                    $router->attach('', '/tasks', static function(Map $router): void {
113 113
 
114 114
                         $router->get(TasksList::class, '', TasksList::class);
115 115
                         $router->get(TaskEditPage::class, '/{task}', TaskEditPage::class);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function bodyContent(): string
153 153
     {
154
-        return view($this->name() . '::snippet', [ 'url' => route(TaskTrigger::class) ]);
154
+        return view($this->name().'::snippet', ['url' => route(TaskTrigger::class)]);
155 155
     }
156 156
 
157 157
     /**
Please login to merge, or discard this patch.
app/Module/AdminTasks/Tasks/HealthCheckEmailTask.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $interval_lastrun = $task_schedule->lastRunTime()->diffAsCarbonInterval(Carbon::now());
137 137
         //@phpcs:ignore Generic.Files.LineLength.TooLong
138 138
         $interval = $interval_lastrun->greaterThan($task_schedule->frequency()) ? $interval_lastrun : $task_schedule->frequency();
139
-        $nb_days = (int) $interval->ceilDay()->totalDays;
139
+        $nb_days = (int)$interval->ceilDay()->totalDays;
140 140
 
141 141
         $view_params_site = [
142 142
             'nb_days'               =>  $nb_days,
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                 continue;
156 156
             }
157 157
 
158
-            $webmaster = $this->user_service->find((int) $tree->getPreference('WEBMASTER_USER_ID'));
158
+            $webmaster = $this->user_service->find((int)$tree->getPreference('WEBMASTER_USER_ID'));
159 159
             if ($webmaster === null) {
160 160
                 continue;
161 161
             }
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
                 new TreeUser($tree),
177 177
                 $webmaster,
178 178
                 new NoReplyUser(),
179
-                I18N::translate('Health Check Report') . ' - ' . I18N::translate('Tree %s', $tree->name()),
180
-                view($this->module->name() . '::tasks/healthcheck/email-healthcheck-text', $view_params),
181
-                view($this->module->name() . '::tasks/healthcheck/email-healthcheck-html', $view_params)
179
+                I18N::translate('Health Check Report').' - '.I18N::translate('Tree %s', $tree->name()),
180
+                view($this->module->name().'::tasks/healthcheck/email-healthcheck-text', $view_params),
181
+                view($this->module->name().'::tasks/healthcheck/email-healthcheck-html', $view_params)
182 182
             );
183 183
         }
184 184
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function configView(ServerRequestInterface $request): string
193 193
     {
194
-        return $this->module === null ? '' : view($this->module->name() . '::tasks/healthcheck/config', [
194
+        return $this->module === null ? '' : view($this->module->name().'::tasks/healthcheck/config', [
195 195
             'all_trees'     =>  $this->tree_service->all()
196 196
         ]);
197 197
     }
@@ -203,11 +203,11 @@  discard block
 block discarded – undo
203 203
     public function updateConfig(ServerRequestInterface $request, TaskSchedule $task_schedule): bool
204 204
     {
205 205
         try {
206
-            $params = (array) $request->getParsedBody();
206
+            $params = (array)$request->getParsedBody();
207 207
 
208 208
             foreach ($this->tree_service->all() as $tree) {
209 209
                 if (Auth::isManager($tree)) {
210
-                    $tree_enabled = (bool) ($params['HEALTHCHECK_ENABLED_' . $tree->id()] ?? false);
210
+                    $tree_enabled = (bool)($params['HEALTHCHECK_ENABLED_'.$tree->id()] ?? false);
211 211
                     $tree->setPreference(self::TREE_PREFERENCE_NAME, $tree_enabled ? '1' : '0');
212 212
                 }
213 213
             }
Please login to merge, or discard this patch.
app/Http/Middleware/AuthTreePreference.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         // Permissions are configured
53 53
         if (is_numeric($permission_level)) {
54 54
             // Logged in with the correct role?
55
-            if (Auth::accessLevel($tree, $user) <= (int) $permission_level) {
55
+            if (Auth::accessLevel($tree, $user) <= (int)$permission_level) {
56 56
                     return $handler->handle($request);
57 57
             }
58 58
 
Please login to merge, or discard this patch.
app/Common/Hooks/AbstractHookCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      */
58 58
     public function name(): string
59 59
     {
60
-        return $this->module->name() . '-' .
60
+        return $this->module->name().'-'.
61 61
             mb_substr(str_replace('collector', '', mb_strtolower((new ReflectionClass($this))->getShortName())), 0, 64);
62 62
     }
63 63
 
Please login to merge, or discard this patch.
app/Common/GeoDispersion/GeoAnalysis/GeoAnalysisResult.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function merge(GeoAnalysisResult $other): self
136 136
     {
137
-        $this->places->each(function (GeoAnalysisResultItem $item) use ($other): void {
137
+        $this->places->each(function(GeoAnalysisResultItem $item) use ($other): void {
138 138
             if ($other->places->has($item->key())) {
139 139
                 $item->place()->exclude(
140 140
                     $item->place()->isExcluded()
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
             }
144 144
         });
145 145
 
146
-        $other->places->each(function (GeoAnalysisResultItem $item): void {
146
+        $other->places->each(function(GeoAnalysisResultItem $item): void {
147 147
             if (!$this->places->has($item->key())) {
148 148
                 $this->addPlace($item->place());
149 149
             }
@@ -230,8 +230,8 @@  discard block
 block discarded – undo
230 230
     public function sortedKnownPlaces(bool $exclude_other = false): Collection
231 231
     {
232 232
         return $this->knownPlaces($exclude_other)->sortBy([
233
-            fn (GeoAnalysisResultItem $a, GeoAnalysisResultItem $b): int => $b->count() <=> $a->count(),
234
-            fn (GeoAnalysisResultItem $a, GeoAnalysisResultItem $b): int =>
233
+            fn(GeoAnalysisResultItem $a, GeoAnalysisResultItem $b): int => $b->count() <=> $a->count(),
234
+            fn(GeoAnalysisResultItem $a, GeoAnalysisResultItem $b): int =>
235 235
                 I18N::comparator()($a->place()->place()->gedcomName(), $b->place()->place()->gedcomName())
236 236
         ]);
237 237
     }
Please login to merge, or discard this patch.
app/Common/GeoDispersion/Config/MapColorsConfig.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,10 +105,10 @@
 block discarded – undo
105 105
     public function jsonSerialize()
106 106
     {
107 107
         return [
108
-            'default'   => (string) $this->defaultColor()->toHex(),
109
-            'stroke'    => (string) $this->strokeColor()->toHex(),
110
-            'maxvalue'  => (string) $this->maxValueColor()->toHex(),
111
-            'hover'     => (string) $this->hoverColor()->toHex(),
108
+            'default'   => (string)$this->defaultColor()->toHex(),
109
+            'stroke'    => (string)$this->strokeColor()->toHex(),
110
+            'maxvalue'  => (string)$this->maxValueColor()->toHex(),
111
+            'hover'     => (string)$this->hoverColor()->toHex(),
112 112
         ];
113 113
     }
114 114
 }
Please login to merge, or discard this patch.