Completed
Branch feature/pre-split (92bc7d)
by Anton
04:30
created
source/Spiral/Database/Schemas/AbstractReference.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     public function references(string $table, string $column = 'id'): AbstractReference
168 168
     {
169
-        $this->foreignTable = $this->table->getPrefix() . $table;
169
+        $this->foreignTable = $this->table->getPrefix().$table;
170 170
         $this->foreignKey = $column;
171 171
 
172 172
         return $this;
@@ -212,10 +212,10 @@  discard block
 block discarded – undo
212 212
         $statement[] = 'CONSTRAINT';
213 213
         $statement[] = $this->getName(true);
214 214
         $statement[] = 'FOREIGN KEY';
215
-        $statement[] = '(' . $this->table->getDriver()->identifier($this->column) . ')';
215
+        $statement[] = '('.$this->table->getDriver()->identifier($this->column).')';
216 216
 
217
-        $statement[] = 'REFERENCES ' . $this->table->getDriver()->identifier($this->foreignTable);
218
-        $statement[] = '(' . $this->table->getDriver()->identifier($this->foreignKey) . ')';
217
+        $statement[] = 'REFERENCES '.$this->table->getDriver()->identifier($this->foreignTable);
218
+        $statement[] = '('.$this->table->getDriver()->identifier($this->foreignKey).')';
219 219
 
220 220
         $statement[] = "ON DELETE {$this->deleteRule}";
221 221
         $statement[] = "ON UPDATE {$this->updateRule}";
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      */
246 246
     protected function generateName(): string
247 247
     {
248
-        $name = $this->table->getName() . '_foreign_' . $this->column . '_' . uniqid();
248
+        $name = $this->table->getName().'_foreign_'.$this->column.'_'.uniqid();
249 249
 
250 250
         if (strlen($name) > 64) {
251 251
             //Many dbs has limitations on identifier length
Please login to merge, or discard this patch.
Excluded/Database/Drivers/SQLite/Schemas/ReferenceSchema.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
         $statement = [];
24 24
 
25 25
         $statement[] = 'FOREIGN KEY';
26
-        $statement[] = '(' . $this->table->getDriver()->identifier($this->column) . ')';
26
+        $statement[] = '('.$this->table->getDriver()->identifier($this->column).')';
27 27
 
28
-        $statement[] = 'REFERENCES ' . $this->table->getDriver()->identifier($this->foreignTable);
29
-        $statement[] = '(' . $this->table->getDriver()->identifier($this->foreignKey) . ')';
28
+        $statement[] = 'REFERENCES '.$this->table->getDriver()->identifier($this->foreignTable);
29
+        $statement[] = '('.$this->table->getDriver()->identifier($this->foreignKey).')';
30 30
 
31 31
         $statement[] = "ON DELETE {$this->deleteRule}";
32 32
         $statement[] = "ON UPDATE {$this->updateRule}";
Please login to merge, or discard this patch.