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