| Conditions | 8 |
| Paths | 8 |
| Total Lines | 21 |
| Lines | 21 |
| Ratio | 100 % |
| Tests | 13 |
| CRAP Score | 8.4218 |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | 14 | public function mapDataTypes($nativeType) |
|
| 7 | { |
||
| 8 | 14 | switch($nativeType) |
|
| 9 | { |
||
| 10 | 14 | case 'int': |
|
| 11 | 14 | return 'integer'; |
|
| 12 | 14 | case 'varchar': |
|
| 13 | 14 | return 'string'; |
|
| 14 | 11 | case 'tinyint': |
|
| 15 | 11 | return 'boolean'; |
|
| 16 | 11 | case 'timestamp': |
|
| 17 | 2 | case 'datetime': |
|
| 18 | 11 | return 'datetime'; |
|
| 19 | 2 | case 'text': |
|
| 20 | 2 | return 'text'; |
|
| 21 | case 'date': |
||
| 22 | return 'date'; |
||
| 23 | default: |
||
| 24 | throw new \Exception("Unknown type {$nativeType}"); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | } |
||
| 28 |