Completed
Push — master ( 2c097a...2c4d83 )
by Alexis
01:50
created
app/handlers.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
  *
16 16
  * https://www.slimframework.com/docs/objects/router.html#route-strategies
17 17
  */
18
-$container['foundHandler'] = function () {
18
+$container['foundHandler'] = function() {
19 19
     return new RequestResponseArgs();
20 20
 };
21 21
 
22
-$container['csrfFailureHandler'] = function ($container) {
23
-    return function (Request $request, Response $response) use ($container) {
22
+$container['csrfFailureHandler'] = function($container) {
23
+    return function(Request $request, Response $response) use ($container) {
24 24
         $container['monolog']->error(sprintf('Failed CSRF check on "%s /%s"', $request->getMethod(), $request->getUri()->getPath()));
25 25
 
26 26
         $container['flash']->addMessage('error', 'Failed CSRF check');
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     };
34 34
 };
35 35
 
36
-$container['notFoundHandler'] = function ($container) {
37
-    return function (Request $request, Response $response) use ($container) {
36
+$container['notFoundHandler'] = function($container) {
37
+    return function(Request $request, Response $response) use ($container) {
38 38
         $container['monolog']->error(sprintf('No route found for "%s /%s"', $request->getMethod(), $request->getUri()->getPath()));
39 39
 
40 40
         if ('prod' === $container['env']) {
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
     };
46 46
 };
47 47
 
48
-$container['notAllowedHandler'] = function ($container) {
49
-    return function (Request $request, Response $response, array $methods) use ($container) {
48
+$container['notAllowedHandler'] = function($container) {
49
+    return function(Request $request, Response $response, array $methods) use ($container) {
50 50
         $container['monolog']->error(sprintf(
51 51
             'No route found for "%s /%s": Method not allowed (Allow: %s)',
52 52
             $request->getMethod(),
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
     };
63 63
 };
64 64
 
65
-$container['accessDeniedHandler'] = function ($container) {
66
-    return function (Request $request, Response $response, AccessDeniedException $exception) use ($container) {
65
+$container['accessDeniedHandler'] = function($container) {
66
+    return function(Request $request, Response $response, AccessDeniedException $exception) use ($container) {
67 67
         $container['monolog']->debug('Access denied, the user does not have access to this section', [
68 68
             'exception' => $exception
69 69
         ]);
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
     };
73 73
 };
74 74
 
75
-$container['errorHandler'] = function ($container) {
76
-    return function (Request $request, Response $response, Exception $exception) use ($container) {
75
+$container['errorHandler'] = function($container) {
76
+    return function(Request $request, Response $response, Exception $exception) use ($container) {
77 77
         if ($exception instanceof AccessDeniedException) {
78 78
             return $container['accessDeniedHandler']($request, $response, $exception);
79 79
         }
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
     };
91 91
 };
92 92
 
93
-$container['phpErrorHandler'] = function ($container) {
94
-    return function (Request $request, Response $response, Throwable $error) use ($container) {
93
+$container['phpErrorHandler'] = function($container) {
94
+    return function(Request $request, Response $response, Throwable $error) use ($container) {
95 95
         $container['monolog']->critical('Uncaught PHP Exception ' . get_class($error), [
96 96
             'exception' => $error
97 97
         ]);
Please login to merge, or discard this patch.
src/App/Command/CreateUserCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
         if (!$input->getArgument('username')) {
87 87
             $question = new Question('Please choose a username:');
88
-            $question->setValidator(function ($username) {
88
+            $question->setValidator(function($username) {
89 89
                 if (empty($username)) {
90 90
                     throw new Exception('Username can not be empty');
91 91
                 }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
         if (!$input->getArgument('email')) {
99 99
             $question = new Question('Please choose an email:');
100
-            $question->setValidator(function ($email) {
100
+            $question->setValidator(function($email) {
101 101
                 if (empty($email)) {
102 102
                     throw new Exception('Email can not be empty');
103 103
                 }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
         if (!$input->getArgument('password')) {
112 112
             $question = new Question('Please choose a password:');
113
-            $question->setValidator(function ($password) {
113
+            $question->setValidator(function($password) {
114 114
                 if (empty($password)) {
115 115
                     throw new Exception('Password can not be empty');
116 116
                 }
Please login to merge, or discard this patch.