| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 6.4624 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 2 | public function getItemType() |
|
| 44 | { |
||
| 45 | 2 | if (!preg_match('/array\<(.+)\>/i', $this->serializerType, $matches)) { |
|
| 46 | 2 | return $this->serializerType; |
|
| 47 | } |
||
| 48 | |||
| 49 | $map = [ |
||
| 50 | 'DateTime' => 'date', |
||
| 51 | 'integer' => 'int', |
||
| 52 | 'float' => 'float', |
||
| 53 | 'double' => 'float', |
||
| 54 | 'boolean' => 'boolean', |
||
| 55 | 'extref' => 'extref', |
||
| 56 | ]; |
||
| 57 | return isset($map[$matches[1]]) ? $map[$matches[1]] : $matches[1]; |
||
| 58 | } |
||
| 59 | } |
||
| 60 |