summaryrefslogtreecommitdiffstats
path: root/Acl/Domain
diff options
context:
space:
mode:
Diffstat (limited to 'Acl/Domain')
-rw-r--r--Acl/Domain/AclCollectionCache.php4
-rw-r--r--Acl/Domain/DoctrineAclCache.php2
-rw-r--r--Acl/Domain/ObjectIdentity.php4
-rw-r--r--Acl/Domain/PermissionGrantingStrategy.php17
-rw-r--r--Acl/Domain/UserSecurityIdentity.php2
5 files changed, 21 insertions, 8 deletions
diff --git a/Acl/Domain/AclCollectionCache.php b/Acl/Domain/AclCollectionCache.php
index 88c017c..d3a4b37 100644
--- a/Acl/Domain/AclCollectionCache.php
+++ b/Acl/Domain/AclCollectionCache.php
@@ -44,8 +44,8 @@ class AclCollectionCache
* Batch loads ACLs for an entire collection; thus, it reduces the number
* of required queries considerably.
*
- * @param mixed $collection anything that can be passed to foreach()
- * @param array $tokens an array of TokenInterface implementations
+ * @param mixed $collection anything that can be passed to foreach()
+ * @param TokenInterface[] $tokens an array of TokenInterface implementations
*/
public function cache($collection, array $tokens = array())
{
diff --git a/Acl/Domain/DoctrineAclCache.php b/Acl/Domain/DoctrineAclCache.php
index 731f98c..bfc5452 100644
--- a/Acl/Domain/DoctrineAclCache.php
+++ b/Acl/Domain/DoctrineAclCache.php
@@ -36,6 +36,8 @@ class DoctrineAclCache implements AclCacheInterface
* @param Cache $cache
* @param PermissionGrantingStrategyInterface $permissionGrantingStrategy
* @param string $prefix
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct(Cache $cache, PermissionGrantingStrategyInterface $permissionGrantingStrategy, $prefix = self::PREFIX)
{
diff --git a/Acl/Domain/ObjectIdentity.php b/Acl/Domain/ObjectIdentity.php
index da98f5e..d7d5f84 100644
--- a/Acl/Domain/ObjectIdentity.php
+++ b/Acl/Domain/ObjectIdentity.php
@@ -31,6 +31,8 @@ final class ObjectIdentity implements ObjectIdentityInterface
*
* @param string $identifier
* @param string $type
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct($identifier, $type)
{
@@ -49,7 +51,7 @@ final class ObjectIdentity implements ObjectIdentityInterface
* Constructs an ObjectIdentity for the given domain object
*
* @param object $domainObject
- * @throws \InvalidArgumentException
+ * @throws InvalidDomainObjectException
* @return ObjectIdentity
*/
public static function fromDomainObject($domainObject)
diff --git a/Acl/Domain/PermissionGrantingStrategy.php b/Acl/Domain/PermissionGrantingStrategy.php
index 09e227c..d505843 100644
--- a/Acl/Domain/PermissionGrantingStrategy.php
+++ b/Acl/Domain/PermissionGrantingStrategy.php
@@ -16,6 +16,7 @@ use Symfony\Component\Security\Acl\Model\AclInterface;
use Symfony\Component\Security\Acl\Model\AuditLoggerInterface;
use Symfony\Component\Security\Acl\Model\EntryInterface;
use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface;
+use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface;
/**
* The permission granting strategy to apply to the access control list.
@@ -123,12 +124,15 @@ class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface
* permission/identity combinations are left. Finally, we will either throw
* an NoAceFoundException, or deny access.
*
- * @param AclInterface $acl
- * @param array $aces An array of ACE to check against
- * @param array $masks An array of permission masks
- * @param array $sids An array of SecurityIdentityInterface implementations
- * @param Boolean $administrativeMode True turns off audit logging
+ * @param AclInterface $acl
+ * @param EntryInterface[] $aces An array of ACE to check against
+ * @param array $masks An array of permission masks
+ * @param SecurityIdentityInterface[] $sids An array of SecurityIdentityInterface implementations
+ * @param Boolean $administrativeMode True turns off audit logging
+ *
* @return Boolean true, or false; either granting, or denying access respectively.
+ *
+ * @throws NoAceFoundException
*/
private function hasSufficientPermissions(AclInterface $acl, array $aces, array $masks, array $sids, $administrativeMode)
{
@@ -186,7 +190,10 @@ class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface
*
* @param integer $requiredMask
* @param EntryInterface $ace
+ *
* @return Boolean
+ *
+ * @throws \RuntimeException if the ACE strategy is not supported
*/
private function isAceApplicable($requiredMask, EntryInterface $ace)
{
diff --git a/Acl/Domain/UserSecurityIdentity.php b/Acl/Domain/UserSecurityIdentity.php
index ebb0056..3166a1a 100644
--- a/Acl/Domain/UserSecurityIdentity.php
+++ b/Acl/Domain/UserSecurityIdentity.php
@@ -31,6 +31,8 @@ final class UserSecurityIdentity implements SecurityIdentityInterface
*
* @param string $username the username representation
* @param string $class the user's fully qualified class name
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct($username, $class)
{