Passed
Pull Request — master (#4)
by
unknown
01:32
created
src/RouterContainer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 
71 71
         if (!empty($route->getWhere())) {
72 72
             foreach ($route->getWhere() as $attribute => $where) {
73
-                $path = preg_replace('#{('.$attribute.')}#', '('.$where.')', $path);
73
+                $path = preg_replace('#{(' . $attribute . ')}#', '(' . $where . ')', $path);
74 74
             }
75 75
         }
76 76
         $path = preg_replace("#{([\w]+)}#", '([^/]+)', $path);
Please login to merge, or discard this patch.
examples/index.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 $router = new Router();
8 8
 
9 9
 $router->get('/home/{id}/{foo}', 'home', function ($id) {
10
-   echo 'hi from home ' . $id;
10
+    echo 'hi from home ' . $id;
11 11
 })->where(['id' => '[0-9]+']);
12 12
 
13 13
 $request = \GuzzleHttp\Psr7\ServerRequest::fromGlobals();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 $router = new Router();
8 8
 
9
-$router->get('/home/{id}/{foo}', 'home', function ($id) {
9
+$router->get('/home/{id}/{foo}', 'home', function($id) {
10 10
    echo 'hi from home ' . $id;
11 11
 })->where(['id' => '[0-9]+']);
12 12
 
Please login to merge, or discard this patch.