Completed
Pull Request — 5.5 (#28)
by
unknown
55:09
created
src/Traits/HasRoleAndPermission.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     /**
51 51
      * Check if the user has a role or roles.
52 52
      *
53
-     * @param int|string|array $role
53
+     * @param string $role
54 54
      * @param bool $all
55 55
      * @return bool
56 56
      */
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     /**
219 219
      * Check if the user has a permission or permissions.
220 220
      *
221
-     * @param int|string|array $permission
221
+     * @param string $permission
222 222
      * @param bool $all
223 223
      * @return bool
224 224
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@
 block discarded – undo
283 283
     {
284 284
         return $this->getPermissions()->contains(function ($value) use ($permission) {
285 285
             // it always true when 0 compare string (Str::is function)
286
-            $permission = is_numeric($permission) ? (string)$permission : $permission;
286
+            $permission = is_numeric($permission) ? (string) $permission : $permission;
287 287
             return $permission == $value->id || Str::is($permission, $value->slug);
288 288
         });
289 289
     }
Please login to merge, or discard this patch.