Conditions | 8 |
Paths | 8 |
Total Lines | 21 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 8.512 |
Changes | 4 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
6 | 4 | public function mapDataTypes($nativeType) |
|
7 | { |
||
8 | switch($nativeType) |
||
9 | { |
||
10 | 4 | case 'int': |
|
11 | 4 | return 'integer'; |
|
12 | 4 | case 'varchar': |
|
13 | 4 | return 'string'; |
|
14 | 4 | case 'tinyint': |
|
15 | 2 | return 'boolean'; |
|
16 | 4 | case 'timestamp': |
|
17 | 2 | case 'datetime': |
|
18 | 2 | 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 |