@@ -103,7 +103,7 @@ discard block  | 
                                                    ||
| 103 | 103 | */  | 
                                                        
| 104 | 104 | public static function mapClassNameToFileName($className)  | 
                                                        
| 105 | 105 |      { | 
                                                        
| 106 | -        $snake = function ($matches) { | 
                                                        |
| 106 | +        $snake = function($matches) { | 
                                                        |
| 107 | 107 | return '_' . strtolower($matches[0]);  | 
                                                        
| 108 | 108 | };  | 
                                                        
| 109 | 109 |          $fileName = preg_replace_callback('/\d+|[A-Z]/', $snake, $className); | 
                                                        
@@ -265,7 +265,7 @@ discard block  | 
                                                    ||
| 265 | 265 | */  | 
                                                        
| 266 | 266 | public static function getFiles($paths)  | 
                                                        
| 267 | 267 |      { | 
                                                        
| 268 | -        $files = static::globAll(array_map(function ($path) { | 
                                                        |
| 268 | +        $files = static::globAll(array_map(function($path) { | 
                                                        |
| 269 | 269 | return $path . DIRECTORY_SEPARATOR . '*.php';  | 
                                                        
| 270 | 270 | }, (array)$paths));  | 
                                                        
| 271 | 271 | // glob() can return the same file multiple times  | 
                                                        
@@ -265,9 +265,9 @@ discard block  | 
                                                    ||
| 265 | 265 | // Handle id => "field_name" to support AUTO_INCREMENT  | 
                                                        
| 266 | 266 | $column = new Column();  | 
                                                        
| 267 | 267 | $column->setName($options['id'])  | 
                                                        
| 268 | -                   ->setType('integer') | 
                                                        |
| 269 | - ->setSigned($options['signed'] ?? true)  | 
                                                        |
| 270 | - ->setIdentity(true);  | 
                                                        |
| 268 | +                    ->setType('integer') | 
                                                        |
| 269 | + ->setSigned($options['signed'] ?? true)  | 
                                                        |
| 270 | + ->setIdentity(true);  | 
                                                        |
| 271 | 271 | |
| 272 | 272 |              if (isset($options['limit'])) { | 
                                                        
| 273 | 273 | $column->setLimit($options['limit']);  | 
                                                        
@@ -440,12 +440,12 @@ discard block  | 
                                                    ||
| 440 | 440 | |
| 441 | 441 | $column = new Column();  | 
                                                        
| 442 | 442 | $column->setName($columnInfo['Field'])  | 
                                                        
| 443 | - ->setNull($columnInfo['Null'] !== 'NO')  | 
                                                        |
| 444 | - ->setDefault($columnInfo['Default'])  | 
                                                        |
| 445 | - ->setType($phinxType['name'])  | 
                                                        |
| 446 | - ->setSigned(strpos($columnInfo['Type'], 'unsigned') === false)  | 
                                                        |
| 447 | - ->setLimit($phinxType['limit'])  | 
                                                        |
| 448 | - ->setScale($phinxType['scale']);  | 
                                                        |
| 443 | + ->setNull($columnInfo['Null'] !== 'NO')  | 
                                                        |
| 444 | + ->setDefault($columnInfo['Default'])  | 
                                                        |
| 445 | + ->setType($phinxType['name'])  | 
                                                        |
| 446 | + ->setSigned(strpos($columnInfo['Type'], 'unsigned') === false)  | 
                                                        |
| 447 | + ->setLimit($phinxType['limit'])  | 
                                                        |
| 448 | + ->setScale($phinxType['scale']);  | 
                                                        |
| 449 | 449 | |
| 450 | 450 |              if ($columnInfo['Extra'] === 'auto_increment') { | 
                                                        
| 451 | 451 | $column->setIdentity(true);  | 
                                                        
@@ -1303,7 +1303,7 @@ discard block  | 
                                                    ||
| 1303 | 1303 | |
| 1304 | 1304 | $values = $column->getValues();  | 
                                                        
| 1305 | 1305 |          if ($values && is_array($values)) { | 
                                                        
| 1306 | -            $def .= '(' . implode(', ', array_map(function ($value) { | 
                                                        |
| 1306 | +            $def .= '(' . implode(', ', array_map(function($value) { | 
                                                        |
| 1307 | 1307 | // we special case NULL as it's not actually allowed an enum value,  | 
                                                        
| 1308 | 1308 | // and we want MySQL to issue an error on the create statement, but  | 
                                                        
| 1309 | 1309 | // quote coerces it to an empty string, which will not error  | 
                                                        
@@ -1370,7 +1370,7 @@ discard block  | 
                                                    ||
| 1370 | 1370 | |
| 1371 | 1371 | $columnNames = $index->getColumns();  | 
                                                        
| 1372 | 1372 | $order = $index->getOrder() ?? [];  | 
                                                        
| 1373 | -        $columnNames = array_map(function ($columnName) use ($order) { | 
                                                        |
| 1373 | +        $columnNames = array_map(function($columnName) use ($order) { | 
                                                        |
| 1374 | 1374 | $ret = '`' . $columnName . '`';  | 
                                                        
| 1375 | 1375 |              if (isset($order[$columnName])) { | 
                                                        
| 1376 | 1376 | $ret .= ' ' . $order[$columnName];  | 
                                                        
@@ -533,16 +533,16 @@  | 
                                                    ||
| 533 | 533 | $updatedAt = $updatedAt ?? 'updated_at';  | 
                                                        
| 534 | 534 | |
| 535 | 535 | $this->addColumn($createdAt, 'timestamp', [  | 
                                                        
| 536 | - 'default' => 'CURRENT_TIMESTAMP',  | 
                                                        |
| 537 | - 'update' => '',  | 
                                                        |
| 538 | - 'timezone' => $withTimezone,  | 
                                                        |
| 539 | - ])  | 
                                                        |
| 540 | - ->addColumn($updatedAt, 'timestamp', [  | 
                                                        |
| 541 | - 'null' => true,  | 
                                                        |
| 542 | - 'default' => null,  | 
                                                        |
| 543 | - 'update' => 'CURRENT_TIMESTAMP',  | 
                                                        |
| 544 | - 'timezone' => $withTimezone,  | 
                                                        |
| 545 | - ]);  | 
                                                        |
| 536 | + 'default' => 'CURRENT_TIMESTAMP',  | 
                                                        |
| 537 | + 'update' => '',  | 
                                                        |
| 538 | + 'timezone' => $withTimezone,  | 
                                                        |
| 539 | + ])  | 
                                                        |
| 540 | + ->addColumn($updatedAt, 'timestamp', [  | 
                                                        |
| 541 | + 'null' => true,  | 
                                                        |
| 542 | + 'default' => null,  | 
                                                        |
| 543 | + 'update' => 'CURRENT_TIMESTAMP',  | 
                                                        |
| 544 | + 'timezone' => $withTimezone,  | 
                                                        |
| 545 | + ]);  | 
                                                        |
| 546 | 546 | |
| 547 | 547 | return $this;  | 
                                                        
| 548 | 548 | }  |