@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | if (!$input->getArgument('username')) { |
86 | 86 | $question = new Question('Please choose a username:'); |
87 | - $question->setValidator(function ($username) { |
|
87 | + $question->setValidator(function($username) { |
|
88 | 88 | if (empty($username)) { |
89 | 89 | throw new \Exception('Username can not be empty'); |
90 | 90 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | if (!$input->getArgument('email')) { |
98 | 98 | $question = new Question('Please choose an email:'); |
99 | - $question->setValidator(function ($email) { |
|
99 | + $question->setValidator(function($email) { |
|
100 | 100 | if (empty($email)) { |
101 | 101 | throw new \Exception('Email can not be empty'); |
102 | 102 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | if (!$input->getArgument('password')) { |
111 | 111 | $question = new Question('Please choose a password:'); |
112 | - $question->setValidator(function ($password) { |
|
112 | + $question->setValidator(function($password) { |
|
113 | 113 | if (empty($password)) { |
114 | 114 | throw new \Exception('Password can not be empty'); |
115 | 115 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$app->group('/admin', function () use ($container) { |
|
3 | +$app->group('/admin', function() use ($container) { |
|
4 | 4 | $this->get('', 'admin.controller:home') |
5 | 5 | ->setName('admin.home'); |
6 | 6 | })->add($container['auth.middleware']('admin')); |
@@ -23,21 +23,21 @@ discard block |
||
23 | 23 | $capsule->setAsGlobal(); |
24 | 24 | $capsule->bootEloquent(); |
25 | 25 | |
26 | -$container['db'] = function () use ($capsule) { |
|
26 | +$container['db'] = function() use ($capsule) { |
|
27 | 27 | return $capsule; |
28 | 28 | }; |
29 | 29 | |
30 | -$container['auth'] = function () { |
|
30 | +$container['auth'] = function() { |
|
31 | 31 | $sentinel = new Sentinel(new SentinelBootstrapper(__DIR__ . '/config/sentinel.php')); |
32 | 32 | |
33 | 33 | return $sentinel->getSentinel(); |
34 | 34 | }; |
35 | 35 | |
36 | -$container['flash'] = function () { |
|
36 | +$container['flash'] = function() { |
|
37 | 37 | return new Messages(); |
38 | 38 | }; |
39 | 39 | |
40 | -$container['csrf'] = function ($container) { |
|
40 | +$container['csrf'] = function($container) { |
|
41 | 41 | $guard = new Guard(); |
42 | 42 | $guard->setFailureCallable($container['csrfFailureHandler']); |
43 | 43 | |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | }; |
46 | 46 | |
47 | 47 | // https://github.com/awurth/slim-validation |
48 | -$container['validator'] = function () { |
|
48 | +$container['validator'] = function() { |
|
49 | 49 | return new Validator(); |
50 | 50 | }; |
51 | 51 | |
52 | -$container['view'] = function ($container) { |
|
52 | +$container['view'] = function($container) { |
|
53 | 53 | $config = $container['config']; |
54 | 54 | |
55 | 55 | $view = new Twig( |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | return $view; |
76 | 76 | }; |
77 | 77 | |
78 | -$container['monolog'] = function ($container) { |
|
78 | +$container['monolog'] = function($container) { |
|
79 | 79 | $config = $container['config']['monolog']; |
80 | 80 | |
81 | 81 | $logger = new Logger($config['name']); |