Total Complexity | 3 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
28 | class DynamicReference implements ReferenceInterface |
||
29 | { |
||
30 | private DefinitionInterface $definition; |
||
31 | |||
32 | /** |
||
33 | * @param mixed $definition |
||
34 | */ |
||
35 | 5 | private function __construct($definition) |
|
36 | { |
||
37 | 5 | $this->definition = Normalizer::normalize($definition); |
|
38 | 5 | } |
|
39 | |||
40 | /** |
||
41 | * @param mixed $definition |
||
42 | * |
||
43 | * @return ReferenceInterface |
||
44 | * |
||
45 | * {@see Normalizer} |
||
46 | */ |
||
47 | 5 | public static function to($definition): ReferenceInterface |
|
48 | { |
||
49 | 5 | return new self($definition); |
|
50 | } |
||
51 | |||
52 | 5 | public function resolve(ContainerInterface $container) |
|
55 | } |
||
56 | } |
||
57 |