Total Complexity | 5 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class InputObjectField extends AbstractInputObjectField implements DefaultValueAwareInterface |
||
10 | { |
||
11 | private readonly mixed $defaultValue; |
||
12 | |||
13 | 5 | public function __construct( |
|
14 | string $name, |
||
15 | string $type, |
||
16 | int $mode = 0, |
||
17 | ?string $description = null, |
||
18 | ?string $deprecationReason = null, |
||
19 | mixed $defaultValue = null, |
||
20 | ) { |
||
21 | 5 | parent::__construct($name, $type, $mode, $description, $deprecationReason); |
|
22 | |||
23 | 5 | if (func_num_args() >= 6) { |
|
24 | 1 | $this->defaultValue = $defaultValue; |
|
|
|||
25 | } |
||
26 | } |
||
27 | |||
28 | 6 | public function hasDefaultValue(): bool |
|
32 | } |
||
33 | |||
34 | 1 | public function getDefaultValue(): mixed |
|
39 |