Test Failed
Branch master (fb3e9d)
by 世昌
03:53
created
nebula/route/uri/MatchBuilder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,18 +26,18 @@
 block discarded – undo
26 26
         // 参数
27 27
         $parameters = [];
28 28
         // 转义正则
29
-        $url=preg_replace('/([\/\.\\\\\+\(\^\)\$\!\<\>\-\?\*])/', '\\\\$1', $uri);
29
+        $url = preg_replace('/([\/\.\\\\\+\(\^\)\$\!\<\>\-\?\*])/', '\\\\$1', $uri);
30 30
         // 添加忽略
31
-        $url=preg_replace('/(\[)([^\[\]]+)(?(1)\])/', '(?:$2)?', $url);
31
+        $url = preg_replace('/(\[)([^\[\]]+)(?(1)\])/', '(?:$2)?', $url);
32 32
         // 添加 * ? 匹配
33
-        $url=str_replace(['\*','\?'],['[^/]+?','[^/]'], $url);
33
+        $url = str_replace(['\*', '\?'], ['[^/]+?', '[^/]'], $url);
34 34
         // 编译页面参数
35
-        $url=preg_replace_callback('/\{(\w+)(?:\:([^}]+?))?\}/', function ($match) use (&$parameters) {
35
+        $url = preg_replace_callback('/\{(\w+)(?:\:([^}]+?))?\}/', function($match) use (&$parameters) {
36 36
             $name = $match[1];
37 37
             $type = 'string';
38 38
             $extra = '';
39 39
             if (isset($match[2])) {
40
-                if (strpos($match[2], '=')!==false) {
40
+                if (strpos($match[2], '=') !== false) {
41 41
                     list($type, $extra) = \explode('=', $match[2]);
42 42
                 } else {
43 43
                     $type = $match[2];
Please login to merge, or discard this patch.
nebula/route/uri/parameter/Parameter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 /**
5 5
  * 匹配参数
6 6
  */
7
-abstract class Parameter   {
7
+abstract class Parameter {
8 8
 
9 9
     protected static $name;
10 10
     /**
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     }
26 26
 
27 27
     public static function build(string $indexName, string $extra):Parameter {
28
-        $parameter =  new static($extra);
28
+        $parameter = new static($extra);
29 29
         $parameter->setIndexName($indexName);
30 30
         return $parameter;
31 31
     }
Please login to merge, or discard this patch.