Failed Conditions
Pull Request — new-parser-ast-metadata (#2)
by
unknown
02:08
created

AnnotationWithVarTypeMetadata   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 42
dl 0
loc 57
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 55 1
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\Tests\Annotations\Fixtures\AnnotationTargetAll;
19
use Doctrine\Tests\Annotations\Fixtures\AnnotationWithVarType;
20
21
final class AnnotationWithVarTypeMetadata
22
{
23
    public static function get(): AnnotationMetadata
24
    {
25
        return new AnnotationMetadata(
26
            AnnotationWithVarType::class,
27
            new AnnotationTarget(AnnotationTarget::TARGET_ALL),
28
            false,
29
            [
30
                new PropertyMetadata(
31
                    'mixed',
32
                    new MixedType(),
33
                    true
34
                ),
35
                new PropertyMetadata(
36
                    'boolean',
37
                    new BooleanType()
38
                ),
39
                new PropertyMetadata(
40
                    'bool',
41
                    new BooleanType()
42
                ),
43
                new PropertyMetadata(
44
                    'float',
45
                    new FloatType()
46
                ),
47
                new PropertyMetadata(
48
                    'string',
49
                    new StringType()
50
                ),
51
                new PropertyMetadata(
52
                    'integer',
53
                    new IntegerType()
54
                ),
55
                new PropertyMetadata(
56
                    'array',
57
                    new ListType(new MixedType())
58
                ),
59
                new PropertyMetadata(
60
                    'arrayMap',
61
                    new MapType(new StringType(), new MixedType())
62
                ),
63
                new PropertyMetadata(
64
                    'annotation',
65
                    new ObjectType(AnnotationTargetAll::class)
66
                ),
67
                new PropertyMetadata(
68
                    'arrayOfIntegers',
69
                    new ListType(new IntegerType())
70
                ),
71
                new PropertyMetadata(
72
                    'arrayOfStrings',
73
                    new ListType(new StringType())
74
                ),
75
                new PropertyMetadata(
76
                    'arrayOfAnnotations',
77
                    new ListType(new ObjectType(AnnotationTargetAll::class))
78
                ),
79
            ]
80
        );
81
    }
82
}
83