Passed
Push — master ( a8217d...6df61a )
by 世昌
01:56
created
nebula/route/uri/UriMatcher.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
      * @param boolean $ignoreCase
47 47
      * @return array|null
48 48
      */
49
-    public function match(string $url, bool $ignoreCase = true):?array
49
+    public function match(string $url, bool $ignoreCase = true): ?array
50 50
     {
51
-        $match = '#^'. $this->match.'$#'. ($ignoreCase?'i':'');
51
+        $match = '#^'.$this->match.'$#'.($ignoreCase ? 'i' : '');
52 52
         $parameter = [];
53 53
         if (preg_match($match, $url, $parameter, PREG_UNMATCHED_AS_NULL) > 0) {
54 54
             return array_slice($parameter, 1);
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
             } else {
73 73
                 $value = $parameter->unpackValue($match);
74 74
             }
75
-            $parameters[$parameter->getIndexName()] =  $value;
75
+            $parameters[$parameter->getIndexName()] = $value;
76 76
         }
77 77
         return $parameters;
78 78
     }
79 79
 
80
-    public function getParameter(string $name):?Parameter
80
+    public function getParameter(string $name): ?Parameter
81 81
     {
82 82
         foreach ($this->parameter as $parameter) {
83 83
             if ($parameter->getIndexName() === $name) {
Please login to merge, or discard this patch.