Skip to content

Commit

Permalink
Update docblock on $role->hasPermissionTo() to include BackedEnum
Browse files Browse the repository at this point in the history
Co-authored-by: Sander Muller <[email protected]>
  • Loading branch information
drbyte and SanderMuller committed Jun 22, 2024
1 parent 3ebab01 commit 59b966f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Contracts/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static function findOrCreate(string $name, ?string $guardName): self;
/**
* Determine if the user may perform the given permission.
*
* @param string|\Spatie\Permission\Contracts\Permission $permission
* @param string|int|\Spatie\Permission\Contracts\Permission|\BackedEnum $permission
*/
public function hasPermissionTo($permission, ?string $guardName): bool;
}
2 changes: 1 addition & 1 deletion src/Models/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected static function findByParam(array $params = []): ?RoleContract
/**
* Determine if the role may perform the given permission.
*
* @param string|int|Permission|\BackedEnum $permission
* @param string|int|\Spatie\Permission\Contracts\Permission|\BackedEnum $permission
*
* @throws PermissionDoesNotExist|GuardDoesNotMatch
*/
Expand Down

0 comments on commit 59b966f

Please sign in to comment.