| Total Complexity | 6 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class ScopeBuilder |
||
| 14 | { |
||
| 15 | /** @var Reflector */ |
||
| 16 | private $subject; |
||
| 17 | |||
| 18 | /** @var Imports */ |
||
| 19 | private $imports; |
||
| 20 | |||
| 21 | /** @var IgnoredAnnotations */ |
||
| 22 | private $ignoredAnnotations; |
||
| 23 | |||
| 24 | /** @var int */ |
||
| 25 | private $nestingLevel; |
||
| 26 | |||
| 27 | public function __construct() |
||
| 33 | } |
||
| 34 | |||
| 35 | public function withSubject(Reflector $reflector) : self |
||
| 36 | { |
||
| 37 | $this->subject = $reflector; |
||
| 38 | |||
| 39 | return $this; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string[] $map |
||
| 44 | */ |
||
| 45 | public function withImports(array $map) : self |
||
| 46 | { |
||
| 47 | $this->imports = new Imports($map); |
||
| 48 | |||
| 49 | return $this; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param string[] $names |
||
| 54 | */ |
||
| 55 | public function withIgnoredAnnotations(array $names) : self |
||
| 56 | { |
||
| 57 | $this->ignoredAnnotations = new IgnoredAnnotations(...$names); |
||
| 58 | |||
| 59 | return $this; |
||
| 60 | } |
||
| 61 | |||
| 62 | public function withNestingLevel(int $level) : self |
||
| 67 | } |
||
| 68 | |||
| 69 | public function build() : Scope |
||
| 76 | ); |
||
| 77 | } |
||
| 78 | } |
||
| 79 |