Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Small optimization in checking assertions #140

Merged
merged 2 commits into from
Dec 23, 2013

Conversation

danizord
Copy link
Member

Just removes the $isGranted

@@ -18,6 +18,7 @@

namespace ZfcRbac\Service;

use Callable;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it. use only "callable" in docblock. callable is not a class, it's a type.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bakura10 😅 I thought it was an interface such as Traversable. Fixed.

if ($this->rbac->isGranted($role, $permission)) {
$isGranted = true;
break;
return ($assertion) ? $this->assert($assertion) : true;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ternary operator here is ok? Looks readable?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) when pulling a834856 on danizord:hotfix/assertion into 3ddff4f on ZF-Commons:assertion.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 9741bb2 on danizord:hotfix/assertion into 3ddff4f on ZF-Commons:assertion.

bakura10 added a commit that referenced this pull request Dec 23, 2013
Small optimization in checking assertions
@bakura10 bakura10 merged commit d6da63a into ZF-Commons:assertion Dec 23, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants