Passed
Push — main ( cc181a...c11fd3 )
by Greg
16:50
created
app/Fact.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
     /**
278 278
      * Get the PLAC:MAP:LATI for the fact.
279 279
      */
280
-    public function latitude(): float|null
280
+    public function latitude(): float | null
281 281
     {
282 282
         if (preg_match('/\n4 LATI (.+)/', $this->gedcom, $match)) {
283 283
             $gedcom_service = new GedcomService();
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
     /**
292 292
      * Get the PLAC:MAP:LONG for the fact.
293 293
      */
294
-    public function longitude(): float|null
294
+    public function longitude(): float | null
295 295
     {
296 296
         if (preg_match('/\n4 LONG (.+)/', $this->gedcom, $match)) {
297 297
             $gedcom_service = new GedcomService();
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      *
310 310
      * @return bool
311 311
      */
312
-    public function canShow(int|null $access_level = null): bool
312
+    public function canShow(int | null $access_level = null): bool
313 313
     {
314 314
         $access_level ??= Auth::accessLevel($this->record->tree());
315 315
 
Please login to merge, or discard this patch.
app/Validator.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function isBetween(int $minimum, int $maximum): self
127 127
     {
128
-        $this->rules[] = static function (int|null $value) use ($minimum, $maximum): int|null {
128
+        $this->rules[] = static function (int | null $value) use ($minimum, $maximum): int | null {
129 129
             if (is_int($value) && $value >= $minimum && $value <= $maximum) {
130 130
                 return $value;
131 131
             }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function isInArray(array $values): self
145 145
     {
146
-        $this->rules[] = static fn (int|string|null $value): int|string|null => in_array($value, $values, true) ? $value : null;
146
+        $this->rules[] = static fn (int | string | null $value): int | string | null => in_array($value, $values, true) ? $value : null;
147 147
 
148 148
         return $this;
149 149
     }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function isNotEmpty(): self
165 165
     {
166
-        $this->rules[] = static fn (string|null $value): string|null => $value !== null && $value !== '' ? $value : null;
166
+        $this->rules[] = static fn (string | null $value): string | null => $value !== null && $value !== '' ? $value : null;
167 167
 
168 168
         return $this;
169 169
     }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     {
176 176
         $base_url = $this->request->getAttribute('base_url', '');
177 177
 
178
-        $this->rules[] = static function (string|null $value) use ($base_url): string|null {
178
+        $this->rules[] = static function (string | null $value) use ($base_url): string | null {
179 179
             if ($value !== null) {
180 180
                 $value_info    = parse_url($value);
181 181
                 $base_url_info = parse_url($base_url);
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      */
205 205
     public function isTag(): self
206 206
     {
207
-        $this->rules[] = static function (string|null $value): string|null {
207
+        $this->rules[] = static function (string | null $value): string | null {
208 208
             if ($value !== null && preg_match('/^' . Gedcom::REGEX_TAG . '$/', $value) === 1) {
209 209
                 return $value;
210 210
             }
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      *
248 248
      * @return bool
249 249
      */
250
-    public function boolean(string $parameter, bool|null $default = null): bool
250
+    public function boolean(string $parameter, bool | null $default = null): bool
251 251
     {
252 252
         $value = $this->parameters[$parameter] ?? null;
253 253
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             throw new HttpBadRequestException(I18N::translate('The parameter “%s” is missing.', $parameter));
280 280
         }
281 281
 
282
-        $callback = static fn (array|null $value, Closure $rule): array|null => $rule($value);
282
+        $callback = static fn (array | null $value, Closure $rule): array | null => $rule($value);
283 283
 
284 284
         return array_reduce($this->rules, $callback, $value) ?? [];
285 285
     }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
      *
291 291
      * @return float
292 292
      */
293
-    public function float(string $parameter, float|null $default = null): float
293
+    public function float(string $parameter, float | null $default = null): float
294 294
     {
295 295
         $value = $this->parameters[$parameter] ?? null;
296 296
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
             $value = null;
301 301
         }
302 302
 
303
-        $callback = static fn (?float $value, Closure $rule): float|null => $rule($value);
303
+        $callback = static fn (?float $value, Closure $rule) : float | null => $rule($value);
304 304
 
305 305
         $value = array_reduce($this->rules, $callback, $value) ?? $default;
306 306
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
      *
318 318
      * @return int
319 319
      */
320
-    public function integer(string $parameter, int|null $default = null): int
320
+    public function integer(string $parameter, int | null $default = null): int
321 321
     {
322 322
         $value = $this->parameters[$parameter] ?? null;
323 323
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             $value = null;
334 334
         }
335 335
 
336
-        $callback = static fn (int|null $value, Closure $rule): int|null => $rule($value);
336
+        $callback = static fn (int | null $value, Closure $rule): int | null => $rule($value);
337 337
 
338 338
         $value = array_reduce($this->rules, $callback, $value) ?? $default;
339 339
 
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
      *
367 367
      * @return string
368 368
      */
369
-    public function string(string $parameter, string|null $default = null): string
369
+    public function string(string $parameter, string | null $default = null): string
370 370
     {
371 371
         $value = $this->parameters[$parameter] ?? null;
372 372
 
@@ -374,9 +374,9 @@  discard block
 block discarded – undo
374 374
             $value = null;
375 375
         }
376 376
 
377
-        $callback = static fn (string|null $value, Closure $rule): string|null => $rule($value);
377
+        $callback = static fn (string | null $value, Closure $rule): string | null => $rule($value);
378 378
 
379
-        $value =  array_reduce($this->rules, $callback, $value) ?? $default;
379
+        $value = array_reduce($this->rules, $callback, $value) ?? $default;
380 380
 
381 381
         if ($value === null) {
382 382
             throw new HttpBadRequestException(I18N::translate('The parameter “%s” is missing.', $parameter));
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
         throw new HttpBadRequestException(I18N::translate('The parameter “%s” is missing.', $parameter));
402 402
     }
403 403
 
404
-    public function treeOptional(string $parameter = 'tree'): Tree|null
404
+    public function treeOptional(string $parameter = 'tree'): Tree | null
405 405
     {
406 406
         $value = $this->parameters[$parameter] ?? null;
407 407
 
Please login to merge, or discard this patch.
app/Module/UserFavoritesModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@
 block discarded – undo
252 252
         ]);
253 253
     }
254 254
 
255
-    private function getRecordForType(string $type, string $xref, Tree $tree): GedcomRecord|null
255
+    private function getRecordForType(string $type, string $xref, Tree $tree): GedcomRecord | null
256 256
     {
257 257
         switch ($type) {
258 258
             case 'indi':
Please login to merge, or discard this patch.
app/Module/ModuleThemeInterface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      *
43 43
      * @return Menu|null
44 44
      */
45
-    public function menuThemes(): Menu|null;
45
+    public function menuThemes(): Menu | null;
46 46
 
47 47
     /**
48 48
      * Generate a list of items for the main menu.
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @return array<Menu>
53 53
      */
54
-    public function genealogyMenu(Tree|null $tree): array;
54
+    public function genealogyMenu(Tree | null $tree): array;
55 55
 
56 56
     /**
57 57
      * Generate a list of items for the user menu.
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      *
61 61
      * @return array<Menu>
62 62
      */
63
-    public function userMenu(Tree|null $tree): array;
63
+    public function userMenu(Tree | null $tree): array;
64 64
 
65 65
     /**
66 66
      * A list of CSS files to include for this page.
Please login to merge, or discard this patch.
app/Module/InteractiveTreeModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
      *
142 142
      * @return Menu|null
143 143
      */
144
-    public function chartBoxMenu(Individual $individual): Menu|null
144
+    public function chartBoxMenu(Individual $individual): Menu | null
145 145
     {
146 146
         return $this->chartMenu($individual);
147 147
     }
Please login to merge, or discard this patch.
app/Module/SourcesTabModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     use ModuleTabTrait;
34 34
 
35 35
     /** @var Collection<array-key,Fact>|null  */
36
-    private Collection|null $facts = null;
36
+    private Collection | null $facts = null;
37 37
 
38 38
     private ClipboardService $clipboard_service;
39 39
 
Please login to merge, or discard this patch.
app/Module/ReportsMenuModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
      *
85 85
      * @return Menu|null
86 86
      */
87
-    public function getMenu(Tree $tree): Menu|null
87
+    public function getMenu(Tree $tree): Menu | null
88 88
     {
89 89
         $request    = Registry::container()->get(ServerRequestInterface::class);
90 90
         $xref       = Validator::attributes($request)->isXref()->string('xref', '');
Please login to merge, or discard this patch.
app/Module/CloudsTheme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      *
51 51
      * @return array<Menu>
52 52
      */
53
-    public function genealogyMenu(Tree|null $tree): array
53
+    public function genealogyMenu(Tree | null $tree): array
54 54
     {
55 55
         $primary_menu = $this->baseGenealogyMenu($tree);
56 56
 
Please login to merge, or discard this patch.
app/Module/SearchMenuModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      *
77 77
      * @return Menu|null
78 78
      */
79
-    public function getMenu(Tree $tree): Menu|null
79
+    public function getMenu(Tree $tree): Menu | null
80 80
     {
81 81
         $submenu = [
82 82
             $this->menuSearchGeneral($tree),
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      *
131 131
      * @return Menu|null
132 132
      */
133
-    protected function menuSearchAndReplace(Tree $tree): Menu|null
133
+    protected function menuSearchAndReplace(Tree $tree): Menu | null
134 134
     {
135 135
         if (Auth::isEditor($tree)) {
136 136
             $url = route(SearchReplacePage::class, ['tree' => $tree->name()]);
Please login to merge, or discard this patch.