@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Demo\Entities; |
4 | 4 | |
5 | 5 | use Psr\Http\Message\UploadedFileInterface; |
6 | - |
|
7 | 6 | use Folk\Entities\Json; |
8 | 7 | use Folk\Formats\Group; |
9 | 8 | use Folk\Formats\FormatFactory; |
@@ -29,7 +29,7 @@ |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
32 | - * @return ResponseInterface |
|
32 | + * @return \Psr\Http\Message\ResponseInterface |
|
33 | 33 | */ |
34 | 34 | public function __invoke(ServerRequestInterface $request): ResponseInterface |
35 | 35 | { |
@@ -11,6 +11,6 @@ |
||
11 | 11 | */ |
12 | 12 | public function valToHtml(): string |
13 | 13 | { |
14 | - return (string) $this->val(); |
|
14 | + return (string)$this->val(); |
|
15 | 15 | } |
16 | 16 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | { |
10 | 10 | public function register(App $app) |
11 | 11 | { |
12 | - $app['builder'] = function (App $app): FormatFactory { |
|
12 | + $app['builder'] = function(App $app): FormatFactory { |
|
13 | 13 | return new FormatFactory($app); |
14 | 14 | }; |
15 | 15 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | { |
10 | 10 | public function register(App $app) |
11 | 11 | { |
12 | - $app['router'] = function (App $app): RouterContainer { |
|
12 | + $app['router'] = function(App $app): RouterContainer { |
|
13 | 13 | $router = new RouterContainer(); |
14 | 14 | |
15 | 15 | $map = $router->getMap(); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | { |
12 | 12 | public function register(App $app) |
13 | 13 | { |
14 | - $app['templates'] = function (App $app): Engine { |
|
14 | + $app['templates'] = function(App $app): Engine { |
|
15 | 15 | $root = dirname(dirname(__DIR__)); |
16 | 16 | |
17 | 17 | $templates = new Engine($root.'/templates'); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | $templates->addData(['app' => $app]); |
21 | 21 | |
22 | - $templates->registerFunction('icon', function ($name) use ($icons) { |
|
22 | + $templates->registerFunction('icon', function($name) use ($icons) { |
|
23 | 23 | return $icons->get($name); |
24 | 24 | }); |
25 | 25 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | { |
12 | 12 | public function register(App $app) |
13 | 13 | { |
14 | - $app['middleware'] = function (App $app): Dispatcher { |
|
14 | + $app['middleware'] = function(App $app): Dispatcher { |
|
15 | 15 | $middleware = []; |
16 | 16 | |
17 | 17 | if ($app->has('users')) { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $middleware[] = new Middlewares\Expires(); |
22 | 22 | $middleware[] = (new Middlewares\ErrorHandler()) |
23 | 23 | ->catchExceptions(false) |
24 | - ->statusCode(function ($code) { |
|
24 | + ->statusCode(function($code) { |
|
25 | 25 | return $code > 400 && $code < 600; |
26 | 26 | }) |
27 | 27 | ->arguments($app); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $middleware[] = new Middlewares\ContentType(); |
32 | 32 | $middleware[] = new Middlewares\ContentLanguage(['en', 'gl', 'es']); |
33 | 33 | |
34 | - $middleware[] = function ($request, $next) use ($app) { |
|
34 | + $middleware[] = function($request, $next) use ($app) { |
|
35 | 35 | $language = $request->getHeaderLine('Accept-Language'); |
36 | 36 | $translator = new Translator(); |
37 | 37 | $translator->loadTranslations(Translations::fromPoFile(dirname(dirname(__DIR__)).'/locales/'.$language.'.po')); |