Total Complexity | 3 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | final class ValueDefinition implements DefinitionInterface |
||
14 | { |
||
15 | /** |
||
16 | * @param mixed $value Value to be returned on resolving. |
||
17 | * @param string|null $type Value type. |
||
18 | */ |
||
19 | 35 | public function __construct( |
|
20 | private mixed $value, |
||
21 | private ?string $type = null |
||
22 | ) { |
||
23 | 35 | } |
|
24 | |||
25 | /** |
||
26 | * Get type of the value. |
||
27 | * |
||
28 | * @return string|null Value type. |
||
29 | */ |
||
30 | 1 | public function getType(): ?string |
|
33 | } |
||
34 | |||
35 | 29 | public function resolve(ContainerInterface $container): mixed |
|
38 | } |
||
39 | } |
||
40 |