Passed
Push — master ( 723c8d...5629e4 )
by Ch
02:31
created
Router.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,9 @@
 block discarded – undo
87 87
 
88 88
 		foreach ($this->routes as $handler) {
89 89
 
90
-			if(!$this->parser->methodMatch($handler[0], $requestMethod, $handler[1], $requestUrl)) continue;
90
+			if(!$this->parser->methodMatch($handler[0], $requestMethod, $handler[1], $requestUrl)) {
91
+				continue;
92
+			}
91 93
 
92 94
 			return array(
93 95
                 'target' => $handler[2],
Please login to merge, or discard this patch.
RouterParser.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -84,15 +84,12 @@
 block discarded – undo
84 84
         if(in_array($requestMethod, $methods)) {
85 85
             if($routeString == '*') {
86 86
                 return true;
87
-            }
88
-            elseif(isset($routeString[0]) && $routeString[0] == '@') {
87
+            } elseif(isset($routeString[0]) && $routeString[0] == '@') {
89 88
                 $match = preg_match('`' . substr($routeString, 1) . '`u', $requestUrl, $this->params);
90 89
                 return $match;
91
-            }
92
-            elseif (($position = strpos($routeString, '[')) === false) {
90
+            } elseif (($position = strpos($routeString, '[')) === false) {
93 91
                 return strcmp($requestUrl, $routeString) === 0;
94
-            }
95
-            else {
92
+            } else {
96 93
                 if (strncmp($requestUrl, $routeString, $position) !== 0) {
97 94
                     return false;
98 95
                 }
Please login to merge, or discard this patch.
examples/basic/index.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@
 block discarded – undo
36 36
                      echo '<li>'.$k.': '.$v.'</li>';
37 37
                  }
38 38
                  echo '</ul>';
39
-             }
40
-             else {
39
+             } else {
41 40
                  echo $value;
42 41
              }
43 42
              echo '</p>';
Please login to merge, or discard this patch.