| Total Complexity | 8 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 83.33% |
| Changes | 1 | ||
| Bugs | 0 | Features | 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 | /** |
||
| 24 | * @param mixed $value |
||
| 25 | */ |
||
| 26 | 6 | public function __construct(ReflectionParameter $parameter, string $type = null) |
|
| 27 | { |
||
| 28 | 6 | $this->parameter = $parameter; |
|
| 29 | 6 | $this->type = $type; |
|
| 30 | 6 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @param mixed $value |
||
| 34 | */ |
||
| 35 | 6 | public function setValue($value): void |
|
| 39 | 6 | } |
|
| 40 | |||
| 41 | 32 | public function getParameter(): ReflectionParameter |
|
| 42 | { |
||
| 43 | 32 | return $this->parameter; |
|
| 44 | } |
||
| 45 | |||
| 46 | 28 | public function hasValue(): bool |
|
| 47 | { |
||
| 48 | 28 | return $this->hasValue; |
|
| 49 | } |
||
| 50 | |||
| 51 | public function getType(): ?string |
||
| 54 | } |
||
| 55 | |||
| 56 | 28 | public function resolve(ContainerInterface $container) |
|
| 57 | { |
||
| 65 |