Total Complexity | 4 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class ErrorsGetter implements GetterInterface |
||
16 | { |
||
17 | public function getName(): string |
||
18 | { |
||
19 | return 'errors'; |
||
20 | } |
||
21 | |||
22 | public function getValue($object) |
||
23 | { |
||
24 | return $object->getErrors(); |
||
25 | } |
||
26 | |||
27 | public function toType(): ?Type |
||
28 | { |
||
29 | return new Type( |
||
30 | Type::BUILTIN_TYPE_ARRAY, |
||
31 | false, |
||
32 | null, |
||
33 | true, |
||
34 | new Type(Type::BUILTIN_TYPE_STRING), |
||
35 | new Type(Type::BUILTIN_TYPE_ARRAY) |
||
36 | ); |
||
37 | } |
||
38 | |||
39 | public function getPriority(): int |
||
42 | } |
||
43 | } |
||
44 |