Completed
Branch feature/pre-split (1b5228)
by Anton
03:14
created
source/Spiral/Database/Drivers/MySQL/MySQLHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,6 +89,6 @@
 block discarded – undo
89 89
             throw new SchemaException("MySQL commander can process only MySQL tables.");
90 90
         }
91 91
 
92
-        return parent::createStatement($table) . " ENGINE {$table->getEngine()}";
92
+        return parent::createStatement($table)." ENGINE {$table->getEngine()}";
93 93
     }
94 94
 }
95 95
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/MySQLCompiler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         $statement = '';
55 55
         if (!empty($limit) || !empty($offset)) {
56 56
             //When limit is not provided but offset does we can replace limit value with PHP_INT_MAX
57
-            $statement = 'LIMIT ' . ($limit ?: '18446744073709551615') . ' ';
57
+            $statement = 'LIMIT '.($limit ?: '18446744073709551615').' ';
58 58
         }
59 59
 
60 60
         if (!empty($offset)) {
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/SQLiteCompiler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
                     $selectColumns[] = "? AS {$this->quote($column)}";
36 36
                 }
37 37
 
38
-                $statement[] = 'SELECT ' . implode(', ', $selectColumns);
38
+                $statement[] = 'SELECT '.implode(', ', $selectColumns);
39 39
             } else {
40
-                $statement[] = 'UNION SELECT ' . trim(str_repeat('?, ', count($columns)), ', ');
40
+                $statement[] = 'UNION SELECT '.trim(str_repeat('?, ', count($columns)), ', ');
41 41
             }
42 42
         }
43 43
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $statement = '';
59 59
 
60 60
         if (!empty($limit) || !empty($offset)) {
61
-            $statement = 'LIMIT ' . ($limit ?: '-1') . ' ';
61
+            $statement = 'LIMIT '.($limit ?: '-1').' ';
62 62
         }
63 63
 
64 64
         if (!empty($offset)) {
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/Postgres/PostgresCompiler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
                 $table,
29 29
                 $columns,
30 30
                 $rowsets
31
-            ) . (!empty($primaryKey) ? ' RETURNING ' . $this->quote($primaryKey) : '');
31
+            ).(!empty($primaryKey) ? ' RETURNING '.$this->quote($primaryKey) : '');
32 32
     }
33 33
 
34 34
     /**
@@ -40,6 +40,6 @@  discard block
 block discarded – undo
40 40
             return '';
41 41
         }
42 42
 
43
-        return 'DISTINCT' . (is_string($distinct) ? '(' . $this->quote($distinct) . ')' : '');
43
+        return 'DISTINCT'.(is_string($distinct) ? '('.$this->quote($distinct).')' : '');
44 44
     }
45 45
 }
Please login to merge, or discard this patch.
source/Spiral/Database/Schemas/Prototypes/AbstractTable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
         $this->prefix = $prefix;
114 114
 
115 115
         //Initializing states
116
-        $this->initial = new TableState($this->prefix . $name);
117
-        $this->current = new TableState($this->prefix . $name);
116
+        $this->initial = new TableState($this->prefix.$name);
117
+        $this->current = new TableState($this->prefix.$name);
118 118
 
119 119
         if ($this->driver->hasTable($this->getName())) {
120 120
             $this->status = self::STATUS_EXISTS;
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      */
194 194
     public function setName(string $name): string
195 195
     {
196
-        $this->current->setName($this->prefix . $name);
196
+        $this->current->setName($this->prefix.$name);
197 197
 
198 198
         return $this->getName();
199 199
     }
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
     {
484 484
         if ($this->hasIndex($columns)) {
485 485
             throw new SchemaException(
486
-                "Undefined index ['" . join("', '", $columns) . "'] in '{$this->getName()}'"
486
+                "Undefined index ['".join("', '", $columns)."'] in '{$this->getName()}'"
487 487
             );
488 488
         }
489 489
 
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
     {
528 528
         if (empty($schema = $this->current->findIndex($columns))) {
529 529
             throw new SchemaException(
530
-                "Undefined index ['" . join("', '", $columns) . "'] in '{$this->getName()}'"
530
+                "Undefined index ['".join("', '", $columns)."'] in '{$this->getName()}'"
531 531
             );
532 532
         }
533 533
 
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
      */
749 749
     protected function createIdentifier(string $type, array $columns): string
750 750
     {
751
-        $name = $this->getName() . '_' . $type . '_' . join('_', $columns) . '_' . uniqid();
751
+        $name = $this->getName().'_'.$type.'_'.join('_', $columns).'_'.uniqid();
752 752
 
753 753
         if (strlen($name) > 64) {
754 754
             //Many DBMS has limitations on identifier length
Please login to merge, or discard this patch.
source/Spiral/Database/Entities/AbstractHandler.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         if (!empty($table->getPrimaryKeys())) {
270 270
             $primaryKeys = array_map([$this, 'quote'], $table->getPrimaryKeys());
271 271
 
272
-            $innerStatement[] = 'PRIMARY KEY (' . join(', ', $primaryKeys) . ')';
272
+            $innerStatement[] = 'PRIMARY KEY ('.join(', ', $primaryKeys).')';
273 273
         }
274 274
 
275 275
         //Constraints and foreign keys
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
             $innerStatement[] = $reference->sqlStatement();
278 278
         }
279 279
 
280
-        $statement[] = "    " . join(",\n    ", $innerStatement);
280
+        $statement[] = "    ".join(",\n    ", $innerStatement);
281 281
         $statement[] = ')';
282 282
 
283 283
         return join("\n", $statement);
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@
 block discarded – undo
228 228
      * Execute statement.
229 229
      *
230 230
      * @param string $statement
231
-     * @param array  $parameters
231
+     * @param string[]  $parameters
232 232
      * @return \PDOStatement
233 233
      */
234 234
     protected function run($statement, array $parameters = [])
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/Schemas/SQLiteReference.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@
 block discarded – undo
21 21
         $statement = [];
22 22
 
23 23
         $statement[] = 'FOREIGN KEY';
24
-        $statement[] = '(' . $driver->identifier($this->column) . ')';
24
+        $statement[] = '('.$driver->identifier($this->column).')';
25 25
 
26
-        $statement[] = 'REFERENCES ' . $driver->identifier($this->foreignTable);
27
-        $statement[] = '(' . $driver->identifier($this->foreignKey) . ')';
26
+        $statement[] = 'REFERENCES '.$driver->identifier($this->foreignTable);
27
+        $statement[] = '('.$driver->identifier($this->foreignKey).')';
28 28
 
29 29
         $statement[] = "ON DELETE {$this->deleteRule}";
30 30
         $statement[] = "ON UPDATE {$this->updateRule}";
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/Schemas/SQLiteTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
     private function columnSchemas(array $include = []): array
84 84
     {
85 85
         $columns = $this->driver->query(
86
-            "PRAGMA TABLE_INFO(" . $this->driver->quote($this->getName()) . ")"
86
+            "PRAGMA TABLE_INFO(".$this->driver->quote($this->getName()).")"
87 87
         );
88 88
 
89 89
         $result = [];
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/Schemas/SQLiteColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
 
131 131
         $quoted = $driver->getPDO()->quote($this->name);
132 132
 
133
-        return "$statement CHECK ({$quoted} IN (" . implode(', ', $enumValues) . '))';
133
+        return "$statement CHECK ({$quoted} IN (".implode(', ', $enumValues).'))';
134 134
     }
135 135
 
136 136
     /**
Please login to merge, or discard this patch.