diff --git a/src/Auth/Roles/Interfaces/CapabilityInterface.php b/src/Auth/Roles/Interfaces/CapabilityInterface.php index 16e86a5..3cb68fa 100644 --- a/src/Auth/Roles/Interfaces/CapabilityInterface.php +++ b/src/Auth/Roles/Interfaces/CapabilityInterface.php @@ -5,13 +5,45 @@ interface CapabilityInterface { + /** + * Check if the capability has a role + * + * @param RoleInterface|string $role + * @return bool + */ public function has(RoleInterface|string $role) : bool; + /** + * Add a role to the capability + * @param RoleInterface|string $role + */ + public function add(RoleInterface|string $role); + + /** + * Get role identity + * + * @return string + */ public function getIdentity(): string; + /** + * Get capability name + * + * @return string + */ public function getName(): string; + /** + * Get capability description + * + * @return string|null + */ public function getDescription(): ?string; + /** + * Get list of roles + * + * @return iterable + */ public function getRoles() : iterable; }