Passed
Branch release/v2.0.0 (c6ab93)
by Anatoly
04:19
created
functions/path_match.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
     $attributes = [];
36 36
     foreach ($matches as $key => $value) {
37
-        if (! (is_int($key) || '' === $value)) {
37
+        if (!(is_int($key) || '' === $value)) {
38 38
             $attributes[$key] = $value;
39 39
         }
40 40
     }
Please login to merge, or discard this patch.
functions/path_build.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 {
39 39
     $regex = '/{([0-9A-Za-z_]+)(?:<([^<#>]+)>)?}/';
40 40
 
41
-    return preg_replace_callback($regex, function ($match) use ($path, $attributes, $strict) {
41
+    return preg_replace_callback($regex, function($match) use ($path, $attributes, $strict) {
42 42
         if (!isset($attributes[$match[1]])) {
43 43
             throw new InvalidArgumentException(
44 44
                 sprintf('[%s] missing attribute "%s".', $path, $match[1])
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $attributes[$match[1]] = (string) $attributes[$match[1]];
49 49
 
50 50
         if ($strict && isset($match[2])) {
51
-            if (!preg_match('#'.$match[2].'#u', $attributes[$match[1]])) {
51
+            if (!preg_match('#' . $match[2] . '#u', $attributes[$match[1]])) {
52 52
                 throw new InvalidArgumentException(
53 53
                     sprintf('[%s] "%s" must match "%s".', $path, $match[1], $match[2])
54 54
                 );
Please login to merge, or discard this patch.
functions/path_regex.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,15 +37,15 @@
 block discarded – undo
37 37
     preg_match_all('/{([0-9A-Za-z_]+)(?:<([^<#>]+)>)?}/', $path, $matches, PREG_SET_ORDER);
38 38
 
39 39
     foreach ($matches as $match) {
40
-        $path = str_replace($match[0], '{'.$match[1].'}', $path);
40
+        $path = str_replace($match[0], '{' . $match[1] . '}', $path);
41 41
     }
42 42
 
43 43
     $path = addcslashes($path, '#$*+-.?[\]^|');
44 44
     $path = str_replace(['(', ')'], ['(?:', ')?'], $path);
45 45
 
46 46
     foreach ($matches as $match) {
47
-        $path = str_replace('{'.$match[1].'}', '(?<'.$match[1].'>'.($match[2] ?? '[^/]+').')', $path);
47
+        $path = str_replace('{' . $match[1] . '}', '(?<' . $match[1] . '>' . ($match[2] ?? '[^/]+') . ')', $path);
48 48
     }
49 49
 
50
-    return '#^'.$path.'$#uD';
50
+    return '#^' . $path . '$#uD';
51 51
 }
Please login to merge, or discard this patch.
tests/Annotation/AnnotationRouteLoaderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public static function setUpBeforeClass() : void
30 30
     {
31
-        if (! class_exists('Route')) {
31
+        if (!class_exists('Route')) {
32 32
             class_alias(AnnotationRoute::class, 'Route');
33 33
         }
34 34
     }
Please login to merge, or discard this patch.
src/RequestHandler/QueueableRequestHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
      */
73 73
     public function handle(ServerRequestInterface $request) : ResponseInterface
74 74
     {
75
-        if (! $this->queue->isEmpty()) {
75
+        if (!$this->queue->isEmpty()) {
76 76
             return $this->queue->dequeue()->process($request, $this);
77 77
         }
78 78
 
Please login to merge, or discard this patch.
src/Router.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
         }
84 84
 
85 85
         $method = $request->getMethod();
86
-        if (! isset($routes[$method])) {
86
+        if (!isset($routes[$method])) {
87 87
             throw new MethodNotAllowedException(
88 88
                 array_keys($routes)
89 89
             );
Please login to merge, or discard this patch.