Passed
Push — dbal ( b6c9ce...9b470f )
by Greg
06:51
created
app/DB/Schema/ColumnInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
app/DB/Schema/AbstractColumn.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/DB/Schema/Schema.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
      *
438 438
      * @return PrimaryKey
439 439
      */
440
-    public static function primaryKey(string|array $columns, string $name = ''): PrimaryKey
440
+    public static function primaryKey(string | array $columns, string $name = ''): PrimaryKey
441 441
     {
442 442
         return new PrimaryKey(name: $name, columns: (array) $columns);
443 443
     }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
      *
449 449
      * @return Index
450 450
      */
451
-    public static function index(string|array $columns, string $name = ''): Index
451
+    public static function index(string | array $columns, string $name = ''): Index
452 452
     {
453 453
         return new Index(name: $name, columns: (array) $columns);
454 454
     }
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
      *
460 460
      * @return UniqueIndex
461 461
      */
462
-    public static function uniqueIndex(string|array $columns, string $name = ''): UniqueIndex
462
+    public static function uniqueIndex(string | array $columns, string $name = ''): UniqueIndex
463 463
     {
464 464
         return new UniqueIndex(name: $name, columns: (array) $columns);
465 465
     }
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
      *
473 473
      * @return ForeignKey
474 474
      */
475
-    public static function foreignKey(string|array $local_columns, string $foreign_table, string|array $foreign_columns = null, string $name = ''): ForeignKey
475
+    public static function foreignKey(string | array $local_columns, string $foreign_table, string | array $foreign_columns = null, string $name = ''): ForeignKey
476 476
     {
477 477
         // If the foreign columns have the same name, we don't need to specify them.
478 478
         $foreign_columns ??= $local_columns;
Please login to merge, or discard this patch.
app/DB/Table.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@
 block discarded – undo
36 36
      * @param string                  $name
37 37
      * @param Column|Index|ForeignKey ...$components
38 38
      */
39
-    public function __construct(string $name, Column|Index|ForeignKey ...$components)
39
+    public function __construct(string $name, Column | Index | ForeignKey ...$components)
40 40
     {
41 41
         $name = DB::prefix($name);
42 42
         
43
-        $columns = array_filter($components, static fn (Column|Index|ForeignKey $component) => $component instanceof Column);
44
-        $indexes = array_filter($components, static fn (Column|Index|ForeignKey $component) => $component instanceof Index);
45
-        $fk_constraints = array_filter($components, static fn (Column|Index|ForeignKey $component) => $component instanceof ForeignKey);
43
+        $columns = array_filter($components, static fn (Column | Index | ForeignKey $component) => $component instanceof Column);
44
+        $indexes = array_filter($components, static fn (Column | Index | ForeignKey $component) => $component instanceof Index);
45
+        $fk_constraints = array_filter($components, static fn (Column | Index | ForeignKey $component) => $component instanceof ForeignKey);
46 46
 
47 47
         array_walk($indexes, static fn (Index $index, int $n): mixed => $index->_setName($name . '_ix' . ($n + 1)));
48 48
         array_walk($fk_constraints, static fn (Index $index, int $n): mixed => $index->_setName($name . '_fk' . ($n + 1)));
Please login to merge, or discard this patch.