Completed
Push — master ( f8c3c0...306076 )
by Alexis
01:17
created
config/middleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@
 block discarded – undo
3 3
 use App\Middleware\AuthMiddleware;
4 4
 use App\Middleware\GuestMiddleware;
5 5
 
6
-$container['middleware.guest'] = function ($container) {
6
+$container['middleware.guest'] = function($container) {
7 7
     return new GuestMiddleware($container['router'], $container['auth']);
8 8
 };
9 9
 
10
-$container['middleware.auth'] = function ($container) {
11
-    return function ($role = null) use ($container) {
10
+$container['middleware.auth'] = function($container) {
11
+    return function($role = null) use ($container) {
12 12
         return new AuthMiddleware($container['router'], $container['flash'], $container['auth'], $role);
13 13
     };
14 14
 };
Please login to merge, or discard this patch.
config/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 $app->get('/', 'controller.app:home')->setName('home');
4 4
 
5
-$app->group('', function () {
5
+$app->group('', function() {
6 6
     $this->map(['GET', 'POST'], '/login', 'controller.auth:login')->setName('login');
7 7
     $this->map(['GET', 'POST'], '/register', 'controller.auth:register')->setName('register');
8 8
 })->add($container['middleware.guest']);
Please login to merge, or discard this patch.
tests/Controller/AppControllerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,6 +11,6 @@
 block discarded – undo
11 11
         $response = $this->runApp('GET', '/');
12 12
 
13 13
         $this->assertEquals(200, $response->getStatusCode());
14
-        $this->assertContains('Homepage', (string)$response->getBody());
14
+        $this->assertContains('Homepage', (string) $response->getBody());
15 15
     }
16 16
 }
Please login to merge, or discard this patch.