Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public function generate(string $tableName, Column $column): string |
||
|
|||
25 | { |
||
26 | // $setting = app(MigrationsGeneratorSetting::class); |
||
27 | // $tableCollation = $setting->getSchema()->listTableDetails($tableName)->getOptions()['collation'] ?? null; |
||
28 | |||
29 | if (app(MigrationsGeneratorSetting::class)->isUseDBCollation()) { |
||
30 | $collation = $column->getPlatformOptions()['collation'] ?? null; |
||
31 | // if (!empty($column->getPlatformOptions()['collation'])) { |
||
32 | // if ($columnCollation !== $tableCollation) { |
||
33 | if ($collation != null) { |
||
34 | return $this->decorator->decorate( |
||
35 | ColumnModifier::COLLATION, |
||
36 | [$this->decorator->columnDefaultToString($collation)] |
||
37 | ); |
||
38 | } |
||
39 | } |
||
40 | // } |
||
41 | // } |
||
42 | |||
43 | return ''; |
||
44 | } |
||
46 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.