diff options
Diffstat (limited to 'Acl')
-rw-r--r-- | Acl/Dbal/AclProvider.php | 13 | ||||
-rw-r--r-- | Acl/Dbal/MutableAclProvider.php | 2 | ||||
-rw-r--r-- | Acl/Domain/DoctrineAclCache.php | 8 | ||||
-rw-r--r-- | Acl/Domain/ObjectIdentityRetrievalStrategy.php | 2 | ||||
-rw-r--r-- | Acl/Permission/BasicPermissionMap.php | 2 |
5 files changed, 19 insertions, 8 deletions
diff --git a/Acl/Dbal/AclProvider.php b/Acl/Dbal/AclProvider.php index eba67ed..c422c2d 100644 --- a/Acl/Dbal/AclProvider.php +++ b/Acl/Dbal/AclProvider.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Security\Acl\Dbal; -use Doctrine\DBAL\Driver\Connection; +use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver\Statement; use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Domain\Acl; @@ -38,11 +38,22 @@ class AclProvider implements AclProviderInterface { const MAX_BATCH_SIZE = 30; + /** + * @var AclCacheInterface|null + */ protected $cache; + + /** + * @var Connection + */ protected $connection; protected $loadedAces = array(); protected $loadedAcls = array(); protected $options; + + /** + * @var PermissionGrantingStrategyInterface + */ private $permissionGrantingStrategy; /** diff --git a/Acl/Dbal/MutableAclProvider.php b/Acl/Dbal/MutableAclProvider.php index ae86060..42803ac 100644 --- a/Acl/Dbal/MutableAclProvider.php +++ b/Acl/Dbal/MutableAclProvider.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Security\Acl\Dbal; use Doctrine\Common\PropertyChangedListener; -use Doctrine\DBAL\Driver\Connection; +use Doctrine\DBAL\Connection; use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity; use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; use Symfony\Component\Security\Acl\Exception\AclAlreadyExistsException; diff --git a/Acl/Domain/DoctrineAclCache.php b/Acl/Domain/DoctrineAclCache.php index b680fb1..9e14af5 100644 --- a/Acl/Domain/DoctrineAclCache.php +++ b/Acl/Domain/DoctrineAclCache.php @@ -96,14 +96,14 @@ class DoctrineAclCache implements AclCacheInterface { $lookupKey = $this->getAliasKeyForIdentity($aclId); if (!$this->cache->contains($lookupKey)) { - return null; + return; } $key = $this->cache->fetch($lookupKey); if (!$this->cache->contains($key)) { $this->cache->delete($lookupKey); - return null; + return; } return $this->unserializeAcl($this->cache->fetch($key)); @@ -116,7 +116,7 @@ class DoctrineAclCache implements AclCacheInterface { $key = $this->getDataKeyByIdentity($oid); if (!$this->cache->contains($key)) { - return null; + return; } return $this->unserializeAcl($this->cache->fetch($key)); @@ -154,7 +154,7 @@ class DoctrineAclCache implements AclCacheInterface $parentAcl = $this->getFromCacheById($parentId); if (null === $parentAcl) { - return null; + return; } $acl->setParentAcl($parentAcl); diff --git a/Acl/Domain/ObjectIdentityRetrievalStrategy.php b/Acl/Domain/ObjectIdentityRetrievalStrategy.php index 7dc552c..fc66856 100644 --- a/Acl/Domain/ObjectIdentityRetrievalStrategy.php +++ b/Acl/Domain/ObjectIdentityRetrievalStrategy.php @@ -29,7 +29,7 @@ class ObjectIdentityRetrievalStrategy implements ObjectIdentityRetrievalStrategy try { return ObjectIdentity::fromDomainObject($domainObject); } catch (InvalidDomainObjectException $failed) { - return null; + return; } } } diff --git a/Acl/Permission/BasicPermissionMap.php b/Acl/Permission/BasicPermissionMap.php index 30d801f..fa3d543 100644 --- a/Acl/Permission/BasicPermissionMap.php +++ b/Acl/Permission/BasicPermissionMap.php @@ -92,7 +92,7 @@ class BasicPermissionMap implements PermissionMapInterface public function getMasks($permission, $object) { if (!isset($this->map[$permission])) { - return null; + return; } return $this->map[$permission]; |