diff options
Diffstat (limited to 'Acl')
-rw-r--r-- | Acl/Dbal/MutableAclProvider.php | 20 | ||||
-rw-r--r-- | Acl/Domain/ObjectIdentity.php | 4 | ||||
-rw-r--r-- | Acl/Domain/PermissionGrantingStrategy.php | 2 | ||||
-rw-r--r-- | Acl/Model/AclInterface.php | 4 | ||||
-rw-r--r-- | Acl/Model/MutableAclProviderInterface.php | 4 | ||||
-rw-r--r-- | Acl/Permission/MaskBuilder.php | 4 | ||||
-rw-r--r-- | Acl/Resources/bin/generateSql.php | 2 | ||||
-rw-r--r-- | Acl/Tests/Domain/ObjectIdentityTest.php | 26 |
8 files changed, 35 insertions, 31 deletions
diff --git a/Acl/Dbal/MutableAclProvider.php b/Acl/Dbal/MutableAclProvider.php index 273625a..bd1976f 100644 --- a/Acl/Dbal/MutableAclProvider.php +++ b/Acl/Dbal/MutableAclProvider.php @@ -554,9 +554,9 @@ QUERY; * * @param SecurityIdentityInterface $sid * - * @throws \InvalidArgumentException - * * @return string + * + * @throws \InvalidArgumentException */ protected function getInsertSecurityIdentitySql(SecurityIdentityInterface $sid) { @@ -626,9 +626,9 @@ QUERY; * * @param SecurityIdentityInterface $sid * - * @throws \InvalidArgumentException - * * @return string + * + * @throws \InvalidArgumentException */ protected function getSelectSecurityIdentityIdSql(SecurityIdentityInterface $sid) { @@ -655,9 +655,9 @@ QUERY; * * @param SecurityIdentityInterface $sid * - * @throws \InvalidArgumentException - * * @return string + * + * @throws \InvalidArgumentException */ protected function getDeleteSecurityIdentityIdSql(SecurityIdentityInterface $sid) { @@ -673,9 +673,9 @@ QUERY; * @param int $pk * @param array $changes * - * @throws \InvalidArgumentException - * * @return string + * + * @throws \InvalidArgumentException */ protected function getUpdateObjectIdentitySql($pk, array $changes) { @@ -723,9 +723,9 @@ QUERY; * @param int $pk * @param array $sets * - * @throws \InvalidArgumentException - * * @return string + * + * @throws \InvalidArgumentException */ protected function getUpdateAccessControlEntrySql($pk, array $sets) { diff --git a/Acl/Domain/ObjectIdentity.php b/Acl/Domain/ObjectIdentity.php index 871bda7..ec817e2 100644 --- a/Acl/Domain/ObjectIdentity.php +++ b/Acl/Domain/ObjectIdentity.php @@ -52,9 +52,9 @@ final class ObjectIdentity implements ObjectIdentityInterface * * @param object $domainObject * - * @throws InvalidDomainObjectException - * * @return ObjectIdentity + * + * @throws InvalidDomainObjectException */ public static function fromDomainObject($domainObject) { diff --git a/Acl/Domain/PermissionGrantingStrategy.php b/Acl/Domain/PermissionGrantingStrategy.php index 742c4e5..f8a09a6 100644 --- a/Acl/Domain/PermissionGrantingStrategy.php +++ b/Acl/Domain/PermissionGrantingStrategy.php @@ -130,7 +130,7 @@ class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface * @param SecurityIdentityInterface[] $sids An array of SecurityIdentityInterface implementations * @param bool $administrativeMode True turns off audit logging * - * @return bool true, or false; either granting, or denying access respectively. + * @return bool true, or false; either granting, or denying access respectively * * @throws NoAceFoundException */ diff --git a/Acl/Model/AclInterface.php b/Acl/Model/AclInterface.php index 6a70a7c..13a6cf8 100644 --- a/Acl/Model/AclInterface.php +++ b/Acl/Model/AclInterface.php @@ -97,9 +97,9 @@ interface AclInterface extends \Serializable * @param array $securityIdentities * @param bool $administrativeMode * - * @throws NoAceFoundException when no ACE was applicable for this request - * * @return bool + * + * @throws NoAceFoundException when no ACE was applicable for this request */ public function isGranted(array $masks, array $securityIdentities, $administrativeMode = false); diff --git a/Acl/Model/MutableAclProviderInterface.php b/Acl/Model/MutableAclProviderInterface.php index 95f531e..ee6d7c4 100644 --- a/Acl/Model/MutableAclProviderInterface.php +++ b/Acl/Model/MutableAclProviderInterface.php @@ -25,10 +25,10 @@ interface MutableAclProviderInterface extends AclProviderInterface * * @param ObjectIdentityInterface $oid * + * @return MutableAclInterface + * * @throws AclAlreadyExistsException when there already is an ACL for the given * object identity - * - * @return MutableAclInterface */ public function createAcl(ObjectIdentityInterface $oid); diff --git a/Acl/Permission/MaskBuilder.php b/Acl/Permission/MaskBuilder.php index 0b5f388..ed13ecb 100644 --- a/Acl/Permission/MaskBuilder.php +++ b/Acl/Permission/MaskBuilder.php @@ -96,10 +96,10 @@ class MaskBuilder extends AbstractMaskBuilder * * @param int $mask * + * @return string + * * @throws \InvalidArgumentException * @throws \RuntimeException - * - * @return string */ public static function getCode($mask) { diff --git a/Acl/Resources/bin/generateSql.php b/Acl/Resources/bin/generateSql.php index 4b1b38d..c425651 100644 --- a/Acl/Resources/bin/generateSql.php +++ b/Acl/Resources/bin/generateSql.php @@ -37,7 +37,7 @@ $reflection = new ReflectionClass('Doctrine\\DBAL\\Platforms\\AbstractPlatform') $finder = new Finder(); $finder->name('*Platform.php')->in(dirname($reflection->getFileName())); foreach ($finder as $file) { - require_once $file->getPathName(); + require_once $file->getPathname(); $className = 'Doctrine\\DBAL\\Platforms\\'.$file->getBasename('.php'); $reflection = new ReflectionClass($className); diff --git a/Acl/Tests/Domain/ObjectIdentityTest.php b/Acl/Tests/Domain/ObjectIdentityTest.php index 70f89a3..770ada7 100644 --- a/Acl/Tests/Domain/ObjectIdentityTest.php +++ b/Acl/Tests/Domain/ObjectIdentityTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Security\Acl\Tests\Domain { use Symfony\Component\Security\Acl\Domain\ObjectIdentity; + use Symfony\Component\Security\Acl\Model\DomainObjectInterface; class ObjectIdentityTest extends \PHPUnit_Framework_TestCase { @@ -34,17 +35,7 @@ namespace Symfony\Component\Security\Acl\Tests\Domain public function testFromDomainObjectPrefersInterfaceOverGetId() { - $domainObject = $this->getMock('Symfony\Component\Security\Acl\Model\DomainObjectInterface'); - $domainObject - ->expects($this->once()) - ->method('getObjectIdentifier') - ->will($this->returnValue('getObjectIdentifier()')) - ; - $domainObject - ->expects($this->never()) - ->method('getId') - ->will($this->returnValue('getId()')) - ; + $domainObject = new DomainObjectImplementation(); $id = ObjectIdentity::fromDomainObject($domainObject); $this->assertEquals('getObjectIdentifier()', $id->getIdentifier()); @@ -121,6 +112,19 @@ namespace Symfony\Component\Security\Acl\Tests\Domain return $this->id; } } + + class DomainObjectImplementation implements DomainObjectInterface + { + public function getObjectIdentifier() + { + return 'getObjectIdentifier()'; + } + + public function getId() + { + return 'getId()'; + } + } } namespace Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain |