Test Failed
Push — master ( 845db5...198383 )
by Derek Stephen
03:11
created
src/Router.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@  discard block
 block discarded – undo
33 33
         $factory = new ResponseFactory();
34 34
         $strategy = new JsonStrategy($factory);
35 35
         $strategy->setContainer($c);
36
-        $group = $this->group('/api', function (RouteGroup $route) use ($controllerClass, $urlSlug) {
37
-            $route->map('GET', '/' . $urlSlug, [$controllerClass, 'index']);
38
-            $route->map('POST', '/' . $urlSlug, [$controllerClass, 'create']);
39
-            $route->map('GET', '/' . $urlSlug . '/{id}', [$controllerClass, 'read']);
40
-            $route->map('PATCH', '/' . $urlSlug . '/{id}', [$controllerClass, 'update']);
41
-            $route->map('DELETE', '/' . $urlSlug . '/{id}', [$controllerClass, 'delete']);
36
+        $group = $this->group('/api', function(RouteGroup $route) use ($controllerClass, $urlSlug) {
37
+            $route->map('GET', '/'.$urlSlug, [$controllerClass, 'index']);
38
+            $route->map('POST', '/'.$urlSlug, [$controllerClass, 'create']);
39
+            $route->map('GET', '/'.$urlSlug.'/{id}', [$controllerClass, 'read']);
40
+            $route->map('PATCH', '/'.$urlSlug.'/{id}', [$controllerClass, 'update']);
41
+            $route->map('DELETE', '/'.$urlSlug.'/{id}', [$controllerClass, 'delete']);
42 42
         });
43 43
         $group->setStrategy($strategy);
44 44
         $group->middlewares([new JsonParse()]);
@@ -51,15 +51,15 @@  discard block
 block discarded – undo
51 51
         $factory = new ResponseFactory();
52 52
         $strategy = new JsonStrategy($factory);
53 53
         $strategy->setContainer($c);
54
-        $group = $this->group('/admin', function (RouteGroup $route) use ($controllerClass, $urlSlug) {
55
-            $route->map('GET', '/' . $urlSlug, [$controllerClass, 'index']);
56
-            $route->map('GET', '/' . $urlSlug . '/create', [$controllerClass, 'create']);
57
-            $route->map('GET', '/' . $urlSlug . '/{id}', [$controllerClass, 'view']);
58
-            $route->map('GET', '/' . $urlSlug . '/{id}/delete', [$controllerClass, 'delete']);
59
-            $route->map('GET', '/' . $urlSlug . '/{id}/edit', [$controllerClass, 'edit']);
60
-            $route->map('POST', '/' . $urlSlug . '/create', [$controllerClass, 'create']);
61
-            $route->map('POST', '/' . $urlSlug . '/{id}/delete', [$controllerClass, 'delete']);
62
-            $route->map('POST', '/' . $urlSlug . '/{id}/edit', [$controllerClass, 'edit']);
54
+        $group = $this->group('/admin', function(RouteGroup $route) use ($controllerClass, $urlSlug) {
55
+            $route->map('GET', '/'.$urlSlug, [$controllerClass, 'index']);
56
+            $route->map('GET', '/'.$urlSlug.'/create', [$controllerClass, 'create']);
57
+            $route->map('GET', '/'.$urlSlug.'/{id}', [$controllerClass, 'view']);
58
+            $route->map('GET', '/'.$urlSlug.'/{id}/delete', [$controllerClass, 'delete']);
59
+            $route->map('GET', '/'.$urlSlug.'/{id}/edit', [$controllerClass, 'edit']);
60
+            $route->map('POST', '/'.$urlSlug.'/create', [$controllerClass, 'create']);
61
+            $route->map('POST', '/'.$urlSlug.'/{id}/delete', [$controllerClass, 'delete']);
62
+            $route->map('POST', '/'.$urlSlug.'/{id}/edit', [$controllerClass, 'edit']);
63 63
         });
64 64
 
65 65
         return $group;
Please login to merge, or discard this patch.