Passed
Push — dbal ( f02271...d7ee92 )
by Greg
10:14
created
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|null $value, Closure $rule): float|null => $rule($value);
303
+        $callback = static fn (float | null $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/StatisticsData.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $rows = $query
102 102
             ->groupBy(['n_givn'])
103 103
             ->pluck(new Expression('COUNT(DISTINCT n_id)'), 'n_givn')
104
-            ->map(static fn (int|string $count): int => (int) $count);
104
+            ->map(static fn (int | string $count): int => (int) $count);
105 105
 
106 106
 
107 107
         $given_names = [];
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
      *
785 785
      * @return object{id:string,year:int,fact:string,type:string}|null
786 786
      */
787
-    private function firstEvent(array $events, bool $ascending): object|null
787
+    private function firstEvent(array $events, bool $ascending): object | null
788 788
     {
789 789
         if ($events === []) {
790 790
             $events = [
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
             ->orderBy('d_julianday1', $ascending ? 'ASC' : 'DESC')
804 804
             ->limit(1)
805 805
             ->get()
806
-            ->map(static fn (object $row): object => (object) [
806
+            ->map(static fn (object $row) : object => (object) [
807 807
                 'id'   => $row->id,
808 808
                 'year' => (int) $row->year,
809 809
                 'fact' => $row->fact,
@@ -916,14 +916,14 @@  discard block
 block discarded – undo
916 916
         return $date->display();
917 917
     }
918 918
 
919
-    public function isUserLoggedIn(int|null $user_id): bool
919
+    public function isUserLoggedIn(int | null $user_id): bool
920 920
     {
921 921
         return $user_id !== null && DB::table('session')
922 922
             ->where('user_id', '=', $user_id)
923 923
             ->exists();
924 924
     }
925 925
 
926
-    public function latestUserId(): int|null
926
+    public function latestUserId(): int | null
927 927
     {
928 928
         $user_id = DB::table('user')
929 929
             ->select(['user.user_id'])
@@ -1135,7 +1135,7 @@  discard block
 block discarded – undo
1135 1135
     /**
1136 1136
      * @return object{individual:Individual,days:int}|null
1137 1137
      */
1138
-    public function longlifeQuery(string $sex): object|null
1138
+    public function longlifeQuery(string $sex): object | null
1139 1139
     {
1140 1140
         return $this->birthAndDeathQuery($sex)
1141 1141
             ->orderBy('days', 'desc')
Please login to merge, or discard this patch.
resources/lang/en-US/messages.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return array (
4
-  ' but the details are unknown' => ' but the details are unknown',
5
-  '%H:%i:%s' => '%g:%i:%s %a',
6
-  '%j %F %Y' => '%F %j, %Y',
7
-  'Asunción, Paraguay' => 'Asuncion, Paraguay',
8
-  'Bogotá, Colombia' => 'Bogota, Colombia',
9
-  'Ciudad Juárez, Mexico' => 'Ciudad Juarez, Mexico',
10
-  'Colonia Juárez, Mexico' => 'Colonia Juarez, Mexico',
11
-  'Curaçao' => 'Curacao',
12
-  'Córdoba, Argentina' => 'Cordoba, Argentina',
13
-  'Côte d’Ivoire' => 'Cote d’Ivoire',
14
-  'Réunion' => 'Reunion',
15
-  'Saint Barthélemy' => 'Saint Barthelemy',
16
-  'San José, Costa Rica' => 'San Jose, Costa Rica',
17
-  'São Paulo, Brazil' => 'Sao Paulo, Brazil',
18
-  'Tuxtla Gutiérrez, Mexico' => 'Tuxtla Gutierrez, Mexico',
19
-  'Åland Islands' => 'Aland Islands',
4
+    ' but the details are unknown' => ' but the details are unknown',
5
+    '%H:%i:%s' => '%g:%i:%s %a',
6
+    '%j %F %Y' => '%F %j, %Y',
7
+    'Asunción, Paraguay' => 'Asuncion, Paraguay',
8
+    'Bogotá, Colombia' => 'Bogota, Colombia',
9
+    'Ciudad Juárez, Mexico' => 'Ciudad Juarez, Mexico',
10
+    'Colonia Juárez, Mexico' => 'Colonia Juarez, Mexico',
11
+    'Curaçao' => 'Curacao',
12
+    'Córdoba, Argentina' => 'Cordoba, Argentina',
13
+    'Côte d’Ivoire' => 'Cote d’Ivoire',
14
+    'Réunion' => 'Reunion',
15
+    'Saint Barthélemy' => 'Saint Barthelemy',
16
+    'San José, Costa Rica' => 'San Jose, Costa Rica',
17
+    'São Paulo, Brazil' => 'Sao Paulo, Brazil',
18
+    'Tuxtla Gutiérrez, Mexico' => 'Tuxtla Gutierrez, Mexico',
19
+    'Åland Islands' => 'Aland Islands',
20 20
 );
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return array (
3
+return array(
4 4
   ' but the details are unknown' => ' but the details are unknown',
5 5
   '%H:%i:%s' => '%g:%i:%s %a',
6 6
   '%j %F %Y' => '%F %j, %Y',
Please login to merge, or discard this patch.
app/Cli/Commands/ConfigIni.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,10 +81,10 @@
 block discarded – undo
81 81
             'dbcert'       => $this->stringOption(input: $input, name: 'dbcert'),
82 82
             'dbca'         => $this->stringOption(input: $input, name: 'dbca'),
83 83
             'dbverify'     => $this->boolOption(input: $input, name: 'dbverify') ? '1' : '0',
84
-            'tblpfx'       => $this->stringOption(input: $input, name: 'tblpfx'),
85
-            'base_url'     => rtrim(string: $this->stringOption(input: $input, name: 'base-url'), characters: '/'),
86
-            'rewrite_urls' => $this->boolOption(input: $input, name: 'rewrite-urls') ? '1' : '0',
87
-            'block_asn'    => $this->stringOption(input: $input, name: 'block-asn'),
84
+            'tblpfx'       => $this->stringOption(input : $input, name : 'tblpfx'),
85
+            'base_url'     => rtrim(string : $this->stringOption(input : $input, name : 'base-url'), characters : '/'),
86
+            'rewrite_urls' => $this->boolOption(input : $input, name : 'rewrite-urls') ? '1' : '0',
87
+            'block_asn'    => $this->stringOption(input : $input, name : 'block-asn'),
88 88
         ];
89 89
 
90 90
         foreach ($config as $key => $value) {
Please login to merge, or discard this patch.
app/Services/SearchService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                     ->where('wife_name.n_type', '<>', '_MARNM');
127 127
             });
128 128
 
129
-        $field  = new Expression('COALESCE(' . DB::prefix('husb_name') . ".n_full, '') || COALESCE(" . DB::prefix('wife_name') . ".n_full, '')");
129
+        $field = new Expression('COALESCE(' . DB::prefix('husb_name') . ".n_full, '') || COALESCE(" . DB::prefix('wife_name') . ".n_full, '')");
130 130
 
131 131
         $this->whereTrees($query, 'f_file', $trees);
132 132
         $this->whereSearch($query, $field, $search);
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
      * @param Expression<string>|string $column
1069 1069
      * @param array<string>             $search_terms
1070 1070
      */
1071
-    private function whereSearch(Builder $query, Expression|string $column, array $search_terms): void
1071
+    private function whereSearch(Builder $query, Expression | string $column, array $search_terms): void
1072 1072
     {
1073 1073
         foreach ($search_terms as $search_term) {
1074 1074
             $query->where($column, DB::iLike(), '%' . addcslashes($search_term, '\\%_') . '%');
Please login to merge, or discard this patch.
app/Http/Middleware/BadBotBlocker.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -323,7 +323,7 @@
 block discarded – undo
323 323
     {
324 324
         return Registry::cache()->file()->remember('whois-asn-' . $asn, function () use ($asn): array {
325 325
             $ranges = $this->network_service->findIpRangesForAsn($asn);
326
-            $mapper = static fn (string $range): RangeInterface|null => Factory::parseRangeString($range);
326
+            $mapper = static fn (string $range): RangeInterface | null => Factory::parseRangeString($range);
327 327
             $ranges = array_map($mapper, $ranges);
328 328
 
329 329
             return array_filter($ranges);
Please login to merge, or discard this patch.
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -57,52 +57,52 @@
 block discarded – undo
57 57
      * Instead, the list from version 1.26 is copied here.
58 58
      */
59 59
     public const array AI_ROBOTS = [
60
-         'AI2Bot',
61
-         'Ai2Bot-Dolma',
62
-         'Amazonbot',
63
-         'anthropic-ai',
64
-         'Applebot',
65
-         'Applebot-Extended',
66
-         'Brightbot 1.0',
67
-         'Bytespider',
68
-         'CCBot',
69
-         'ChatGPT-User',
70
-         'Claude-Web',
71
-         'ClaudeBot',
72
-         'cohere-ai',
73
-         'cohere-training-data-crawler',
74
-         'Crawlspace',
75
-         'Diffbot',
76
-         'DuckAssistBot',
77
-         'FacebookBot',
78
-         'FriendlyCrawler',
79
-         'Google-Extended',
80
-         'GoogleOther',
81
-         'GoogleOther-Image',
82
-         'GoogleOther-Video',
83
-         'GPTBot',
84
-         'iaskspider/2.0',
85
-         'ICC-Crawler',
86
-         'ImagesiftBot',
87
-         'img2dataset',
88
-         'ISSCyberRiskCrawler',
89
-         'Kangaroo Bot',
90
-         'meta-externalagent',
91
-         'meta-externalfetcher',
92
-         'OAI-SearchBot',
93
-         'omgili',
94
-         'omgilibot',
95
-         'PanguBot',
96
-         'PerplexityBot',
97
-         'PetalBot',
98
-         'Scrapy',
99
-         'SemrushBot-OCOB',
100
-         'SemrushBot-SWA',
101
-         'Sidetrade indexer bot',
102
-         'Timpibot',
103
-         'VelenPublicWebCrawler',
104
-         'Webzio-Extended',
105
-         'YouBot',
60
+            'AI2Bot',
61
+            'Ai2Bot-Dolma',
62
+            'Amazonbot',
63
+            'anthropic-ai',
64
+            'Applebot',
65
+            'Applebot-Extended',
66
+            'Brightbot 1.0',
67
+            'Bytespider',
68
+            'CCBot',
69
+            'ChatGPT-User',
70
+            'Claude-Web',
71
+            'ClaudeBot',
72
+            'cohere-ai',
73
+            'cohere-training-data-crawler',
74
+            'Crawlspace',
75
+            'Diffbot',
76
+            'DuckAssistBot',
77
+            'FacebookBot',
78
+            'FriendlyCrawler',
79
+            'Google-Extended',
80
+            'GoogleOther',
81
+            'GoogleOther-Image',
82
+            'GoogleOther-Video',
83
+            'GPTBot',
84
+            'iaskspider/2.0',
85
+            'ICC-Crawler',
86
+            'ImagesiftBot',
87
+            'img2dataset',
88
+            'ISSCyberRiskCrawler',
89
+            'Kangaroo Bot',
90
+            'meta-externalagent',
91
+            'meta-externalfetcher',
92
+            'OAI-SearchBot',
93
+            'omgili',
94
+            'omgilibot',
95
+            'PanguBot',
96
+            'PerplexityBot',
97
+            'PetalBot',
98
+            'Scrapy',
99
+            'SemrushBot-OCOB',
100
+            'SemrushBot-SWA',
101
+            'Sidetrade indexer bot',
102
+            'Timpibot',
103
+            'VelenPublicWebCrawler',
104
+            'Webzio-Extended',
105
+            'YouBot',
106 106
     ];
107 107
 
108 108
     // Other bad robots - SEO optimisers, advertisers, etc.  This list is shared with robots.txt.
Please login to merge, or discard this patch.
app/Module/IndividualFactsTabModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
             ->flatten();
116 116
 
117 117
         // Don't show family meta-data tags
118
-        $exclude_facts  = new Collection(['FAM:CHAN', 'FAM:_UID', 'FAM:UID', 'FAM:SUBM']);
118
+        $exclude_facts = new Collection(['FAM:CHAN', 'FAM:_UID', 'FAM:UID', 'FAM:SUBM']);
119 119
         // Don't show tags that are shown in tabs or sidebars
120 120
         $exclude_facts = $exclude_facts->merge($sidebar_facts)->merge($tab_facts);
121 121
 
Please login to merge, or discard this patch.
app/Services/GedcomExportService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         string $line_endings,
108 108
         string $filename,
109 109
         string $format,
110
-        Collection|null $records = null
110
+        Collection | null $records = null
111 111
     ): ResponseInterface {
112 112
         $access_level = self::ACCESS_LEVELS[$privacy];
113 113
 
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
         string $encoding = UTF8::NAME,
178 178
         int $access_level = Auth::PRIV_HIDE,
179 179
         string $line_endings = 'CRLF',
180
-        Collection|null $records = null,
181
-        ZipArchive|FilesystemOperator|null $zip_filesystem = null,
182
-        string|null $media_path = null
180
+        Collection | null $records = null,
181
+        ZipArchive | FilesystemOperator | null $zip_filesystem = null,
182
+        string | null $media_path = null
183 183
     ) {
184 184
         $stream = fopen('php://memory', 'wb+');
185 185
 
Please login to merge, or discard this patch.
app/Services/MapDataService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     /**
165 165
      * @param list<int> $parent_place_ids
166 166
      */
167
-    public function deleteUnusedLocations(int|null $parent_location_id, array $parent_place_ids): void
167
+    public function deleteUnusedLocations(int | null $parent_location_id, array $parent_place_ids): void
168 168
     {
169 169
         if ($parent_location_id === null) {
170 170
             $location_query = DB::table('place_location')
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      *
200 200
      * @return Collection<int,object{id:int,key:string,place:string,latitude:float|null,longitude:float|null,child_count:int,no_coord:int}>
201 201
      */
202
-    public function getPlaceListLocation(int|null $parent_id): Collection
202
+    public function getPlaceListLocation(int | null $parent_id): Collection
203 203
     {
204 204
         $expression =
205 205
             DB::prefix('p1') . '.place IS NOT NULL AND ' . DB::prefix('p1') . '.latitude IS NULL OR ' .
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
                 'child_count' => (int) $row->child_count,
249 249
                 'no_coord'    => (int) $row->no_coord,
250 250
             ])
251
-            ->sort(static fn (object $x, object $y): int => I18N::comparator()($x->place, $y->place));
251
+            ->sort(static fn (object $x, object $y) : int => I18N::comparator()($x->place, $y->place));
252 252
     }
253 253
 
254 254
     public function writeLatitude(float $latitude): string
Please login to merge, or discard this patch.