| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | trait DefaultValueTrait |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var ValueNodeInterface|SerializationInterface|null |
||
| 12 | */ |
||
| 13 | protected $defaultValue; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @return bool |
||
| 17 | */ |
||
| 18 | public function hasDefaultValue(): bool |
||
| 19 | { |
||
| 20 | return null !== $this->defaultValue; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @return ValueNodeInterface|SerializationInterface|null |
||
| 25 | */ |
||
| 26 | public function getDefaultValue(): ?ValueNodeInterface |
||
| 27 | { |
||
| 28 | return $this->defaultValue; |
||
|
|
|||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return array |
||
| 33 | */ |
||
| 34 | public function getDefaultValueAsArray(): ?array |
||
| 37 | } |
||
| 38 | } |
||
| 39 |