Skip to content

Commit

Permalink
permissions : docBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
jmleroux committed Mar 14, 2014
1 parent c1ad59d commit b78dabd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/Zend/Permissions/Rbac/Rbac.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public function getRole($objectOrName)

$it = new RecursiveIteratorIterator($this, RecursiveIteratorIterator::CHILD_FIRST);
foreach ($it as $leaf) {
/* @var RoleInterface $leaf */
if ((is_string($objectOrName) && $leaf->getName() == $objectOrName) || $leaf == $objectOrName) {
return $leaf;
}
Expand All @@ -124,9 +125,10 @@ public function getRole($objectOrName)
/**
* Determines if access is granted by checking the role and child roles for permission.
*
* @param RoleInterface|string $role
* @param string $permission
* @param RoleInterface|string $role
* @param string $permission
* @param AssertionInterface|Callable|null $assert
* @throws Exception\InvalidArgumentException
* @return bool
*/
public function isGranted($role, $permission, $assert = null)
Expand Down

0 comments on commit b78dabd

Please sign in to comment.