Skip to content

Commit c80b5c5

Browse files
Merge pull request #3 from DocPlanner/dq/php-update
Rename ObjectInterface to ItemInterface
2 parents fd27c73 + f4749c5 commit c80b5c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Voter/GateKeeper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace GateKeeperBundle\Voter;
88

99
use GateKeeper\GateKeeper as Keeper;
10-
use GateKeeper\Object\ObjectInterface;
10+
use GateKeeper\Item\ItemInterface;
1111
use GateKeeper\Provider\GatesProviderInterface;
1212
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1313
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
@@ -86,7 +86,7 @@ public function vote(TokenInterface $token, $object, array $attributes)
8686
throw new \InvalidArgumentException('Only one attribute is allowed');
8787
}
8888

89-
$user = $token->getUser() instanceof ObjectInterface ? $token->getUser() : null;
89+
$user = $token->getUser() instanceof ItemInterface ? $token->getUser() : null;
9090
$object = is_array($object) ? $object : [];
9191

9292
if ($this->gateKeeper->hasAccess($attributes[0], $user, $object))
@@ -96,4 +96,4 @@ public function vote(TokenInterface $token, $object, array $attributes)
9696

9797
return self::ACCESS_DENIED;
9898
}
99-
}
99+
}

0 commit comments

Comments
 (0)