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

AnnotationEnumMetadata   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 11
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 14 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\Assembler\Validator\Constraint\CompositeConstraint;
10
use Doctrine\Annotations\Assembler\Validator\Constraint\EnumConstraint;
11
use Doctrine\Annotations\Assembler\Validator\Constraint\TypeConstraint;
12
use Doctrine\Annotations\Metadata\PropertyMetadata;
13
use Doctrine\Annotations\Metadata\Type\IntegerType;
14
use Doctrine\Annotations\Metadata\Type\MixedType;
15
use Doctrine\Annotations\Metadata\Type\NullType;
16
use Doctrine\Annotations\Metadata\Type\UnionType;
17
use Doctrine\Tests\Annotations\Fixtures\AnnotationEnum;
18
use Doctrine\Tests\Annotations\Fixtures\AnnotationTargetAll;
19
20
final class AnnotationEnumMetadata
21
{
22
    public static function get(): AnnotationMetadata
23
    {
24
        return new AnnotationMetadata(
25
            AnnotationEnum::class,
26
            new AnnotationTarget(AnnotationTarget::TARGET_ALL),
27
            false,
28
            [
29
                new PropertyMetadata(
30
                    'value',
31
                    new MixedType(),
32
                    [
33
                        AnnotationEnum::ONE,
34
                        AnnotationEnum::TWO,
35
                        AnnotationEnum::THREE,
36
                    ]
37
                )
38
            ]
39
        );
40
    }
41
}
42