Conditions | 7 |
Paths | 7 |
Total Lines | 19 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 7.1782 |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
13 | 4 | public function mapDataTypes($nativeType) |
|
14 | { |
||
15 | switch($nativeType) |
||
16 | { |
||
17 | 4 | case 'character varying': |
|
18 | 4 | return 'string'; |
|
19 | 4 | case 'text': |
|
20 | 2 | return 'text'; |
|
21 | 4 | case 'date': |
|
22 | return 'date'; |
||
23 | 4 | case 'integer': |
|
24 | 2 | case 'boolean': |
|
25 | 4 | return $nativeType; |
|
26 | 2 | case 'timestamp without time zone': |
|
27 | 2 | return 'datetime'; |
|
28 | default: |
||
29 | throw new \Exception("Unknown type {$nativeType}"); |
||
30 | } |
||
31 | } |
||
32 | } |
||
33 |