@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | } |
159 | 159 | |
160 | - if ($values[$i] !== '' || $children_with_values && !$element instanceof AbstractXrefElement) { |
|
160 | + if ($values[$i] !== '' || $children_with_values && !$element instanceof AbstractXrefElement) { |
|
161 | 161 | if ($values[$i] === '') { |
162 | 162 | $gedcom_lines[] = $levels[$i] . ' ' . $tags[$i]; |
163 | 163 | } else { |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | * |
232 | 232 | * @return array<string> |
233 | 233 | */ |
234 | - public function factsToAdd(Family|Individual $record, bool $include_hidden): array |
|
234 | + public function factsToAdd(Family | Individual $record, bool $include_hidden): array |
|
235 | 235 | { |
236 | 236 | $subtags = Registry::elementFactory()->make($record->tag())->subtags(); |
237 | 237 |
@@ -114,7 +114,7 @@ |
||
114 | 114 | * |
115 | 115 | * @return ResponseInterface |
116 | 116 | */ |
117 | -function response(array|object|string $content = '', int $code = StatusCodeInterface::STATUS_OK, array $headers = []): ResponseInterface |
|
117 | +function response(array | object | string $content = '', int $code = StatusCodeInterface::STATUS_OK, array $headers = []): ResponseInterface |
|
118 | 118 | { |
119 | 119 | return Registry::responseFactory()->response($content, $code, $headers); |
120 | 120 | } |
@@ -660,11 +660,11 @@ |
||
660 | 660 | */ |
661 | 661 | protected function surnameInitials(array $all_surnames): array |
662 | 662 | { |
663 | - $initials = []; |
|
663 | + $initials = []; |
|
664 | 664 | |
665 | 665 | // Ensure our own language comes before others. |
666 | 666 | foreach (I18N::language()->alphabet() as $initial) { |
667 | - $initials[$initial] = 0; |
|
667 | + $initials[$initial] = 0; |
|
668 | 668 | } |
669 | 669 | |
670 | 670 | foreach ($all_surnames as $surn => $surnames) { |
@@ -313,7 +313,8 @@ discard block |
||
313 | 313 | <li class="wt-initials-list-item d-flex"> |
314 | 314 | <?php if ($count > 0) : ?> |
315 | 315 | <a href="<?= e($this->listUrl($tree, ['alpha' => $letter, 'tree' => $tree->name()])) ?>" class="wt-initial px-1<?= $letter === $alpha ? ' active' : '' ?> '" title="<?= I18N::number($count) ?>"><?= $this->displaySurnameInitial((string) $letter) ?></a> |
316 | - <?php else : ?> |
|
316 | + <?php else { |
|
317 | + : ?> |
|
317 | 318 | <span class="wt-initial px-1 text-muted"><?= $this->displaySurnameInitial((string) $letter) ?></span> |
318 | 319 | |
319 | 320 | <?php endif ?> |
@@ -368,6 +369,7 @@ discard block |
||
368 | 369 | switch ($alpha) { |
369 | 370 | case '@': |
370 | 371 | $surns = array_filter($all_surnames, static fn (string $x): bool => $x === Individual::NOMEN_NESCIO, ARRAY_FILTER_USE_KEY); |
372 | +} |
|
371 | 373 | break; |
372 | 374 | case ',': |
373 | 375 | $surns = array_filter($all_surnames, static fn (string $x): bool => $x === '', ARRAY_FILTER_USE_KEY); |
@@ -301,7 +301,7 @@ |
||
301 | 301 | { |
302 | 302 | $latest_version = $this->fetchLatestVersion(false); |
303 | 303 | |
304 | - [, , $url] = explode('|', $latest_version . '||'); |
|
304 | + [,, $url] = explode('|', $latest_version . '||'); |
|
305 | 305 | |
306 | 306 | return $url; |
307 | 307 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * |
39 | 39 | * @return $this |
40 | 40 | */ |
41 | - public function default(int|string|Expression|null $default): static; |
|
41 | + public function default(int | string | Expression | null $default): static; |
|
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @param bool $nullable |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | /** |
63 | 63 | * @return int|string|Expression|null |
64 | 64 | */ |
65 | - public function getDefault(): int|string|Expression|null; |
|
65 | + public function getDefault(): int | string | Expression | null; |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * @return bool |
@@ -97,11 +97,11 @@ |
||
97 | 97 | ]); |
98 | 98 | |
99 | 99 | $block_setting = Schema::table('block_setting', [ |
100 | - Schema::integer('block_id'), |
|
101 | - Schema::varchar('setting_name', 32), |
|
102 | - Schema::text('setting_value'), |
|
103 | - Schema::primaryKey(['block_id', 'setting_name']), |
|
104 | - Schema::foreignKey('block_id', 'block')->onDeleteCascade()->onUpdateCascade(), |
|
100 | + Schema::integer('block_id'), |
|
101 | + Schema::varchar('setting_name', 32), |
|
102 | + Schema::text('setting_value'), |
|
103 | + Schema::primaryKey(['block_id', 'setting_name']), |
|
104 | + Schema::foreignKey('block_id', 'block')->onDeleteCascade()->onUpdateCascade(), |
|
105 | 105 | ]); |
106 | 106 | |
107 | 107 | $change = Schema::table('change', [ |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | * |
409 | 409 | * @return PrimaryKey |
410 | 410 | */ |
411 | - public static function primaryKey(string|array $columns, string $name = ''): PrimaryKey |
|
411 | + public static function primaryKey(string | array $columns, string $name = ''): PrimaryKey |
|
412 | 412 | { |
413 | 413 | return new PrimaryKey(name: $name, columns: (array) $columns); |
414 | 414 | } |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | * |
420 | 420 | * @return Index |
421 | 421 | */ |
422 | - public static function index(string|array $columns, string $name = ''): Index |
|
422 | + public static function index(string | array $columns, string $name = ''): Index |
|
423 | 423 | { |
424 | 424 | return new Index(name: $name, columns: (array) $columns); |
425 | 425 | } |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | * |
431 | 431 | * @return UniqueIndex |
432 | 432 | */ |
433 | - public static function uniqueIndex(string|array $columns, string $name = ''): UniqueIndex |
|
433 | + public static function uniqueIndex(string | array $columns, string $name = ''): UniqueIndex |
|
434 | 434 | { |
435 | 435 | return new UniqueIndex(name: $name, columns: (array) $columns); |
436 | 436 | } |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | * |
443 | 443 | * @return ForeignKey |
444 | 444 | */ |
445 | - public static function foreignKey(string|array $local_columns, string $foreign_table, string|array $foreign_columns = null): ForeignKey |
|
445 | + public static function foreignKey(string | array $local_columns, string $foreign_table, string | array $foreign_columns = null): ForeignKey |
|
446 | 446 | { |
447 | 447 | // If the foreign columns have the same name, we don't need to specify them. |
448 | 448 | $foreign_columns ??= $local_columns; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | public string $comment = ''; |
30 | 30 | |
31 | - public int|float|string|Expression|null $default = null; |
|
31 | + public int | float | string | Expression | null $default = null; |
|
32 | 32 | |
33 | 33 | public bool $nullable = false; |
34 | 34 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * |
59 | 59 | * @return $this |
60 | 60 | */ |
61 | - public function default(int|float|string|Expression|null $default): static |
|
61 | + public function default(int | float | string | Expression | null $default): static |
|
62 | 62 | { |
63 | 63 | $this->default = $default; |
64 | 64 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | /** |
101 | 101 | * @return int|string|Expression|null |
102 | 102 | */ |
103 | - public function getDefault(): int|string|Expression|null |
|
103 | + public function getDefault(): int | string | Expression | null |
|
104 | 104 | { |
105 | 105 | return $this->default; |
106 | 106 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function introspectSchema(string $schema_name = null): Schema |
82 | 82 | { |
83 | - $schema_name ??= $this->query(sql: 'SELECT DATABASE() AS schema_name')[0]->schema_name; |
|
83 | + $schema_name ??= $this->query(sql: 'SELECT DATABASE() AS schema_name')[0]->schema_name; |
|
84 | 84 | $pattern = $this->escapeLike(string: $this->prefix) . '%'; |
85 | 85 | $table_data = $this->informationSchemaTables(schema_name: $schema_name, pattern: $pattern); |
86 | 86 | $column_data = $this->informationSchemaColumns(schema_name: $schema_name, pattern: $pattern); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $schema = new Schema(); |
91 | 91 | |
92 | 92 | foreach ($table_data as $table_datum) { |
93 | - $table = 'CREATE TABLE '. $this->quoteIdentifier($table_datum->TABLE_NAME) . '('; |
|
93 | + $table = 'CREATE TABLE ' . $this->quoteIdentifier($table_datum->TABLE_NAME) . '('; |
|
94 | 94 | |
95 | 95 | foreach ($column_data as $row) { |
96 | 96 | if ($row->TABLE_NAME === $table_datum->TABLE_NAME) { |
@@ -219,15 +219,15 @@ discard block |
||
219 | 219 | } |
220 | 220 | |
221 | 221 | if ($row->COMMENT !== null) { |
222 | - $sql.= ' COMMENT ' . $row->COLLATION_NAME; |
|
222 | + $sql .= ' COMMENT ' . $row->COLLATION_NAME; |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | if ($row->COLUMN_COMMENT !== '') { |
226 | - $sql.= ' COMMENT ' . $this->quoteValue($row->COLUMN_COMMENT); |
|
226 | + $sql .= ' COMMENT ' . $this->quoteValue($row->COLUMN_COMMENT); |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | if ($row->COLLATION_NAME !== null) { |
230 | - $sql.= ' COLLATE ' . $row->COLLATION_NAME; |
|
230 | + $sql .= ' COLLATE ' . $row->COLLATION_NAME; |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | return $sql; |