| Conditions | 4 |
| Paths | 4 |
| Total Lines | 25 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | public function getTypeAndOptions($doctrineType) |
||
| 9 | { |
||
| 10 | $fieldOptions = []; |
||
| 11 | |||
| 12 | if ($doctrineType == 'string') { |
||
| 13 | $fieldOptions = [ |
||
| 14 | 'type' => 'string', |
||
| 15 | 'options' => [ |
||
| 16 | |||
| 17 | 'length' => 100 |
||
| 18 | ] |
||
| 19 | ]; |
||
| 20 | } else if ($doctrineType == 'boolean') { |
||
| 21 | $fieldOptions = [ |
||
| 22 | 'type' => 'boolean', |
||
| 23 | 'options' => [] |
||
| 24 | ]; |
||
| 25 | } else if ($doctrineType == 'datetime') { |
||
| 26 | $fieldOptions = [ |
||
| 27 | 'type' => 'date', |
||
| 28 | 'options' => [] |
||
| 29 | ]; |
||
| 30 | } |
||
| 31 | return $fieldOptions; |
||
| 32 | } |
||
| 33 | } |
||
| 34 |