Passed
Pull Request — master (#1939)
by
unknown
02:54
created
src/Phinx/Db/Adapter/SQLiteAdapter.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -370,8 +370,8 @@  discard block
 block discarded – undo
370 370
             // Handle id => "field_name" to support AUTO_INCREMENT
371 371
             $column = new Column();
372 372
             $column->setName($options['id'])
373
-                   ->setType('integer')
374
-                   ->setOptions(['identity' => true]);
373
+                    ->setType('integer')
374
+                    ->setOptions(['identity' => true]);
375 375
 
376 376
             array_unshift($columns, $column);
377 377
         }
@@ -651,12 +651,12 @@  discard block
 block discarded – undo
651 651
             $default = $this->parseDefaultValue($columnInfo['dflt_value'], $type['name']);
652 652
 
653 653
             $column->setName($columnInfo['name'])
654
-                   ->setNull($columnInfo['notnull'] !== '1')
655
-                   ->setDefault($default)
656
-                   ->setType($type['name'])
657
-                   ->setLimit($type['limit'])
658
-                   ->setScale($type['scale'])
659
-                   ->setIdentity($columnInfo['name'] === $identity);
654
+                    ->setNull($columnInfo['notnull'] !== '1')
655
+                    ->setDefault($default)
656
+                    ->setType($type['name'])
657
+                    ->setLimit($type['limit'])
658
+                    ->setScale($type['scale'])
659
+                    ->setIdentity($columnInfo['name'] === $identity);
660 660
 
661 661
             $columns[] = $column;
662 662
         }
Please login to merge, or discard this patch.
src/Phinx/Db/Adapter/PostgresAdapter.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         $options = $table->getOptions();
202 202
         $parts = $this->getSchemaName($table->getName());
203 203
 
204
-         // Add the default primary key
204
+            // Add the default primary key
205 205
         if (!isset($options['id']) || (isset($options['id']) && $options['id'] === true)) {
206 206
             $options['id'] = 'id';
207 207
         }
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
             // Handle id => "field_name" to support AUTO_INCREMENT
211 211
             $column = new Column();
212 212
             $column->setName($options['id'])
213
-                   ->setType('integer')
214
-                   ->setOptions(['identity' => true]);
213
+                    ->setType('integer')
214
+                    ->setOptions(['identity' => true]);
215 215
 
216 216
             array_unshift($columns, $column);
217 217
             if (isset($options['primary_key']) && (array)$options['id'] !== (array)$options['primary_key']) {
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
             }
235 235
         }
236 236
 
237
-         // set the primary key(s)
237
+            // set the primary key(s)
238 238
         if (isset($options['primary_key'])) {
239 239
             $sql = rtrim($sql);
240 240
             $sql .= sprintf(' CONSTRAINT %s PRIMARY KEY (', $this->quoteColumnName($parts['table'] . '_pkey'));
@@ -429,11 +429,11 @@  discard block
 block discarded – undo
429 429
 
430 430
             $column = new Column();
431 431
             $column->setName($columnInfo['column_name'])
432
-                   ->setType($columnType)
433
-                   ->setNull($columnInfo['is_nullable'] === 'YES')
434
-                   ->setDefault($columnDefault)
435
-                   ->setIdentity($columnInfo['is_identity'] === 'YES')
436
-                   ->setScale($columnInfo['numeric_scale']);
432
+                    ->setType($columnType)
433
+                    ->setNull($columnInfo['is_nullable'] === 'YES')
434
+                    ->setDefault($columnDefault)
435
+                    ->setIdentity($columnInfo['is_identity'] === 'YES')
436
+                    ->setScale($columnInfo['numeric_scale']);
437 437
 
438 438
             if (preg_match('/\bwith time zone$/', $columnInfo['data_type'])) {
439 439
                 $column->setTimezone(true);
Please login to merge, or discard this patch.
src/Phinx/Db/Adapter/MysqlAdapter.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -267,11 +267,11 @@  discard block
 block discarded – undo
267 267
             // Handle id => "field_name" to support AUTO_INCREMENT
268 268
             $column = new Column();
269 269
             $column->setName($options['id'])
270
-                   ->setType('integer')
271
-                   ->setOptions([
272
-                       'signed' => $options['signed'] ?? false,
273
-                       'identity' => true,
274
-                   ]);
270
+                    ->setType('integer')
271
+                    ->setOptions([
272
+                        'signed' => $options['signed'] ?? false,
273
+                        'identity' => true,
274
+                    ]);
275 275
 
276 276
             array_unshift($columns, $column);
277 277
             if (isset($options['primary_key']) && (array)$options['id'] !== (array)$options['primary_key']) {
@@ -442,12 +442,12 @@  discard block
 block discarded – undo
442 442
 
443 443
             $column = new Column();
444 444
             $column->setName($columnInfo['Field'])
445
-                   ->setNull($columnInfo['Null'] !== 'NO')
446
-                   ->setDefault($columnInfo['Default'])
447
-                   ->setType($phinxType['name'])
448
-                   ->setSigned(strpos($columnInfo['Type'], 'unsigned') === false)
449
-                   ->setLimit($phinxType['limit'])
450
-                   ->setScale($phinxType['scale']);
445
+                    ->setNull($columnInfo['Null'] !== 'NO')
446
+                    ->setDefault($columnInfo['Default'])
447
+                    ->setType($phinxType['name'])
448
+                    ->setSigned(strpos($columnInfo['Type'], 'unsigned') === false)
449
+                    ->setLimit($phinxType['limit'])
450
+                    ->setScale($phinxType['scale']);
451 451
 
452 452
             if ($columnInfo['Extra'] === 'auto_increment') {
453 453
                 $column->setIdentity(true);
Please login to merge, or discard this patch.
src/Phinx/Db/Adapter/SqlServerAdapter.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
             // Handle id => "field_name" to support AUTO_INCREMENT
236 236
             $column = new Column();
237 237
             $column->setName($options['id'])
238
-                   ->setType('integer')
239
-                   ->setOptions(['identity' => true]);
238
+                    ->setType('integer')
239
+                    ->setOptions(['identity' => true]);
240 240
 
241 241
             array_unshift($columns, $column);
242 242
             if (isset($options['primary_key']) && (array)$options['id'] !== (array)$options['primary_key']) {
@@ -465,11 +465,11 @@  discard block
 block discarded – undo
465 465
 
466 466
             $column = new Column();
467 467
             $column->setName($columnInfo['name'])
468
-                   ->setType($type)
469
-                   ->setNull($columnInfo['null'] !== 'NO')
470
-                   ->setDefault($this->parseDefault($columnInfo['default']))
471
-                   ->setIdentity($columnInfo['identity'] === '1')
472
-                   ->setComment($this->getColumnComment($columnInfo['table_name'], $columnInfo['name']));
468
+                    ->setType($type)
469
+                    ->setNull($columnInfo['null'] !== 'NO')
470
+                    ->setDefault($this->parseDefault($columnInfo['default']))
471
+                    ->setIdentity($columnInfo['identity'] === '1')
472
+                    ->setComment($this->getColumnComment($columnInfo['table_name'], $columnInfo['name']));
473 473
 
474 474
             if (!empty($columnInfo['char_length'])) {
475 475
                 $column->setLimit($columnInfo['char_length']);
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
 
792 792
         foreach ($indexes as $name => $index) {
793 793
             if ($name === $indexName) {
794
-                 return true;
794
+                    return true;
795 795
             }
796 796
         }
797 797
 
Please login to merge, or discard this patch.