| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 3 | protected function createLoader() |
|
| 26 | { |
||
| 27 | 3 | $app = $this->getContainer()->get('app'); |
|
| 28 | |||
| 29 | 3 | $locator = new FileLocator([ |
|
| 30 | 3 | $app->basePath() . DIRECTORY_SEPARATOR . 'routes', |
|
| 31 | 3 | $app->path(), |
|
| 32 | 3 | $app->basePath(), |
|
| 33 | ]); |
||
| 34 | |||
| 35 | 3 | $resolver = new \Symfony\Component\Config\Loader\LoaderResolver(); |
|
| 36 | 3 | $resolver->addLoader(new PhpFileLoader($locator)); |
|
| 37 | 3 | $resolver->addLoader(new DirectoryLoader($locator)); |
|
| 38 | |||
| 39 | 3 | $loader = new \Nip\Router\Loader\DelegatingLoader($resolver); |
|
| 40 | |||
| 41 | 3 | return $loader; |
|
| 42 | } |
||
| 44 |