Passed
Push — master ( c9fa84...a75f89 )
by Rasul
01:48
created
src/Route/Route.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         }
43 43
 
44 44
         /** @var string|null $url */
45
-        $url = preg_replace_callback('~\{([^\}]+)\}~', function (array $matches) use (&$arguments) {
45
+        $url = preg_replace_callback('~\{([^\}]+)\}~', function(array $matches) use (&$arguments) {
46 46
             $argument = $matches[1];
47 47
             if (!array_key_exists($argument, $arguments)) {
48 48
                 throw new InvalidArgumentException('Missing parameter "' . $argument . '"');
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             return null;
60 60
         }
61 61
 
62
-        $pattern  = (new PatternReplacer())->replace($this->pattern, $this->tokens);
62
+        $pattern = (new PatternReplacer())->replace($this->pattern, $this->tokens);
63 63
 
64 64
         $path = $request->getUri()->getPath();
65 65
 
Please login to merge, or discard this patch.
src/Pattern/PatternReplacer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function replace(string $pattern, array $tokens): string
12 12
     {
13
-        return preg_replace_callback(self::REGEXP, function ($matches) use ($tokens) {
13
+        return preg_replace_callback(self::REGEXP, function($matches) use ($tokens) {
14 14
             $argument = $matches[1];
15 15
             $replace = $tokens[$argument] ?? '[^}]+';
16 16
             return '(?P<' . $argument . '>' . $replace . ')';
Please login to merge, or discard this patch.