@@ -33,7 +33,7 @@ |
||
33 | 33 | /** |
34 | 34 | * {@inheritdoc} |
35 | 35 | * |
36 | - * @return ResponseInterface |
|
36 | + * @return \Psr\Http\Message\ResponseInterface |
|
37 | 37 | */ |
38 | 38 | public function handle(ServerRequestInterface $request): ResponseInterface |
39 | 39 | { |
@@ -4,11 +4,8 @@ |
||
4 | 4 | |
5 | 5 | use Fol\{App, NotFoundException}; |
6 | 6 | use Folk\Entities\EntityInterface; |
7 | -use Folk\Entities\SingleEntityInterface; |
|
8 | 7 | use Psr\Http\Message\{ServerRequestInterface, ResponseInterface, UriInterface}; |
9 | 8 | use Interop\Http\Server\RequestHandlerInterface; |
10 | -use Zend\Diactoros\Response; |
|
11 | -use Relay\RelayBuilder; |
|
12 | 9 | |
13 | 10 | /** |
14 | 11 | * Main manager. |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public function getFactories() |
13 | 13 | { |
14 | 14 | return [ |
15 | - 'templates' => function (App $app): Engine { |
|
15 | + 'templates' => function(App $app): Engine { |
|
16 | 16 | $root = dirname(dirname(__DIR__)); |
17 | 17 | |
18 | 18 | $templates = new Engine($root.'/templates'); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | $templates->addData(['app' => $app]); |
22 | 22 | |
23 | - $templates->registerFunction('icon', function ($name) use ($icons) { |
|
23 | + $templates->registerFunction('icon', function($name) use ($icons) { |
|
24 | 24 | return $icons->get($name); |
25 | 25 | }); |
26 | 26 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | public function getFactories() |
12 | 12 | { |
13 | 13 | return [ |
14 | - 'router' => function (App $app): RouterContainer { |
|
14 | + 'router' => function(App $app): RouterContainer { |
|
15 | 15 | $router = new RouterContainer(); |
16 | 16 | |
17 | 17 | $map = $router->getMap(); |
@@ -11,13 +11,13 @@ |
||
11 | 11 | public function getFactories() |
12 | 12 | { |
13 | 13 | return [ |
14 | - 'builder' => function (App $app): FormatFactory { |
|
15 | - return new FormatFactory($app); |
|
16 | - } |
|
14 | + 'builder' => function (App $app): FormatFactory { |
|
15 | + return new FormatFactory($app); |
|
16 | + } |
|
17 | 17 | ]; |
18 | 18 | } |
19 | 19 | |
20 | 20 | public function getExtensions() { |
21 | - return []; |
|
21 | + return []; |
|
22 | 22 | } |
23 | 23 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | public function getFactories() |
12 | 12 | { |
13 | 13 | return [ |
14 | - 'builder' => function (App $app): FormatFactory { |
|
14 | + 'builder' => function(App $app): FormatFactory { |
|
15 | 15 | return new FormatFactory($app); |
16 | 16 | } |
17 | 17 | ]; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | public function getFactories() |
14 | 14 | { |
15 | 15 | return [ |
16 | - 'middleware' => function (App $app): Dispatcher { |
|
16 | + 'middleware' => function(App $app): Dispatcher { |
|
17 | 17 | $middleware = []; |
18 | 18 | |
19 | 19 | $middleware[] = new Middlewares\Expires(); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $middleware[] = new Middlewares\ContentType(); |
23 | 23 | $middleware[] = new Middlewares\ContentLanguage(['en', 'gl', 'es']); |
24 | 24 | |
25 | - $middleware[] = function ($request, $next) use ($app) { |
|
25 | + $middleware[] = function($request, $next) use ($app) { |
|
26 | 26 | $language = $request->getHeaderLine('Accept-Language'); |
27 | 27 | $translator = new Translator(); |
28 | 28 | $translator->loadTranslations(Translations::fromPoFile(dirname(dirname(__DIR__)).'/locales/'.$language.'.po')); |