for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\Tests\Annotations\Annotation\Parser;
use Doctrine\Annotations\Parser\IgnoredAnnotations;
use Doctrine\Annotations\Parser\Imports;
use Doctrine\Annotations\Parser\Scope;
final class ScopeBuilder
{
/** @var \Reflector */
private $subject;
/** @var Imports */
private $imports;
/** @var IgnoredAnnotations */
private $ignoredAnnotations;
/** @var int */
private $nestingLevel;
public function __construct()
$this->subject = new \ReflectionClass(self::class);
$this->imports = new Imports([]);
$this->ignoredAnnotations = new IgnoredAnnotations();
$this->nestingLevel = 0;
}
public function withSubject(\Reflector $reflector): self
$this->subject = $reflector;
return $this;
public function withImports(array $map): self
$this->imports = new Imports($map);
public function withIgnoredAnnotations(array $names): self
$this->ignoredAnnotations = new IgnoredAnnotations(...$names);
public function withNestingLevel(int $level): self
$this->nestingLevel = $level;
public function build(): Scope
return new Scope(
$this->subject,
$this->imports,
$this->ignoredAnnotations,
$this->nestingLevel
);