| Total Complexity | 8 |
| Total Lines | 68 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | final class CallableNormalizationObjectMapping implements NormalizationObjectMappingInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $class; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var callable |
||
| 16 | */ |
||
| 17 | private $callable; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var NormalizationObjectMappingInterface|null |
||
| 21 | */ |
||
| 22 | private $mapping; |
||
| 23 | |||
| 24 | public function __construct(string $class, callable $callable) |
||
| 28 | 5 | } |
|
| 29 | |||
| 30 | 5 | public function getClass(): string |
|
| 31 | 5 | { |
|
| 32 | 5 | return $this->class; |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return string|null |
||
| 37 | 1 | */ |
|
| 38 | public function getNormalizationType() |
||
| 39 | 1 | { |
|
| 40 | return $this->getMapping()->getNormalizationType(); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return NormalizationFieldMappingInterface[] |
||
| 45 | 1 | */ |
|
| 46 | public function getNormalizationFieldMappings(string $path): array |
||
| 47 | 1 | { |
|
| 48 | return $this->getMapping()->getNormalizationFieldMappings($path); |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return NormalizationFieldMappingInterface[] |
||
| 53 | */ |
||
| 54 | public function getNormalizationEmbeddedFieldMappings(string $path): array |
||
| 55 | 1 | { |
|
| 56 | return $this->getMapping()->getNormalizationEmbeddedFieldMappings($path); |
||
| 57 | 1 | } |
|
| 58 | |||
| 59 | /** |
||
| 60 | * @return NormalizationLinkMappingInterface[] |
||
| 61 | */ |
||
| 62 | public function getNormalizationLinkMappings(string $path): array |
||
| 63 | { |
||
| 64 | return $this->getMapping()->getNormalizationLinkMappings($path); |
||
| 65 | 1 | } |
|
| 66 | |||
| 67 | 1 | private function getMapping(): NormalizationObjectMappingInterface |
|
| 75 | 1 | } |
|
| 76 | } |
||
| 77 |