Completed
Branch feature/pre-split (58adfb)
by Anton
08:24
created
source/Spiral/Database/Drivers/SQLServer/Schemas/ColumnSchema.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
                 }
236 236
 
237 237
                 $type = "ALTER COLUMN {$this->getName(true)} varchar($enumSize)";
238
-                $operations[] = $type . ' ' . ($this->nullable ? 'NULL' : 'NOT NULL');
238
+                $operations[] = $type.' '.($this->nullable ? 'NULL' : 'NOT NULL');
239 239
             } else {
240 240
                 $type = "ALTER COLUMN {$this->getName(true)} {$this->type}";
241 241
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
                     $type .= "($this->precision, $this->scale)";
248 248
                 }
249 249
 
250
-                $operations[] = $type . ' ' . ($this->nullable ? 'NULL' : 'NOT NULL');
250
+                $operations[] = $type.' '.($this->nullable ? 'NULL' : 'NOT NULL');
251 251
             }
252 252
         }
253 253
 
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 
434 434
             //We made some assumptions here...
435 435
             if (preg_match_all(
436
-                '/' . $name . '=[\']?([^\']+)[\']?/i',
436
+                '/'.$name.'=[\']?([^\']+)[\']?/i',
437 437
                 $checkConstraint['definition'],
438 438
                 $matches
439 439
             )) {
@@ -453,6 +453,6 @@  discard block
 block discarded – undo
453 453
      */
454 454
     private function generateName($type)
455 455
     {
456
-        return $this->table->getName() . '_' . $this->getName() . "_{$type}_" . uniqid();
456
+        return $this->table->getName().'_'.$this->getName()."_{$type}_".uniqid();
457 457
     }
458 458
 }
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/Postgres/PostgresInsertQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             );
38 38
         }
39 39
 
40
-        if ($primary = $driver->getPrimary($this->database->getPrefix() . $this->table)) {
40
+        if ($primary = $driver->getPrimary($this->database->getPrefix().$this->table)) {
41 41
             $this->logger()->debug(
42 42
                 "Primary key '{sequence}' automatically resolved for table '{table}'.",
43 43
                 [
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/Postgres/Schemas/ColumnSchema.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         }
197 197
 
198 198
         return "$statement CONSTRAINT {$this->enumConstraint(true, true)} "
199
-        . "CHECK ({$this->getName(true)} IN (" . implode(', ', $enumValues) . '))';
199
+        . "CHECK ({$this->getName(true)} IN (".implode(', ', $enumValues).'))';
200 200
     }
201 201
 
202 202
     /**
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         }
241 241
 
242 242
         if ($original->abstractType() == 'enum' && !empty($this->enumConstraint)) {
243
-            $operations[] = 'DROP CONSTRAINT ' . $this->enumConstraint(true);
243
+            $operations[] = 'DROP CONSTRAINT '.$this->enumConstraint(true);
244 244
         }
245 245
 
246 246
         if ($original->defaultValue != $this->defaultValue) {
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 
254 254
         if ($original->nullable != $this->nullable) {
255 255
             $operations[] = "ALTER COLUMN {$this->getName(true)} "
256
-                . (!$this->nullable ? 'SET' : 'DROP') . ' NOT NULL';
256
+                . (!$this->nullable ? 'SET' : 'DROP').' NOT NULL';
257 257
         }
258 258
 
259 259
         if ($this->abstractType() == 'enum') {
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
             }
264 264
 
265 265
             $operations[] = "ADD CONSTRAINT {$this->enumConstraint(true)} "
266
-                . "CHECK ({$this->getName(true)} IN (" . implode(', ', $enumValues) . '))';
266
+                . "CHECK ({$this->getName(true)} IN (".implode(', ', $enumValues).'))';
267 267
         }
268 268
 
269 269
         return $operations;
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
      */
328 328
     protected function prepareEnum()
329 329
     {
330
-        return '(' . $this->size . ')';
330
+        return '('.$this->size.')';
331 331
     }
332 332
 
333 333
     /**
@@ -343,10 +343,10 @@  discard block
 block discarded – undo
343 343
     {
344 344
         if (empty($this->enumConstraint)) {
345 345
             if ($temporary) {
346
-                return $this->table->getName() . '_' . $this->getName() . '_enum';
346
+                return $this->table->getName().'_'.$this->getName().'_enum';
347 347
             }
348 348
 
349
-            $this->enumConstraint = $this->table->getName() . '_' . $this->getName() . '_enum_' . uniqid();
349
+            $this->enumConstraint = $this->table->getName().'_'.$this->getName().'_enum_'.uniqid();
350 350
         }
351 351
 
352 352
         return $quote ? $this->table->driver()->identifier($this->enumConstraint) : $this->enumConstraint;
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
     private function resolveNativeEnum()
378 378
     {
379 379
         $range = $this->table->driver()->query(
380
-            'SELECT enum_range(NULL::' . $this->type . ')'
380
+            'SELECT enum_range(NULL::'.$this->type.')'
381 381
         )->fetchColumn(0);
382 382
 
383 383
         $this->enumValues = explode(',', substr($range, 1, -1));
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
             . "WHERE conrelid = ? AND contype = 'c' AND (consrc LIKE ? OR consrc LIKE ?)";
404 404
 
405 405
         $constraints = $this->table->driver()->query(
406
-            $query, [$tableOID, '(' . $this->name . '%', '("' . $this->name . '%']
406
+            $query, [$tableOID, '('.$this->name.'%', '("'.$this->name.'%']
407 407
         );
408 408
 
409 409
         foreach ($constraints as $constraint) {
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/Postgres/QueryCompiler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             $table,
25 25
             $columns,
26 26
             $rowsets
27
-        ) . (!empty($primaryKey) ? ' RETURNING ' . $this->quote($primaryKey) : '');
27
+        ).(!empty($primaryKey) ? ' RETURNING '.$this->quote($primaryKey) : '');
28 28
     }
29 29
 
30 30
     /**
@@ -36,6 +36,6 @@  discard block
 block discarded – undo
36 36
             return '';
37 37
         }
38 38
 
39
-        return 'DISTINCT' . (is_string($distinct) ? '(' . $this->quote($distinct) . ')' : '');
39
+        return 'DISTINCT'.(is_string($distinct) ? '('.$this->quote($distinct).')' : '');
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/Schemas/ColumnSchema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $enumValues[] = $this->table->driver()->getPDO()->quote($value);
117 117
         }
118 118
 
119
-        return "$statement CHECK ({$this->getName(true)} IN (" . implode(', ', $enumValues) . '))';
119
+        return "$statement CHECK ({$this->getName(true)} IN (".implode(', ', $enumValues).'))';
120 120
     }
121 121
 
122 122
     /**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
             }
169 169
         }
170 170
 
171
-        $options = array_map(function ($value) {
171
+        $options = array_map(function($value) {
172 172
             return intval($value);
173 173
         }, explode(',', $options));
174 174
 
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/QueryCompiler.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/Cache/Stores/FileStore.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,6 +176,6 @@
 block discarded – undo
176 176
      */
177 177
     protected function makeFilename($name)
178 178
     {
179
-        return $this->directory . md5($name) . '.' . $this->extension;
179
+        return $this->directory.md5($name).'.'.$this->extension;
180 180
     }
181 181
 }
Please login to merge, or discard this patch.
source/Spiral/Debug/Dumper.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
         if (!$hideHeader && !empty($name)) {
131 131
             //Showing element name (if any provided)
132
-            $header = $indent . $this->style->style($name, 'name');
132
+            $header = $indent.$this->style->style($name, 'name');
133 133
 
134 134
             //Showing equal sing
135 135
             $header .= $this->style->style(' = ', 'syntax', '=');
@@ -139,24 +139,24 @@  discard block
 block discarded – undo
139 139
 
140 140
         if ($level > $this->maxLevel) {
141 141
             //Dumper is not reference based, we can't dump too deep values
142
-            return $indent . $this->style->style('-too deep-', 'maxLevel') . "\n";
142
+            return $indent.$this->style->style('-too deep-', 'maxLevel')."\n";
143 143
         }
144 144
 
145 145
         $type = strtolower(gettype($value));
146 146
 
147 147
         if ($type == 'array') {
148
-            return $header . $this->dumpArray($value, $level, $hideHeader);
148
+            return $header.$this->dumpArray($value, $level, $hideHeader);
149 149
         }
150 150
 
151 151
         if ($type == 'object') {
152
-            return $header . $this->dumpObject($value, $level, $hideHeader);
152
+            return $header.$this->dumpObject($value, $level, $hideHeader);
153 153
         }
154 154
 
155 155
         if ($type == 'resource') {
156 156
             //No need to dump resource value
157
-            $element = get_resource_type($value) . ' resource ';
157
+            $element = get_resource_type($value).' resource ';
158 158
 
159
-            return $header . $this->style->style($element, 'type', 'resource') . "\n";
159
+            return $header.$this->style->style($element, 'type', 'resource')."\n";
160 160
         }
161 161
 
162 162
         //Value length
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         }
184 184
 
185 185
         //Including value
186
-        return $header . ' ' . $this->style->style($element, 'value', $type) . "\n";
186
+        return $header.' '.$this->style->style($element, 'value', $type)."\n";
187 187
     }
188 188
 
189 189
     /**
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
             $count = count($array);
202 202
 
203 203
             //Array size and scope
204
-            $output = $this->style->style("array({$count})", 'type', 'array') . "\n";
205
-            $output .= $indent . $this->style->style('[', 'syntax', '[') . "\n";
204
+            $output = $this->style->style("array({$count})", 'type', 'array')."\n";
205
+            $output .= $indent.$this->style->style('[', 'syntax', '[')."\n";
206 206
         } else {
207 207
             $output = '';
208 208
         }
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
         if (!$hideHeader) {
223 223
             //Closing array scope
224
-            $output .= $indent . $this->style->style(']', 'syntax', ']') . "\n";
224
+            $output .= $indent.$this->style->style(']', 'syntax', ']')."\n";
225 225
         }
226 226
 
227 227
         return $output;
@@ -240,10 +240,10 @@  discard block
 block discarded – undo
240 240
         $indent = $this->style->indent($level);
241 241
 
242 242
         if (!$hideHeader) {
243
-            $type = ($class ?: get_class($object)) . ' object ';
243
+            $type = ($class ?: get_class($object)).' object ';
244 244
 
245
-            $header = $this->style->style($type, 'type', 'object') . "\n";
246
-            $header .= $indent . $this->style->style('(', 'syntax', '(') . "\n";
245
+            $header = $this->style->style($type, 'type', 'object')."\n";
246
+            $header .= $indent.$this->style->style('(', 'syntax', '(')."\n";
247 247
         } else {
248 248
             $header = '';
249 249
         }
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 
265 265
             return $header
266 266
             . $this->dumpValue($debugInfo, '', $level + (is_scalar($object)), true)
267
-            . $indent . $this->style->style(')', 'syntax', ')') . "\n";
267
+            . $indent.$this->style->style(')', 'syntax', ')')."\n";
268 268
         }
269 269
 
270 270
         if ($object instanceof \Closure) {
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         }
281 281
 
282 282
         //Header, content, footer
283
-        return $header . $output . $indent . $this->style->style(')', 'syntax', ')') . "\n";
283
+        return $header.$output.$indent.$this->style->style(')', 'syntax', ')')."\n";
284 284
     }
285 285
 
286 286
     /**
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         }
317 317
 
318 318
         //Property name includes access level
319
-        $name = $property->getName() . $this->style->style(':' . $access, 'access', $access);
319
+        $name = $property->getName().$this->style->style(':'.$access, 'access', $access);
320 320
 
321 321
         return $this->dumpValue($property->getValue($object), $name, $level + 1);
322 322
     }
Please login to merge, or discard this patch.