Passed
Push — master ( ff614d...6c840c )
by Anton
05:03 queued 02:24
created
src/Bootloader/Http/CookiesBootloader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     private function cookieQueue(ServerRequestInterface $request): CookieQueue
72 72
     {
73 73
         $cookieQueue = $request->getAttribute(CookieQueue::ATTRIBUTE, null);
74
-        if ($cookieQueue === null) {
74
+        if ($cookieQueue === null){
75 75
             throw new ScopeException("Unable to resolve CookieQueue, invalid request scope");
76 76
         }
77 77
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,8 @@
 block discarded – undo
71 71
     private function cookieQueue(ServerRequestInterface $request): CookieQueue
72 72
     {
73 73
         $cookieQueue = $request->getAttribute(CookieQueue::ATTRIBUTE, null);
74
-        if ($cookieQueue === null) {
74
+        if ($cookieQueue === null)
75
+        {
75 76
             throw new ScopeException("Unable to resolve CookieQueue, invalid request scope");
76 77
         }
77 78
 
Please login to merge, or discard this patch.
src/Bootloader/Http/RouterBootloader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     private function route(ServerRequestInterface $request): RouteInterface
57 57
     {
58 58
         $route = $request->getAttribute(Router::ROUTE_ATTRIBUTE, null);
59
-        if ($route === null) {
59
+        if ($route === null){
60 60
             throw new ScopeException("Unable to resolve Route, invalid request scope");
61 61
         }
62 62
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,8 @@
 block discarded – undo
56 56
     private function route(ServerRequestInterface $request): RouteInterface
57 57
     {
58 58
         $route = $request->getAttribute(Router::ROUTE_ATTRIBUTE, null);
59
-        if ($route === null) {
59
+        if ($route === null)
60
+        {
60 61
             throw new ScopeException("Unable to resolve Route, invalid request scope");
61 62
         }
62 63
 
Please login to merge, or discard this patch.
src/Security/GuardScope.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         PermissionsInterface $permissions,
41 41
         ContainerInterface $actorScope,
42 42
         array $roles = []
43
-    ) {
43
+    ){
44 44
         $this->roles = $roles;
45 45
         $this->container = $actorScope;
46 46
         $this->permissions = $permissions;
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     public function allows(string $permission, array $context = []): bool
53 53
     {
54 54
         $allows = false;
55
-        foreach ($this->getRoles() as $role) {
56
-            if (!$this->permissions->hasRole($role)) {
55
+        foreach ($this->getRoles() as $role){
56
+            if (!$this->permissions->hasRole($role)){
57 57
                 continue;
58 58
             }
59 59
 
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function getActor(): ActorInterface
101 101
     {
102
-        if (!is_null($this->actor)) {
102
+        if (!is_null($this->actor)){
103 103
             return $this->actor;
104 104
         }
105 105
 
106
-        try {
106
+        try{
107 107
             return $this->container->get(ActorInterface::class);
108
-        } catch (ContainerException $e) {
108
+        }catch (ContainerException $e){
109 109
             throw new ScopeException("Unable to resolve Actor from the scope", $e->getCode(), $e);
110 110
         }
111 111
     }
Please login to merge, or discard this patch.
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,8 +52,10 @@  discard block
 block discarded – undo
52 52
     public function allows(string $permission, array $context = []): bool
53 53
     {
54 54
         $allows = false;
55
-        foreach ($this->getRoles() as $role) {
56
-            if (!$this->permissions->hasRole($role)) {
55
+        foreach ($this->getRoles() as $role)
56
+        {
57
+            if (!$this->permissions->hasRole($role))
58
+            {
57 59
                 continue;
58 60
             }
59 61
 
@@ -99,13 +101,17 @@  discard block
 block discarded – undo
99 101
      */
100 102
     public function getActor(): ActorInterface
101 103
     {
102
-        if (!is_null($this->actor)) {
104
+        if (!is_null($this->actor))
105
+        {
103 106
             return $this->actor;
104 107
         }
105 108
 
106
-        try {
109
+        try
110
+        {
107 111
             return $this->container->get(ActorInterface::class);
108
-        } catch (ContainerException $e) {
112
+        }
113
+        catch (ContainerException $e)
114
+        {
109 115
             throw new ScopeException("Unable to resolve Actor from the scope", $e->getCode(), $e);
110 116
         }
111 117
     }
Please login to merge, or discard this patch.