Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | abstract class AbstractGeneratorDTO |
||
13 | { |
||
14 | #[Required(message: 'A code template must be selected.')] |
||
15 | #[Callback(['validateTemplate'])] |
||
16 | private $template = []; |
||
|
|||
17 | |||
18 | /** |
||
19 | * Validates the template selection. |
||
20 | * This method validates whether the user selects an existing template |
||
21 | * and the template contains all required template files as specified in {@see requiredTemplates()}. |
||
22 | * |
||
23 | * @param string $value |
||
24 | */ |
||
25 | public function validateTemplate(mixed $value, Callback $rule, ValidationContext $validationContext): Result |
||
48 |