Test Setup Failed
Branch new-master (9484db)
by Ch
02:58
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
@@ -81,14 +81,11 @@
 block discarded – undo
81 81
         if(in_array($requestMethod, $methods)) {
82 82
             if($routeString == '*') {
83 83
                 return true;
84
-            }
85
-            elseif(isset($routeString[0]) && $routeString[0] == '@') {
84
+            } elseif(isset($routeString[0]) && $routeString[0] == '@') {
86 85
                 return preg_match('`' . substr($routeString[0], 1) . '`u', $requestUrl, $this->params);
87
-            }
88
-            elseif (($position = strpos($routeString, '[')) === false) {
86
+            } elseif (($position = strpos($routeString, '[')) === false) {
89 87
                 return strcmp($requestUrl, $routeString) === 0;
90
-            }
91
-            else {
88
+            } else {
92 89
                 if (strncmp($requestUrl, $routeString, $position) !== 0) {
93 90
                     return false;
94 91
                 }
Please login to merge, or discard this patch.
example/index.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
                  echo '<li>'.$k.': '.$v.'</li>';
28 28
              }
29 29
              echo '</ul>';
30
-         }
31
-         else {
30
+         } else {
32 31
              echo $value;
33 32
          }
34 33
          echo '</p>';
Please login to merge, or discard this patch.