Skip to content

Commit

Permalink
Fixed exception class visibility and simplified array check in Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Demarcy committed May 19, 2016
1 parent 6bd4d42 commit aa934a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Drivers/ArrayDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function hasRolePermission(Role $role, Permission $permission)
*/
public function clearPermissionsForResource(Resource $resource)
{
throw new Exception('Unimplemented method "ArrayDriver::clearPermissionsForResource"');
throw new \Exception('Unimplemented method "ArrayDriver::clearPermissionsForResource"');
}

/**
Expand Down
8 changes: 3 additions & 5 deletions src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,10 @@ protected function findRole($role)
* @param array $resources an array of Resource objects
* @return void
*/
public function clearPermissionsForResources($resources)
public function clearPermissionsForResources(array $resources)
{
if(is_array($resources)) {
foreach($resources as $resource) {
$this->driver->clearPermissionsForResource($resource);
}
foreach($resources as $resource) {
$this->driver->clearPermissionsForResource($resource);
}
}

Expand Down

0 comments on commit aa934a4

Please sign in to comment.