Failed Conditions
Pull Request — new-parser-ast-metadata (#2)
by Michael
01:51
created

ScopeMother   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 15
dl 0
loc 40
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A withIgnoredAnnotations() 0 5 1
A withSubject() 0 5 1
A example() 0 4 1
A withImports() 0 5 1
A withNestingLevel() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Tests\Annotations\Parser;
6
7
use Doctrine\Annotations\Parser\Scope;
8
use Reflector;
9
10
final class ScopeMother
11
{
12
    public static function example() : Scope
13
    {
14
        return (new ScopeBuilder())
15
            ->build();
16
    }
17
18
    public static function withSubject(Reflector $reflector) : Scope
19
    {
20
        return (new ScopeBuilder())
21
            ->withSubject($reflector)
22
            ->build();
23
    }
24
25
    /**
26
     * @param string[] $names
27
     */
28
    public static function withIgnoredAnnotations(array $names) : Scope
29
    {
30
        return (new ScopeBuilder())
31
            ->withIgnoredAnnotations($names)
32
            ->build();
33
    }
34
35
    /**
36
     * @param string[] $importsMap
37
     */
38
    public static function withImports(array $importsMap) : Scope
39
    {
40
        return (new ScopeBuilder())
41
            ->withImports($importsMap)
42
            ->build();
43
    }
44
45
    public static function withNestingLevel(int $level) : Scope
46
    {
47
        return (new ScopeBuilder())
48
            ->withNestingLevel($level)
49
            ->build();
50
    }
51
}
52