Total Complexity | 8 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 83.33% |
Changes | 0 |
1 | <?php |
||
12 | class ParameterDefinition implements DefinitionInterface |
||
13 | { |
||
14 | private ReflectionParameter $parameter; |
||
15 | private bool $hasValue = false; |
||
16 | |||
17 | /** |
||
18 | * @var mixed |
||
19 | */ |
||
20 | private $value = null; |
||
21 | private ?string $type; |
||
22 | |||
23 | 6 | public function __construct(ReflectionParameter $parameter, string $type = null) |
|
24 | { |
||
25 | 6 | $this->parameter = $parameter; |
|
26 | 6 | $this->type = $type; |
|
27 | 6 | } |
|
28 | |||
29 | /** |
||
30 | * @param mixed $value |
||
31 | */ |
||
32 | 6 | public function setValue($value): void |
|
36 | 6 | } |
|
37 | |||
38 | 32 | public function getParameter(): ReflectionParameter |
|
41 | } |
||
42 | |||
43 | 28 | public function hasValue(): bool |
|
44 | { |
||
45 | 28 | return $this->hasValue; |
|
46 | } |
||
47 | |||
48 | public function getType(): ?string |
||
49 | { |
||
50 | return $this->type; |
||
51 | } |
||
52 | |||
53 | 28 | public function resolve(ContainerInterface $container) |
|
60 | } |
||
61 | } |
||
62 |