Skip to content

Commit 59b966f

Browse files
drbyteSanderMuller
andcommitted
Update docblock on $role->hasPermissionTo() to include BackedEnum
Co-authored-by: Sander Muller <[email protected]>
1 parent 3ebab01 commit 59b966f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Contracts/Role.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static function findOrCreate(string $name, ?string $guardName): self;
4444
/**
4545
* Determine if the user may perform the given permission.
4646
*
47-
* @param string|\Spatie\Permission\Contracts\Permission $permission
47+
* @param string|int|\Spatie\Permission\Contracts\Permission|\BackedEnum $permission
4848
*/
4949
public function hasPermissionTo($permission, ?string $guardName): bool;
5050
}

src/Models/Role.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ protected static function findByParam(array $params = []): ?RoleContract
172172
/**
173173
* Determine if the role may perform the given permission.
174174
*
175-
* @param string|int|Permission|\BackedEnum $permission
175+
* @param string|int|\Spatie\Permission\Contracts\Permission|\BackedEnum $permission
176176
*
177177
* @throws PermissionDoesNotExist|GuardDoesNotMatch
178178
*/

0 commit comments

Comments
 (0)