Completed
Push — master ( f4d481...bba06c )
by Alejandro
06:57
created
src/Router.class.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,15 +63,17 @@
 block discarded – undo
63 63
     }
64 64
 
65 65
     public function url($methods, $args) {
66
-        if (is_string($methods))
67
-            $methods = [$methods];
66
+        if (is_string($methods)) {
67
+                    $methods = [$methods];
68
+        }
68 69
 
69 70
         $pattern = array_shift($args); // 2nd-> Pattern
70 71
         $callable = array_pop($args); // Last -> callable
71 72
         $route = new Route($pattern, $callable);
72 73
         $route->setHttpMethods($methods);
73
-        if (count($args) > 0)
74
-            $route->setMiddleware($args);
74
+        if (count($args) > 0) {
75
+                    $route->setMiddleware($args);
76
+        }
75 77
         $this->routes[] = $route;
76 78
         return $this;
77 79
     }
Please login to merge, or discard this patch.
src/Route.class.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,9 @@
 block discarded – undo
72 72
     }
73 73
 
74 74
     public function setCallable($callback) {
75
-        if (is_callable($callback))
76
-            $this->callable = $callback;
75
+        if (is_callable($callback)) {
76
+                    $this->callable = $callback;
77
+        }
77 78
     }
78 79
 
79 80
     /**
Please login to merge, or discard this patch.