Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | 12 | public static function compile( |
|
18 | Grammar $grammar, |
||
19 | Blueprint $blueprint, |
||
20 | UniqueBuilder $fluent, |
||
21 | UniquePartialBuilder $command |
||
22 | ): string { |
||
23 | 12 | $wheres = static::build($grammar, $blueprint, $command); |
|
24 | |||
25 | 12 | return sprintf( |
|
26 | 12 | 'CREATE UNIQUE INDEX %s ON %s (%s) WHERE %s', |
|
27 | 12 | $fluent->get('index'), |
|
28 | 12 | $blueprint->getTable(), |
|
29 | 12 | implode(',', (array) $fluent->get('columns')), |
|
30 | 12 | static::removeLeadingBoolean(implode(' ', $wheres)) |
|
31 | 12 | ); |
|
34 |