Conditions | 3 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public static function compile(Grammar $grammar, Blueprint $blueprint, array $columns, array $commands = []): string |
||
17 | { |
||
18 | $compiledCommand = sprintf( |
||
19 | '%s table %s %s (%s)', |
||
20 | $blueprint->temporary ? 'create temporary' : 'create', |
||
21 | self::beforeTable($commands['ifNotExists']), |
||
22 | $grammar->wrapTable($blueprint), |
||
23 | $commands['like'] |
||
24 | ? self::compileLike($grammar, $commands['like']) |
||
25 | : self::compileColumns($columns) |
||
26 | ); |
||
27 | |||
28 | return str_replace(' ', ' ', trim($compiledCommand)); |
||
29 | } |
||
51 |