| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function convert(string $dataString) |
||
| 34 | { |
||
| 35 | $unserialized = unserialize($dataString, ['allowed_classes' => false]); |
||
| 36 | if ($unserialized) { |
||
| 37 | return $unserialized; |
||
| 38 | } |
||
| 39 | |||
| 40 | $decoded = json_decode($dataString, true); |
||
| 41 | if ($decoded) { |
||
| 42 | return $decoded; |
||
| 43 | } |
||
| 44 | |||
| 45 | return false; |
||
| 46 | } |
||
| 48 |