Passed
Pull Request — master (#668)
by butschster
20:19
created
src/Broadcasting/src/Middleware/AuthorizationMiddleware.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,18 +32,22 @@
 block discarded – undo
32 32
         ServerRequestInterface $request,
33 33
         RequestHandlerInterface $handler
34 34
     ): ResponseInterface {
35
-        if ($request->getUri()->getPath() !== $this->authorizationPath) {
35
+        if ($request->getUri()->getPath() !== $this->authorizationPath)
36
+        {
36 37
             return $handler->handle($request);
37 38
         }
38 39
 
39
-        if ($this->broadcast instanceof GuardInterface) {
40
+        if ($this->broadcast instanceof GuardInterface)
41
+        {
40 42
             $status = $this->broadcast->authorize($request);
41 43
 
42
-            if ($status->hasResponse()) {
44
+            if ($status->hasResponse())
45
+            {
43 46
                 return $status->getResponse();
44 47
             }
45 48
 
46
-            if (!$status->isSuccessful()) {
49
+            if (!$status->isSuccessful())
50
+            {
47 51
                 return $this->responseFactory->createResponse(403);
48 52
             }
49 53
         }
Please login to merge, or discard this patch.