| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 5 | public function create(string $moduleName, Locator $locator) : LocatorProxyInterface |
|
| 32 | { |
||
| 33 | 5 | $proxy = new LocatorProxy($this->searchableNamespaces, $moduleName, $locator); |
|
| 34 | 5 | if(get_class($proxy->factory()) === EmptyFactory::class |
|
| 35 | 5 | && get_class($proxy->facade()) === EmptyFacade::class){ |
|
| 36 | 3 | throw new NotFoundException(sprintf('Module %s was not found. You need at least a factory or a facade', $moduleName)); |
|
| 37 | } |
||
| 38 | |||
| 39 | 2 | return $proxy; |
|
| 40 | } |
||
| 41 | } |