@@ -56,7 +56,7 @@ |
||
56 | 56 | sprintf('%s %s', str_repeat('=', $maxAliasLength), str_repeat('=', $maxClassLength)), |
57 | 57 | ], |
58 | 58 | array_map( |
59 | - function ($alias, $class) use ($maxAliasLength, $maxClassLength) { |
|
59 | + function($alias, $class) use ($maxAliasLength, $maxClassLength) { |
|
60 | 60 | return sprintf('%s %s', str_pad($alias, $maxAliasLength), str_pad($class, $maxClassLength)); |
61 | 61 | }, |
62 | 62 | array_keys($aliases), |
@@ -8,8 +8,8 @@ |
||
8 | 8 | */ |
9 | 9 | return function () { |
10 | 10 | $files = [ |
11 | - __DIR__ . '/../../../autoload.php', // composer dependency |
|
12 | - __DIR__ . '/../vendor/autoload.php', // stand-alone package |
|
11 | + __DIR__ . '/../../../autoload.php', // composer dependency |
|
12 | + __DIR__ . '/../vendor/autoload.php', // stand-alone package |
|
13 | 13 | ]; |
14 | 14 | foreach ($files as $file) { |
15 | 15 | if (is_file($file)) { |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * |
7 | 7 | * @return bool |
8 | 8 | */ |
9 | -return function () { |
|
9 | +return function() { |
|
10 | 10 | $files = [ |
11 | 11 | __DIR__ . '/../../../autoload.php', // composer dependency |
12 | 12 | __DIR__ . '/../vendor/autoload.php', // stand-alone package |
@@ -267,11 +267,11 @@ discard block |
||
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 |
||
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); |
@@ -1311,7 +1311,7 @@ discard block |
||
1311 | 1311 | $def .= '(' . $sqlType['limit'] . ')'; |
1312 | 1312 | } |
1313 | 1313 | if (($values = $column->getValues()) && is_array($values)) { |
1314 | - $def .= "(" . implode(", ", array_map(function ($value) { |
|
1314 | + $def .= "(" . implode(", ", array_map(function($value) { |
|
1315 | 1315 | // we special case NULL as it's not actually allowed an enum value, |
1316 | 1316 | // and we want MySQL to issue an error on the create statement, but |
1317 | 1317 | // quote coerces it to an empty string, which will not error |
@@ -1382,7 +1382,7 @@ discard block |
||
1382 | 1382 | if (!empty($columnNames)) { |
1383 | 1383 | foreach ($columnNames as $key => $value) { |
1384 | 1384 | $loc = array_search($key, $columnNames); |
1385 | - $columnNames[$key] = is_array($order) && array_key_exists($value, $order) ? sprintf('`%s` %s', $value, $order[$value]) : sprintf('`%s`', $value); |
|
1385 | + $columnNames[$key] = is_array($order) && array_key_exists($value, $order) ? sprintf('`%s` %s', $value, $order[$value]) : sprintf('`%s`', $value); |
|
1386 | 1386 | } |
1387 | 1387 | } |
1388 | 1388 |
@@ -235,8 +235,8 @@ discard block |
||
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 |
||
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 |
||
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 |