| Total Complexity | 4 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class AppPackage implements RegistrationInterface, RouterConfigInterface, ViewRegistrationInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @param Container $c |
||
| 17 | */ |
||
| 18 | 1 | public function addToContainer(Container $c) |
|
| 19 | { |
||
| 20 | 1 | $c[IndexController::class] = $c->factory(function (Container $c) { |
|
| 21 | 1 | $controller = new IndexController(); |
|
| 22 | |||
| 23 | 1 | return Init::controller($controller, $c); |
|
| 24 | 1 | }); |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return array |
||
| 29 | */ |
||
| 30 | 1 | public function addViews(): array |
|
| 31 | { |
||
| 32 | 1 | return [ |
|
| 33 | 1 | 'app' => __DIR__ . '/View/index', |
|
| 34 | 1 | 'error' => __DIR__ . '/View/error', |
|
| 35 | 1 | 'layouts' => __DIR__ . '/View/layouts', |
|
| 36 | 1 | ]; |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param Container $c |
||
| 41 | * @return array |
||
| 42 | */ |
||
| 43 | 1 | public function addViewExtensions(Container $c): array |
|
| 46 | } |
||
| 47 | |||
| 48 | |||
| 49 | /** |
||
| 50 | * @param Container $c |
||
| 51 | * @param Router $router |
||
| 52 | * @return Router |
||
| 53 | */ |
||
| 54 | 1 | public function addRoutes(Container $c, Router $router): Router |
|
| 60 | } |
||
| 61 | } |
||
| 62 |