|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Doctrine\Tests\Annotations\Fixtures\Metadata; |
|
6
|
|
|
|
|
7
|
|
|
use Doctrine\Annotations\Metadata\AnnotationMetadata; |
|
8
|
|
|
use Doctrine\Annotations\Metadata\AnnotationTarget; |
|
9
|
|
|
use Doctrine\Annotations\Metadata\PropertyMetadata; |
|
10
|
|
|
use Doctrine\Annotations\Metadata\Type\BooleanType; |
|
11
|
|
|
use Doctrine\Annotations\Metadata\Type\FloatType; |
|
12
|
|
|
use Doctrine\Annotations\Metadata\Type\IntegerType; |
|
13
|
|
|
use Doctrine\Annotations\Metadata\Type\ListType; |
|
14
|
|
|
use Doctrine\Annotations\Metadata\Type\MapType; |
|
15
|
|
|
use Doctrine\Annotations\Metadata\Type\MixedType; |
|
16
|
|
|
use Doctrine\Annotations\Metadata\Type\ObjectType; |
|
17
|
|
|
use Doctrine\Annotations\Metadata\Type\StringType; |
|
18
|
|
|
use Doctrine\Annotations\Metadata\Type\UnionType; |
|
19
|
|
|
use Doctrine\Tests\Annotations\Fixtures\AnnotationTargetAll; |
|
20
|
|
|
use Doctrine\Tests\Annotations\Fixtures\AnnotationWithVarType; |
|
21
|
|
|
|
|
22
|
|
|
final class AnnotationWithVarTypeMetadata |
|
23
|
|
|
{ |
|
24
|
|
|
public static function get(): AnnotationMetadata |
|
25
|
|
|
{ |
|
26
|
|
|
return new AnnotationMetadata( |
|
27
|
|
|
AnnotationWithVarType::class, |
|
28
|
|
|
new AnnotationTarget(AnnotationTarget::TARGET_ALL), |
|
29
|
|
|
false, |
|
30
|
|
|
[ |
|
31
|
|
|
new PropertyMetadata( |
|
32
|
|
|
'mixed', |
|
33
|
|
|
new MixedType(), |
|
34
|
|
|
true |
|
35
|
|
|
), |
|
36
|
|
|
new PropertyMetadata( |
|
37
|
|
|
'boolean', |
|
38
|
|
|
new BooleanType() |
|
39
|
|
|
), |
|
40
|
|
|
new PropertyMetadata( |
|
41
|
|
|
'bool', |
|
42
|
|
|
new BooleanType() |
|
43
|
|
|
), |
|
44
|
|
|
new PropertyMetadata( |
|
45
|
|
|
'float', |
|
46
|
|
|
new FloatType() |
|
47
|
|
|
), |
|
48
|
|
|
new PropertyMetadata( |
|
49
|
|
|
'string', |
|
50
|
|
|
new StringType() |
|
51
|
|
|
), |
|
52
|
|
|
new PropertyMetadata( |
|
53
|
|
|
'integer', |
|
54
|
|
|
new IntegerType() |
|
55
|
|
|
), |
|
56
|
|
|
new PropertyMetadata( |
|
57
|
|
|
'array', |
|
58
|
|
|
new MapType(new UnionType(new IntegerType(), new StringType()), new MixedType()) |
|
59
|
|
|
), |
|
60
|
|
|
new PropertyMetadata( |
|
61
|
|
|
'arrayMap', |
|
62
|
|
|
new MapType(new StringType(), new MixedType()) |
|
63
|
|
|
), |
|
64
|
|
|
new PropertyMetadata( |
|
65
|
|
|
'annotation', |
|
66
|
|
|
new ObjectType(AnnotationTargetAll::class) |
|
67
|
|
|
), |
|
68
|
|
|
new PropertyMetadata( |
|
69
|
|
|
'arrayOfIntegers', |
|
70
|
|
|
new ListType(new IntegerType()) |
|
71
|
|
|
), |
|
72
|
|
|
new PropertyMetadata( |
|
73
|
|
|
'arrayOfStrings', |
|
74
|
|
|
new ListType(new StringType()) |
|
75
|
|
|
), |
|
76
|
|
|
new PropertyMetadata( |
|
77
|
|
|
'arrayOfAnnotations', |
|
78
|
|
|
new ListType(new ObjectType(AnnotationTargetAll::class)) |
|
79
|
|
|
), |
|
80
|
|
|
] |
|
81
|
|
|
); |
|
82
|
|
|
} |
|
83
|
|
|
} |
|
84
|
|
|
|