Failed Conditions
Push — new-parser-ast-metadata ( 6127e0...5a4a16 )
by Michael
12s
created

AnnotationMetadataMother   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 9
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A withTarget() 0 7 1
A example() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Tests\Annotations\Metadata;
6
7
use Doctrine\Annotations\Metadata\AnnotationMetadata;
8
use Doctrine\Annotations\Metadata\AnnotationTarget;
9
10
final class AnnotationMetadataMother
11
{
12
    public static function example() : AnnotationMetadata
13
    {
14
        return new AnnotationMetadata(
15
            'foo',
16
            new AnnotationTarget(AnnotationTarget::TARGET_ALL),
17
            false,
18
            []
19
        );
20
    }
21
22
    public static function withTarget(AnnotationTarget $target) : AnnotationMetadata
23
    {
24
        return new AnnotationMetadata(
25
            'foo',
26
            $target,
27
            false,
28
            []
29
        );
30
    }
31
}
32