| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function getObjectMapping(string $class): DenormalizationObjectMappingInterface |
||
| 46 | { |
||
| 47 | $reflectionClass = new \ReflectionClass($class); |
||
| 48 | |||
| 49 | if (in_array(Proxy::class, $reflectionClass->getInterfaceNames(), true)) { |
||
| 50 | $class = ($reflectionClass->getParentClass())->name; |
||
| 51 | } |
||
| 52 | |||
| 53 | if (isset($this->objectMappings[$class])) { |
||
| 54 | return $this->objectMappings[$class]; |
||
| 55 | } |
||
| 56 | |||
| 57 | throw DeserializerLogicException::createMissingMapping($class); |
||
| 58 | } |
||
| 59 | } |
||
| 60 |