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

ScopeMother::example()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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