| Conditions | 6 |
| Paths | 6 |
| Total Lines | 24 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 12.7161 |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | 8 | private function determineType($value): string |
|
| 47 | { |
||
| 48 | $type = gettype($value); |
||
| 49 | 8 | ||
| 50 | 8 | switch ($type) { |
|
| 51 | case 'object': |
||
| 52 | return get_class($value); |
||
| 53 | |||
| 54 | case 'integer': |
||
| 55 | return 'int'; |
||
| 56 | |||
| 57 | case 'boolean': |
||
| 58 | return 'bool'; |
||
| 59 | |||
| 60 | case 'NULL': |
||
| 61 | return 'null'; |
||
| 62 | |||
| 63 | case 'double': |
||
| 64 | return 'float'; |
||
| 65 | |||
| 66 | default: |
||
| 67 | return $type; |
||
| 68 | } |
||
| 69 | } |
||
| 70 | } |
||
| 71 |