Completed
Push — master ( 526076...54b866 )
by Diogo Oliveira de
03:44
created
SlimX/Controllers/Action.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @param ?callable $errorCallable Optionally, a callback function may be given, to be
26 26
      *  called when ACCEPT header doesn't match any of the expected.
27 27
      */
28
-    public function __construct(string $method, string $pattern, $callable, ?callable $errorCallable = null)
28
+    public function __construct(string $method, string $pattern, $callable, ? callable $errorCallable = null)
29 29
     {
30 30
         if (!in_array($method, $this->allowedMethods)) {
31 31
             throw new \Exception(
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $callable = $this->callable;
64 64
         $errorCallable = $this->errorCallable;
65
-        $this->callable = function (
65
+        $this->callable = function(
66 66
             RequestInterface $request,
67 67
             Response $response,
68 68
             array $args
@@ -80,8 +80,7 @@  discard block
 block discarded – undo
80 80
             }
81 81
 
82 82
             return null !== $errorCallable ?
83
-                $errorCallable($response) :
84
-                $response->withStatus(406)
83
+                $errorCallable($response) : $response->withStatus(406)
85 84
                     ->write('API version not present or not accepted');
86 85
         };
87 86
     }
Please login to merge, or discard this patch.