Total Complexity | 3 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
36 | #[Attribute(Attribute::TARGET_PROPERTY)] |
||
37 | final class DefaultValue implements ChildBuilderAttributeInterface |
||
38 | { |
||
39 | 3 | public function __construct( |
|
40 | /** |
||
41 | * @readonly |
||
42 | */ |
||
43 | private mixed $default |
||
44 | ) { |
||
45 | 3 | } |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 1 | public function applyOnChildBuilder(AttributeForm $form, ChildBuilderInterface $builder): void |
|
51 | { |
||
52 | 1 | $builder->default($this->default); |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 2 | public function generateCodeForChildBuilder(string $name, AttributesProcessorGenerator $generator, AttributeForm $form): void |
|
61 | } |
||
62 | } |
||
63 |