| Total Complexity | 6 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | final class LocatorBuilder implements LocatorBuilderInterface |
||
| 7 | { |
||
| 8 | |||
| 9 | private $locator; |
||
| 10 | |||
| 11 | private $referenceFactory; |
||
| 12 | |||
| 13 | private $references = []; |
||
| 14 | |||
| 15 | 1 | public static function create(): LocatorBuilderInterface |
|
| 16 | { |
||
| 17 | 1 | return new self(new ReferenceFactory); |
|
| 18 | } |
||
| 19 | |||
| 20 | 6 | public function __construct(ReferenceFactoryInterface $referenceFactory) |
|
| 21 | { |
||
| 22 | 6 | $this->referenceFactory = $referenceFactory; |
|
| 23 | 6 | } |
|
| 24 | |||
| 25 | 3 | public function addReference(string $text): void |
|
| 35 | 2 | } |
|
| 36 | |||
| 37 | 4 | public function getLocator(): LocatorInterface |
|
| 46 |