Skip to content

Commit

Permalink
Added some annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
jrabausch committed Apr 19, 2021
1 parent 8cb4a5f commit f25424a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Rbac.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

class Rbac
{
/** @var array<string, RoleInterface> */
protected $roles = [];

public function addRole(RoleInterface $role): self
Expand Down
1 change: 1 addition & 0 deletions src/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

class Role implements RoleInterface
{
/** @var array<string, true> */
protected $permissions = [];

/** @var string */
Expand Down
2 changes: 1 addition & 1 deletion src/RoleInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
interface RoleInterface
{
public function getName(): string;
public function addPermission(string $name);
public function addPermission(string $name): self;
public function hasPermission(string $name): bool;
public function getPermissions(): array;
}

0 comments on commit f25424a

Please sign in to comment.