Total Complexity | 5 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | abstract class AbstractAnnotation implements AnnotationInterface |
||
16 | { |
||
17 | protected const NAME = ''; |
||
18 | protected const SCHEMA = []; |
||
19 | |||
20 | /** |
||
21 | * @inheritdoc |
||
22 | */ |
||
23 | public function getName(): string |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @inheritdoc |
||
30 | */ |
||
31 | public function getSchema(): array |
||
32 | { |
||
33 | $schema = static::SCHEMA; |
||
34 | |||
35 | array_walk_recursive($schema, function (&$v) { |
||
36 | if (is_string($v) && class_exists($v)) { |
||
37 | $v = new $v; |
||
38 | } |
||
39 | }); |
||
40 | |||
41 | return $schema; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @inheritdoc |
||
46 | */ |
||
47 | public function setAttribute(string $name, $value) |
||
50 | } |
||
51 | } |