Total Complexity | 6 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
7 | final class CallableDenormalizationObjectMapping implements DenormalizationObjectMappingInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $class; |
||
13 | |||
14 | /** |
||
15 | * @var callable |
||
16 | */ |
||
17 | private $callable; |
||
18 | |||
19 | /** |
||
20 | * @var DenormalizationObjectMappingInterface|null |
||
21 | */ |
||
22 | private $mapping; |
||
23 | |||
24 | public function __construct(string $class, callable $callable) |
||
25 | { |
||
26 | $this->class = $class; |
||
27 | $this->callable = $callable; |
||
28 | 3 | } |
|
29 | |||
30 | 3 | public function getClass(): string |
|
31 | 3 | { |
|
32 | 3 | return $this->class; |
|
33 | } |
||
34 | |||
35 | public function getDenormalizationFactory(string $path, string $type = null): callable |
||
36 | { |
||
37 | 1 | return $this->getMapping()->getDenormalizationFactory($path, $type); |
|
38 | } |
||
39 | 1 | ||
40 | /** |
||
41 | * @return DenormalizationFieldMappingInterface[] |
||
42 | */ |
||
43 | public function getDenormalizationFieldMappings(string $path, string $type = null): array |
||
46 | } |
||
47 | |||
48 | 1 | private function getMapping(): DenormalizationObjectMappingInterface |
|
56 | } |
||
57 | } |
||
58 |