| Total Complexity | 6 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class ObjectFactory |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Some objects conflict with PHP reserved names, use this custom mapping |
||
| 12 | * for alternative names. |
||
| 13 | */ |
||
| 14 | private const CLASS_MAPPING = [ |
||
| 15 | 'list' => ListObject::class |
||
| 16 | ]; |
||
| 17 | |||
| 18 | public function makeFromString(string $json): ObjectInterface |
||
| 27 | } |
||
| 28 | |||
| 29 | public function makeFromArray(array $data): ObjectInterface |
||
| 45 |