Completed
Push — master ( 9661d6...2c69ad )
by Alexis
03:31
created
app/handlers.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,31 +12,31 @@  discard block
 block discarded – undo
12 12
  *
13 13
  * https://www.slimframework.com/docs/objects/router.html#route-strategies
14 14
  */
15
-$container['foundHandler'] = function () {
15
+$container['foundHandler'] = function() {
16 16
     return new RequestResponseArgs();
17 17
 };
18 18
 
19 19
 if ($container['env'] === 'prod') {
20
-    $container['notFoundHandler'] = function ($container) {
21
-        return function (Request $request, Response $response) use ($container) {
20
+    $container['notFoundHandler'] = function($container) {
21
+        return function(Request $request, Response $response) use ($container) {
22 22
             return $response->withStatus(404)->write($container['view']->fetch('Error/404.twig'));
23 23
         };
24 24
     };
25 25
 
26
-    $container['notAllowedHandler'] = function ($container) {
27
-        return function (Request $request, Response $response, array $methods) use ($container) {
26
+    $container['notAllowedHandler'] = function($container) {
27
+        return function(Request $request, Response $response, array $methods) use ($container) {
28 28
             return $response->withStatus(405)->write($container['view']->fetch('Error/4xx.twig'));
29 29
         };
30 30
     };
31 31
 
32
-    $container['accessDeniedHandler'] = function ($container) {
33
-        return function (Request $request, Response $response, Exception $exception) use ($container) {
32
+    $container['accessDeniedHandler'] = function($container) {
33
+        return function(Request $request, Response $response, Exception $exception) use ($container) {
34 34
             return $response->withStatus(403)->write($container['view']->fetch('Error/403.twig'));
35 35
         };
36 36
     };
37 37
 
38
-    $container['errorHandler'] = function ($container) {
39
-        return function (Request $request, Response $response, Exception $exception) use ($container) {
38
+    $container['errorHandler'] = function($container) {
39
+        return function(Request $request, Response $response, Exception $exception) use ($container) {
40 40
             if ($exception instanceof AccessDeniedException) {
41 41
                 return $container['accessDeniedHandler']($request, $response, $exception);
42 42
             }
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         };
46 46
     };
47 47
 
48
-    $container['phpErrorHandler'] = function ($container) {
49
-        return function (Request $request, Response $response, Throwable $error) use ($container) {
48
+    $container['phpErrorHandler'] = function($container) {
49
+        return function(Request $request, Response $response, Throwable $error) use ($container) {
50 50
             return $response->withStatus(500)->write($container['view']->fetch('Error/500.twig'));
51 51
         };
52 52
     };
Please login to merge, or discard this patch.
app/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use App\Middleware\GuestMiddleware;
4 4
 use App\Middleware\AuthMiddleware;
5 5
 
6
-$app->group('', function () {
6
+$app->group('', function() {
7 7
     $this->map(['GET', 'POST'], '/login', 'auth.controller:login')->setName('login');
8 8
     $this->map(['GET', 'POST'], '/register', 'auth.controller:register')->setName('register');
9 9
 })->add(new GuestMiddleware($container));
Please login to merge, or discard this patch.