@@ -11,31 +11,31 @@ |
||
| 11 | 11 | * |
| 12 | 12 | * https://www.slimframework.com/docs/objects/router.html#route-strategies |
| 13 | 13 | */ |
| 14 | -$container['foundHandler'] = function () { |
|
| 14 | +$container['foundHandler'] = function() { |
|
| 15 | 15 | return new RequestResponseArgs(); |
| 16 | 16 | }; |
| 17 | 17 | |
| 18 | 18 | if ($container['env'] === 'prod') { |
| 19 | - $container['notFoundHandler'] = function ($container) { |
|
| 20 | - return function (Request $request, Response $response) use ($container) { |
|
| 19 | + $container['notFoundHandler'] = function($container) { |
|
| 20 | + return function(Request $request, Response $response) use ($container) { |
|
| 21 | 21 | return $response->withStatus(404)->write($container['view']->fetch('Error/404.twig')); |
| 22 | 22 | }; |
| 23 | 23 | }; |
| 24 | 24 | |
| 25 | - $container['notAllowedHandler'] = function ($container) { |
|
| 26 | - return function (Request $request, Response $response, array $methods) use ($container) { |
|
| 25 | + $container['notAllowedHandler'] = function($container) { |
|
| 26 | + return function(Request $request, Response $response, array $methods) use ($container) { |
|
| 27 | 27 | return $response->withStatus(405)->write($container['view']->fetch('Error/4xx.twig')); |
| 28 | 28 | }; |
| 29 | 29 | }; |
| 30 | 30 | |
| 31 | - $container['errorHandler'] = function ($container) { |
|
| 32 | - return function (Request $request, Response $response, Exception $exception) use ($container) { |
|
| 31 | + $container['errorHandler'] = function($container) { |
|
| 32 | + return function(Request $request, Response $response, Exception $exception) use ($container) { |
|
| 33 | 33 | return $response->withStatus(500)->write($container['view']->fetch('Error/500.twig')); |
| 34 | 34 | }; |
| 35 | 35 | }; |
| 36 | 36 | |
| 37 | - $container['phpErrorHandler'] = function ($container) use ($config) { |
|
| 38 | - return function (Request $request, Response $response, Throwable $error) use ($container, $config) { |
|
| 37 | + $container['phpErrorHandler'] = function($container) use ($config) { |
|
| 38 | + return function(Request $request, Response $response, Throwable $error) use ($container, $config) { |
|
| 39 | 39 | return $response->withStatus(500)->write($container['view']->fetch('Error/500.twig')); |
| 40 | 40 | }; |
| 41 | 41 | }; |