Completed
Push — master ( 32964b...ce7d35 )
by Anton
05:22
created
source/Spiral/Database/Entities/Schemas/AbstractTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
      */
165 165
     public function setName($name)
166 166
     {
167
-        parent::setName($this->prefix . $name);
167
+        parent::setName($this->prefix.$name);
168 168
     }
169 169
 
170 170
     /**
Please login to merge, or discard this patch.
source/Spiral/Database/Entities/Schemas/AbstractReference.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      */
163 163
     public function references($table, $column = 'id')
164 164
     {
165
-        $this->foreignTable = $this->table->getPrefix() . $table;
165
+        $this->foreignTable = $this->table->getPrefix().$table;
166 166
         $this->foreignKey = $column;
167 167
 
168 168
         return $this;
@@ -206,10 +206,10 @@  discard block
 block discarded – undo
206 206
         $statement[] = 'CONSTRAINT';
207 207
         $statement[] = $this->getName(true);
208 208
         $statement[] = 'FOREIGN KEY';
209
-        $statement[] = '(' . $this->table->driver()->identifier($this->column) . ')';
209
+        $statement[] = '('.$this->table->driver()->identifier($this->column).')';
210 210
 
211
-        $statement[] = 'REFERENCES ' . $this->table->driver()->identifier($this->foreignTable);
212
-        $statement[] = '(' . $this->table->driver()->identifier($this->foreignKey) . ')';
211
+        $statement[] = 'REFERENCES '.$this->table->driver()->identifier($this->foreignTable);
212
+        $statement[] = '('.$this->table->driver()->identifier($this->foreignKey).')';
213 213
 
214 214
         $statement[] = "ON DELETE {$this->deleteRule}";
215 215
         $statement[] = "ON UPDATE {$this->updateRule}";
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      */
239 239
     protected function generateName()
240 240
     {
241
-        $name = $this->table->getName() . '_foreign_' . $this->column . '_' . uniqid();
241
+        $name = $this->table->getName().'_foreign_'.$this->column.'_'.uniqid();
242 242
 
243 243
         if (strlen($name) > 64) {
244 244
             //Many dbs has limitations on identifier length
Please login to merge, or discard this patch.
source/Spiral/Database/Entities/Schemas/AbstractColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -731,7 +731,7 @@
 block discarded – undo
731 731
         }
732 732
 
733 733
         if (!empty($enumValues)) {
734
-            return '(' . join(', ', $enumValues) . ')';
734
+            return '('.join(', ', $enumValues).')';
735 735
         }
736 736
 
737 737
         return '';
Please login to merge, or discard this patch.
source/Spiral/Database/Entities/Schemas/AbstractIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
     protected function generateName()
154 154
     {
155 155
         //We can generate name
156
-        $name = $this->table->getName() . '_index_' . join('_', $this->columns) . '_' . uniqid();
156
+        $name = $this->table->getName().'_index_'.join('_', $this->columns).'_'.uniqid();
157 157
 
158 158
         if (strlen($name) > 64) {
159 159
             //Many dbs has limitations on identifier length
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/QueryCompiler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $statement = '';
54 54
         if (!empty($limit) || !empty($offset)) {
55 55
             //When limit is not provided but offset does we can replace limit value with PHP_INT_MAX
56
-            $statement = "LIMIT " . ($limit ?: '18446744073709551615') . ' ';
56
+            $statement = "LIMIT ".($limit ?: '18446744073709551615').' ';
57 57
         }
58 58
 
59 59
         if (!empty($offset)) {
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/MySQLDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      */
58 58
     public function identifier($identifier)
59 59
     {
60
-        return $identifier == '*' ? '*' : '`' . str_replace('`', '``', $identifier) . '`';
60
+        return $identifier == '*' ? '*' : '`'.str_replace('`', '``', $identifier).'`';
61 61
     }
62 62
 
63 63
     /**
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/Schemas/Commander.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/Postgres/QueryCompiler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function compileInsert($table, array $columns, array $rowsets, $primaryKey = '')
21 21
     {
22
-        return parent::compileInsert($table, $columns, $rowsets) . (!empty($primaryKey)
23
-            ? ' RETURNING ' . $this->quote($primaryKey)
22
+        return parent::compileInsert($table, $columns, $rowsets).(!empty($primaryKey)
23
+            ? ' RETURNING '.$this->quote($primaryKey)
24 24
             : ''
25 25
         );
26 26
     }
@@ -34,6 +34,6 @@  discard block
 block discarded – undo
34 34
             return '';
35 35
         }
36 36
 
37
-        return "DISTINCT" . (is_string($distinct) ? '(' . $this->quote($distinct) . ')' : '');
37
+        return "DISTINCT".(is_string($distinct) ? '('.$this->quote($distinct).')' : '');
38 38
     }
39 39
 }
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/Postgres/PostgresDriver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     public function getPrimary($table)
118 118
     {
119 119
         if (!empty($this->memory) && empty($this->primaryKeys)) {
120
-            $this->primaryKeys = (array)$this->memory->loadData($this->getSource() . '-primary');
120
+            $this->primaryKeys = (array)$this->memory->loadData($this->getSource().'-primary');
121 121
         }
122 122
 
123 123
         if (!empty($this->primaryKeys) && array_key_exists($table, $this->primaryKeys)) {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
         //Caching
142 142
         if (!empty($this->memory)) {
143
-            $this->memory->saveData($this->getSource() . '-primary', $this->primaryKeys);
143
+            $this->memory->saveData($this->getSource().'-primary', $this->primaryKeys);
144 144
         }
145 145
 
146 146
         return $this->primaryKeys[$table];
Please login to merge, or discard this patch.