Passed
Pull Request — master (#58)
by Alberto
03:13 queued 45s
created
src/Policy/RequestRolesPolicy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
      */
160 160
     protected function applyRolesPolicy(IdentityInterface $identity, array $roles): Result
161 161
     {
162
-        $identityRoles = (array)Hash::get((array)$identity->getOriginalData(), 'roles');
162
+        $identityRoles = (array) Hash::get((array) $identity->getOriginalData(), 'roles');
163 163
 
164 164
         if (!empty(array_intersect($identityRoles, $roles))) {
165 165
             return new Result(true);
Please login to merge, or discard this patch.
src/Identity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
29 29
      */
30 30
     public function hasRole(string $name): bool
31 31
     {
32
-        return in_array($name, (array)$this->get('roles'));
32
+        return in_array($name, (array) $this->get('roles'));
33 33
     }
34 34
 }
Please login to merge, or discard this patch.
src/View/Helper/IdentityHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
      */
46 46
     public function __call($method, $args)
47 47
     {
48
-        if (!in_array($method, (array)$this->getConfig('delegateMethods'))) {
48
+        if (!in_array($method, (array) $this->getConfig('delegateMethods'))) {
49 49
             throw new \BadMethodCallException("Cannot call `{$method}`. Make sure to add it to `delegateMethods`.");
50 50
         }
51 51
 
Please login to merge, or discard this patch.