Conditions | 4 |
Paths | 8 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function makeField(string $tableName, array $field, Column $column): array |
||
26 | { |
||
27 | if (isset(FieldGenerator::$fieldTypeMap[$field['type']])) { |
||
28 | $field['type'] = FieldGenerator::$fieldTypeMap[$field['type']]; |
||
29 | } |
||
30 | |||
31 | $charset = $this->charsetModifier->generate($tableName, $column); |
||
32 | if ($charset !== '') { |
||
33 | $field['decorators'][] = $charset; |
||
34 | } |
||
35 | |||
36 | $collation = $this->collationModifier->generate($tableName, $column); |
||
37 | if ($collation !== '') { |
||
38 | $field['decorators'][] = $collation; |
||
39 | } |
||
40 | |||
41 | return $field; |
||
42 | } |
||
44 |