diff options
author | Graham Campbell <graham@mineuk.com> | 2014-11-30 13:33:44 +0000 |
---|---|---|
committer | Graham Campbell <graham@mineuk.com> | 2014-11-30 13:33:44 +0000 |
commit | e5dfe6a3e96c71e87c0ca9aa84115accd9ebb229 (patch) | |
tree | 197d405115891642eb8c9eb488b775251c427e98 | |
parent | c54f038a64896f2963a4412974b10cd341ac6e73 (diff) | |
download | symfony-security-e5dfe6a3e96c71e87c0ca9aa84115accd9ebb229.zip symfony-security-e5dfe6a3e96c71e87c0ca9aa84115accd9ebb229.tar.gz symfony-security-e5dfe6a3e96c71e87c0ca9aa84115accd9ebb229.tar.bz2 |
Docblock fixes
37 files changed, 201 insertions, 141 deletions
diff --git a/Acl/Dbal/AclProvider.php b/Acl/Dbal/AclProvider.php index 96b6a4b..39d3efe 100644 --- a/Acl/Dbal/AclProvider.php +++ b/Acl/Dbal/AclProvider.php @@ -223,6 +223,7 @@ class AclProvider implements AclProviderInterface * ACEs, and security identities. * * @param array $ancestorIds + * * @return string */ protected function getLookupSql(array $ancestorIds) @@ -328,6 +329,7 @@ SELECTCLAUSE; * * @param ObjectIdentityInterface $oid * @param bool $directChildrenOnly + * * @return string */ protected function getFindChildrenSql(ObjectIdentityInterface $oid, $directChildrenOnly) @@ -359,6 +361,7 @@ FINDCHILDREN; * identity. * * @param ObjectIdentityInterface $oid + * * @return string */ protected function getSelectObjectIdentityIdSql(ObjectIdentityInterface $oid) @@ -383,6 +386,7 @@ QUERY; * Returns the primary key of the passed object identity. * * @param ObjectIdentityInterface $oid + * * @return int */ final protected function retrieveObjectIdentityPrimaryKey(ObjectIdentityInterface $oid) @@ -491,8 +495,10 @@ QUERY; * @param Statement $stmt * @param array $oidLookup * @param array $sids - * @throws \RuntimeException + * * @return \SplObjectStorage + * + * @throws \RuntimeException */ private function hydrateObjectIdentities(Statement $stmt, array $oidLookup, array $sids) { diff --git a/Acl/Dbal/MutableAclProvider.php b/Acl/Dbal/MutableAclProvider.php index 2a4eac0..558691a 100644 --- a/Acl/Dbal/MutableAclProvider.php +++ b/Acl/Dbal/MutableAclProvider.php @@ -354,7 +354,8 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf /** * Constructs the SQL for deleting access control entries. * - * @param int $oidPK + * @param int $oidPK + * * @return string */ protected function getDeleteAccessControlEntriesSql($oidPK) @@ -369,7 +370,8 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf /** * Constructs the SQL for deleting a specific ACE. * - * @param int $acePK + * @param int $acePK + * * @return string */ protected function getDeleteAccessControlEntrySql($acePK) @@ -384,7 +386,8 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf /** * Constructs the SQL for deleting an object identity. * - * @param int $pk + * @param int $pk + * * @return string */ protected function getDeleteObjectIdentitySql($pk) @@ -399,7 +402,8 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf /** * Constructs the SQL for deleting relation entries. * - * @param int $pk + * @param int $pk + * * @return string */ protected function getDeleteObjectIdentityRelationsSql($pk) @@ -414,16 +418,17 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf /** * Constructs the SQL for inserting an ACE. * - * @param int $classId - * @param int|null $objectIdentityId - * @param string|null $field - * @param int $aceOrder - * @param int $securityIdentityId - * @param string $strategy - * @param int $mask - * @param bool $granting - * @param bool $auditSuccess - * @param bool $auditFailure + * @param int $classId + * @param int|null $objectIdentityId + * @param string|null $field + * @param int $aceOrder + * @param int $securityIdentityId + * @param string $strategy + * @param int $mask + * @param bool $granting + * @param bool $auditSuccess + * @param bool $auditFailure + * * @return string */ protected function getInsertAccessControlEntrySql($classId, $objectIdentityId, $field, $aceOrder, $securityIdentityId, $strategy, $mask, $granting, $auditSuccess, $auditFailure) @@ -464,6 +469,7 @@ QUERY; * Constructs the SQL for inserting a new class type. * * @param string $classType + * * @return string */ protected function getInsertClassSql($classType) @@ -478,8 +484,9 @@ QUERY; /** * Constructs the SQL for inserting a relation entry. * - * @param int $objectIdentityId - * @param int $ancestorId + * @param int $objectIdentityId + * @param int $ancestorId + * * @return string */ protected function getInsertObjectIdentityRelationSql($objectIdentityId, $ancestorId) @@ -495,9 +502,10 @@ QUERY; /** * Constructs the SQL for inserting an object identity. * - * @param string $identifier - * @param int $classId - * @param bool $entriesInheriting + * @param string $identifier + * @param int $classId + * @param bool $entriesInheriting + * * @return string */ protected function getInsertObjectIdentitySql($identifier, $classId, $entriesInheriting) @@ -520,7 +528,9 @@ QUERY; * Constructs the SQL for inserting a security identity. * * @param SecurityIdentityInterface $sid + * * @throws \InvalidArgumentException + * * @return string */ protected function getInsertSecurityIdentitySql(SecurityIdentityInterface $sid) @@ -546,10 +556,11 @@ QUERY; /** * Constructs the SQL for selecting an ACE. * - * @param int $classId - * @param int $oid - * @param string $field - * @param int $order + * @param int $classId + * @param int $oid + * @param string $field + * @param int $order + * * @return string */ protected function getSelectAccessControlEntryIdSql($classId, $oid, $field, $order) @@ -573,6 +584,7 @@ QUERY; * the passed class type. * * @param string $classType + * * @return string */ protected function getSelectClassIdSql($classType) @@ -588,7 +600,9 @@ QUERY; * Constructs the SQL for selecting the primary key of a security identity. * * @param SecurityIdentityInterface $sid + * * @throws \InvalidArgumentException + * * @return string */ protected function getSelectSecurityIdentityIdSql(SecurityIdentityInterface $sid) @@ -614,9 +628,11 @@ QUERY; /** * Constructs the SQL for updating an object identity. * - * @param int $pk - * @param array $changes + * @param int $pk + * @param array $changes + * * @throws \InvalidArgumentException + * * @return string */ protected function getUpdateObjectIdentitySql($pk, array $changes) @@ -636,9 +652,11 @@ QUERY; /** * Constructs the SQL for updating an ACE. * - * @param int $pk - * @param array $sets + * @param int $pk + * @param array $sets + * * @throws \InvalidArgumentException + * * @return string */ protected function getUpdateAccessControlEntrySql($pk, array $sets) @@ -673,6 +691,7 @@ QUERY; * If the type does not yet exist in the database, it will be created. * * @param string $classType + * * @return int */ private function createOrRetrieveClassId($classType) @@ -693,6 +712,7 @@ QUERY; * created. * * @param SecurityIdentityInterface $sid + * * @return int */ private function createOrRetrieveSecurityIdentityId(SecurityIdentityInterface $sid) @@ -709,7 +729,7 @@ QUERY; /** * Deletes all ACEs for the given object identity primary key. * - * @param int $oidPK + * @param int $oidPK */ private function deleteAccessControlEntries($oidPK) { @@ -719,7 +739,7 @@ QUERY; /** * Deletes the object identity from the database. * - * @param int $pk + * @param int $pk */ private function deleteObjectIdentity($pk) { @@ -729,7 +749,7 @@ QUERY; /** * Deletes all entries from the relations table from the database. * - * @param int $pk + * @param int $pk */ private function deleteObjectIdentityRelations($pk) { diff --git a/Acl/Domain/Acl.php b/Acl/Domain/Acl.php index f426f34..a649d36 100644 --- a/Acl/Domain/Acl.php +++ b/Acl/Domain/Acl.php @@ -397,8 +397,9 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged /** * Deletes an ACE * - * @param string $property - * @param int $index + * @param string $property + * @param int $index + * * @throws \OutOfBoundsException */ private function deleteAce($property, $index) @@ -421,9 +422,10 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged /** * Deletes a field-based ACE * - * @param string $property - * @param int $index - * @param string $field + * @param string $property + * @param int $index + * @param string $field + * * @throws \OutOfBoundsException */ private function deleteFieldAce($property, $index, $field) @@ -452,6 +454,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged * @param SecurityIdentityInterface $sid * @param bool $granting * @param string $strategy + * * @throws \OutOfBoundsException * @throws \InvalidArgumentException */ @@ -501,6 +504,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged * @param SecurityIdentityInterface $sid * @param bool $granting * @param string $strategy + * * @throws \InvalidArgumentException * @throws \OutOfBoundsException */ @@ -551,10 +555,11 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged /** * Updates an ACE * - * @param string $property - * @param int $index - * @param int $mask - * @param string $strategy + * @param string $property + * @param int $index + * @param int $mask + * @param string $strategy + * * @throws \OutOfBoundsException */ private function updateAce($property, $index, $mask, $strategy = null) @@ -578,10 +583,11 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged /** * Updates auditing for an ACE * - * @param array &$aces - * @param int $index - * @param bool $auditSuccess - * @param bool $auditFailure + * @param array &$aces + * @param int $index + * @param bool $auditSuccess + * @param bool $auditFailure + * * @throws \OutOfBoundsException */ private function updateAuditing(array &$aces, $index, $auditSuccess, $auditFailure) @@ -604,11 +610,12 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged /** * Updates a field-based ACE * - * @param string $property - * @param int $index - * @param string $field - * @param int $mask - * @param string $strategy + * @param string $property + * @param int $index + * @param string $field + * @param int $mask + * @param string $strategy + * * @throws \InvalidArgumentException * @throws \OutOfBoundsException */ diff --git a/Acl/Domain/DoctrineAclCache.php b/Acl/Domain/DoctrineAclCache.php index 0c69773..00864f0 100644 --- a/Acl/Domain/DoctrineAclCache.php +++ b/Acl/Domain/DoctrineAclCache.php @@ -147,6 +147,7 @@ class DoctrineAclCache implements AclCacheInterface * Unserializes the ACL. * * @param string $serialized + * * @return AclInterface */ private function unserializeAcl($serialized) @@ -205,6 +206,7 @@ class DoctrineAclCache implements AclCacheInterface * Returns the key for the object identity * * @param ObjectIdentityInterface $oid + * * @return string */ private function getDataKeyByIdentity(ObjectIdentityInterface $oid) @@ -217,6 +219,7 @@ class DoctrineAclCache implements AclCacheInterface * Returns the alias key for the object identity key * * @param string $aclId + * * @return string */ private function getAliasKeyForIdentity($aclId) diff --git a/Acl/Domain/Entry.php b/Acl/Domain/Entry.php index b5eb28b..a487c96 100644 --- a/Acl/Domain/Entry.php +++ b/Acl/Domain/Entry.php @@ -125,7 +125,7 @@ class Entry implements AuditableEntryInterface * Do never call this method directly. Use the respective methods on the * AclInterface instead. * - * @param bool $boolean + * @param bool $boolean */ public function setAuditFailure($boolean) { @@ -138,7 +138,7 @@ class Entry implements AuditableEntryInterface * Do never call this method directly. Use the respective methods on the * AclInterface instead. * - * @param bool $boolean + * @param bool $boolean */ public function setAuditSuccess($boolean) { @@ -151,7 +151,7 @@ class Entry implements AuditableEntryInterface * Do never call this method directly. Use the respective methods on the * AclInterface instead. * - * @param int $mask + * @param int $mask */ public function setMask($mask) { diff --git a/Acl/Domain/ObjectIdentity.php b/Acl/Domain/ObjectIdentity.php index cf10330..1111089 100644 --- a/Acl/Domain/ObjectIdentity.php +++ b/Acl/Domain/ObjectIdentity.php @@ -51,7 +51,9 @@ final class ObjectIdentity implements ObjectIdentityInterface * Constructs an ObjectIdentity for the given domain object * * @param object $domainObject + * * @throws InvalidDomainObjectException + * * @return ObjectIdentity */ public static function fromDomainObject($domainObject) diff --git a/Acl/Domain/PermissionGrantingStrategy.php b/Acl/Domain/PermissionGrantingStrategy.php index 81ed9d8..5d91f61 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/Domain/UserSecurityIdentity.php b/Acl/Domain/UserSecurityIdentity.php index 9418c81..a5b3d77 100644 --- a/Acl/Domain/UserSecurityIdentity.php +++ b/Acl/Domain/UserSecurityIdentity.php @@ -51,6 +51,7 @@ final class UserSecurityIdentity implements SecurityIdentityInterface * Creates a user security identity from a UserInterface * * @param UserInterface $user + * * @return UserSecurityIdentity */ public static function fromAccount(UserInterface $user) @@ -62,6 +63,7 @@ final class UserSecurityIdentity implements SecurityIdentityInterface * Creates a user security identity from a TokenInterface * * @param TokenInterface $token + * * @return UserSecurityIdentity */ public static function fromToken(TokenInterface $token) diff --git a/Acl/Model/AclCacheInterface.php b/Acl/Model/AclCacheInterface.php index 4673e01..03431db 100644 --- a/Acl/Model/AclCacheInterface.php +++ b/Acl/Model/AclCacheInterface.php @@ -37,7 +37,8 @@ interface AclCacheInterface /** * Retrieves an ACL for the given object identity primary key from the cache * - * @param int $primaryKey + * @param int $primaryKey + * * @return AclInterface */ public function getFromCacheById($primaryKey); @@ -46,6 +47,7 @@ interface AclCacheInterface * Retrieves an ACL for the given object identity from the cache * * @param ObjectIdentityInterface $oid + * * @return AclInterface */ public function getFromCacheByIdentity(ObjectIdentityInterface $oid); diff --git a/Acl/Model/AclInterface.php b/Acl/Model/AclInterface.php index 85a4e83..c5bbf18 100644 --- a/Acl/Model/AclInterface.php +++ b/Acl/Model/AclInterface.php @@ -36,6 +36,7 @@ interface AclInterface extends \Serializable * Returns all class-field-based ACEs associated with this ACL * * @param string $field + * * @return array */ public function getClassFieldAces($field); @@ -51,6 +52,7 @@ interface AclInterface extends \Serializable * Returns all object-field-based ACEs associated with this ACL * * @param string $field + * * @return array */ public function getObjectFieldAces($field); @@ -79,10 +81,11 @@ interface AclInterface extends \Serializable /** * Determines whether field access is granted * - * @param string $field - * @param array $masks - * @param array $securityIdentities - * @param bool $administrativeMode + * @param string $field + * @param array $masks + * @param array $securityIdentities + * @param bool $administrativeMode + * * @return bool */ public function isFieldGranted($field, array $masks, array $securityIdentities, $administrativeMode = false); @@ -90,10 +93,12 @@ interface AclInterface extends \Serializable /** * Determines whether access is granted * + * @param array $masks + * @param array $securityIdentities + * @param bool $administrativeMode + * * @throws NoAceFoundException when no ACE was applicable for this request - * @param array $masks - * @param array $securityIdentities - * @param bool $administrativeMode + * * @return bool */ public function isGranted(array $masks, array $securityIdentities, $administrativeMode = false); @@ -102,6 +107,7 @@ interface AclInterface extends \Serializable * Whether the ACL has loaded ACEs for all of the passed security identities * * @param mixed $securityIdentities an implementation of SecurityIdentityInterface, or an array thereof + * * @return bool */ public function isSidLoaded($securityIdentities); diff --git a/Acl/Model/AuditableAclInterface.php b/Acl/Model/AuditableAclInterface.php index f5ed9dd..80b9987 100644 --- a/Acl/Model/AuditableAclInterface.php +++ b/Acl/Model/AuditableAclInterface.php @@ -21,38 +21,38 @@ interface AuditableAclInterface extends MutableAclInterface /** * Updates auditing for class-based ACE * - * @param int $index - * @param bool $auditSuccess - * @param bool $auditFailure + * @param int $index + * @param bool $auditSuccess + * @param bool $auditFailure */ public function updateClassAuditing($index, $auditSuccess, $auditFailure); /** * Updates auditing for class-field-based ACE * - * @param int $index - * @param string $field - * @param bool $auditSuccess - * @param bool $auditFailure + * @param int $index + * @param string $field + * @param bool $auditSuccess + * @param bool $auditFailure */ public function updateClassFieldAuditing($index, $field, $auditSuccess, $auditFailure); /** * Updates auditing for object-based ACE * - * @param int $index - * @param bool $auditSuccess - * @param bool $auditFailure + * @param int $index + * @param bool $auditSuccess + * @param bool $auditFailure */ public function updateObjectAuditing($index, $auditSuccess, $auditFailure); /** * Updates auditing for object-field-based ACE * - * @param int $index - * @param string $field - * @param bool $auditSuccess - * @param bool $auditFailure + * @param int $index + * @param string $field + * @param bool $auditSuccess + * @param bool $auditFailure */ public function updateObjectFieldAuditing($index, $field, $auditSuccess, $auditFailure); } diff --git a/Acl/Model/MutableAclInterface.php b/Acl/Model/MutableAclInterface.php index 8993aa5..f94e909 100644 --- a/Acl/Model/MutableAclInterface.php +++ b/Acl/Model/MutableAclInterface.php @@ -24,30 +24,30 @@ interface MutableAclInterface extends AclInterface /** * Deletes a class-based ACE * - * @param int $index + * @param int $index */ public function deleteClassAce($index); /** * Deletes a class-field-based ACE * - * @param int $index - * @param string $field + * @param int $index + * @param string $field */ public function deleteClassFieldAce($index, $field); /** * Deletes an object-based ACE * - * @param int $index + * @param int $index */ public function deleteObjectAce($index); /** * Deletes an object-field-based ACE * - * @param int $index - * @param string $field + * @param int $index + * @param string $field */ public function deleteObjectFieldAce($index, $field); @@ -107,7 +107,7 @@ interface MutableAclInterface extends AclInterface /** * Sets whether entries are inherited * - * @param bool $boolean + * @param bool $boolean */ public function setEntriesInheriting($boolean); @@ -121,38 +121,38 @@ interface MutableAclInterface extends AclInterface /** * Updates a class-based ACE * - * @param int $index - * @param int $mask - * @param string $strategy if null the strategy should not be changed + * @param int $index + * @param int $mask + * @param string $strategy if null the strategy should not be changed */ public function updateClassAce($index, $mask, $strategy = null); /** * Updates a class-field-based ACE * - * @param int $index - * @param string $field - * @param int $mask - * @param string $strategy if null the strategy should not be changed + * @param int $index + * @param string $field + * @param int $mask + * @param string $strategy if null the strategy should not be changed */ public function updateClassFieldAce($index, $field, $mask, $strategy = null); /** * Updates an object-based ACE * - * @param int $index - * @param int $mask - * @param string $strategy if null the strategy should not be changed + * @param int $index + * @param int $mask + * @param string $strategy if null the strategy should not be changed */ public function updateObjectAce($index, $mask, $strategy = null); /** * Updates an object-field-based ACE * - * @param int $index - * @param string $field - * @param int $mask - * @param string $strategy if null the strategy should not be changed + * @param int $index + * @param string $field + * @param int $mask + * @param string $strategy if null the strategy should not be changed */ public function updateObjectFieldAce($index, $field, $mask, $strategy = null); } diff --git a/Acl/Model/MutableAclProviderInterface.php b/Acl/Model/MutableAclProviderInterface.php index cb34b72..f5bb198 100644 --- a/Acl/Model/MutableAclProviderInterface.php +++ b/Acl/Model/MutableAclProviderInterface.php @@ -21,9 +21,11 @@ interface MutableAclProviderInterface extends AclProviderInterface /** * Creates a new ACL for the given object identity. * - * @throws AclAlreadyExistsException when there already is an ACL for the given - * object identity * @param ObjectIdentityInterface $oid + * + * @throws AclAlreadyExistsException when there already is an ACL for the given + * object identity + * * @return MutableAclInterface */ public function createAcl(ObjectIdentityInterface $oid); diff --git a/Acl/Model/ObjectIdentityInterface.php b/Acl/Model/ObjectIdentityInterface.php index 2ee365f..6574b49 100644 --- a/Acl/Model/ObjectIdentityInterface.php +++ b/Acl/Model/ObjectIdentityInterface.php @@ -28,6 +28,7 @@ interface ObjectIdentityInterface * Example for Object Equality: $object1->getId() === $object2->getId() * * @param ObjectIdentityInterface $identity + * * @return bool */ public function equals(ObjectIdentityInterface $identity); diff --git a/Acl/Model/ObjectIdentityRetrievalStrategyInterface.php b/Acl/Model/ObjectIdentityRetrievalStrategyInterface.php index b0f7f78..d5470ae 100644 --- a/Acl/Model/ObjectIdentityRetrievalStrategyInterface.php +++ b/Acl/Model/ObjectIdentityRetrievalStrategyInterface.php @@ -22,6 +22,7 @@ interface ObjectIdentityRetrievalStrategyInterface * Retrieves the object identity from a domain object * * @param object $domainObject + * * @return ObjectIdentityInterface */ public function getObjectIdentity($domainObject); diff --git a/Acl/Model/PermissionGrantingStrategyInterface.php b/Acl/Model/PermissionGrantingStrategyInterface.php index 25f1687..7ff475f 100644 --- a/Acl/Model/PermissionGrantingStrategyInterface.php +++ b/Acl/Model/PermissionGrantingStrategyInterface.php @@ -25,6 +25,7 @@ interface PermissionGrantingStrategyInterface * @param array $masks * @param array $sids * @param bool $administrativeMode + * * @return bool */ public function isGranted(AclInterface $acl, array $masks, array $sids, $administrativeMode = false); diff --git a/Acl/Permission/MaskBuilder.php b/Acl/Permission/MaskBuilder.php index bcf03c5..89cfd39 100644 --- a/Acl/Permission/MaskBuilder.php +++ b/Acl/Permission/MaskBuilder.php @@ -72,7 +72,7 @@ class MaskBuilder /** * Constructor * - * @param int $mask optional; defaults to 0 + * @param int $mask optional; defaults to 0 * * @throws \InvalidArgumentException */ @@ -178,9 +178,11 @@ class MaskBuilder /** * Returns the code for the passed mask * - * @param int $mask + * @param int $mask + * * @throws \InvalidArgumentException * @throws \RuntimeException + * * @return string */ public static function getCode($mask) diff --git a/Acl/Permission/PermissionMapInterface.php b/Acl/Permission/PermissionMapInterface.php index 20ca181..1b2a7fd 100644 --- a/Acl/Permission/PermissionMapInterface.php +++ b/Acl/Permission/PermissionMapInterface.php @@ -26,6 +26,7 @@ interface PermissionMapInterface * * @param string $permission * @param object $object + * * @return array may return null if permission/object combination is not supported */ public function getMasks($permission, $object); @@ -34,6 +35,7 @@ interface PermissionMapInterface * Whether this map contains the given permission * * @param string $permission + * * @return bool */ public function contains($permission); diff --git a/Core/Authentication/Provider/AuthenticationProviderInterface.php b/Core/Authentication/Provider/AuthenticationProviderInterface.php index 23724db..401df6d 100644 --- a/Core/Authentication/Provider/AuthenticationProviderInterface.php +++ b/Core/Authentication/Provider/AuthenticationProviderInterface.php @@ -29,7 +29,7 @@ interface AuthenticationProviderInterface extends AuthenticationManagerInterface * * @param TokenInterface $token A TokenInterface instance * - * @return bool true if the implementation supports the Token, false otherwise + * @return bool true if the implementation supports the Token, false otherwise */ public function supports(TokenInterface $token); } diff --git a/Core/Authentication/RememberMe/TokenProviderInterface.php b/Core/Authentication/RememberMe/TokenProviderInterface.php index 93ed8d3..67d0bdd 100644 --- a/Core/Authentication/RememberMe/TokenProviderInterface.php +++ b/Core/Authentication/RememberMe/TokenProviderInterface.php @@ -44,6 +44,7 @@ interface TokenProviderInterface * @param string $series * @param string $tokenValue * @param \DateTime $lastUsed + * * @throws TokenNotFoundException if the token is not found */ public function updateToken($series, $tokenValue, \DateTime $lastUsed); diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php index 3982b08..c239f8c 100644 --- a/Core/Authentication/Token/AbstractToken.php +++ b/Core/Authentication/Token/AbstractToken.php @@ -89,6 +89,7 @@ abstract class AbstractToken implements TokenInterface * a __toString method or the username as a regular string. * * @param string|object $user The user + * * @throws \InvalidArgumentException */ public function setUser($user) @@ -192,7 +193,7 @@ abstract class AbstractToken implements TokenInterface * * @param string $name The attribute name * - * @return bool true if the attribute exists, false otherwise + * @return bool true if the attribute exists, false otherwise */ public function hasAttribute($name) { diff --git a/Core/Authentication/Token/TokenInterface.php b/Core/Authentication/Token/TokenInterface.php index 8f7d03f..fb9fd14 100644 --- a/Core/Authentication/Token/TokenInterface.php +++ b/Core/Authentication/Token/TokenInterface.php @@ -48,7 +48,7 @@ interface TokenInterface extends \Serializable * Returns a user representation. * * @return mixed either returns an object which implements __toString(), or - * a primitive string is returned. + * a primitive string is returned. */ public function getUser(); @@ -69,14 +69,14 @@ interface TokenInterface extends \Serializable /** * Returns whether the user is authenticated or not. * - * @return bool true if the token has been authenticated, false otherwise + * @return bool true if the token has been authenticated, false otherwise */ public function isAuthenticated(); /** * Sets the authenticated flag. * - * @param bool $isAuthenticated The authenticated flag + * @param bool $isAuthenticated The authenticated flag */ public function setAuthenticated($isAuthenticated); @@ -104,7 +104,7 @@ interface TokenInterface extends \Serializable * * @param string $name The attribute name * - * @return bool true if the attribute exists, false otherwise + * @return bool true if the attribute exists, false otherwise */ public function hasAttribute($name); diff --git a/Core/Authorization/AccessDecisionManagerInterface.php b/Core/Authorization/AccessDecisionManagerInterface.php index ec82800..16209ba 100644 --- a/Core/Authorization/AccessDecisionManagerInterface.php +++ b/Core/Authorization/AccessDecisionManagerInterface.php @@ -27,7 +27,7 @@ interface AccessDecisionManagerInterface * @param array $attributes An array of attributes associated with the method being invoked * @param object $object The object to secure * - * @return bool true if the access is granted, false otherwise + * @return bool true if the access is granted, false otherwise */ public function decide(TokenInterface $token, array $attributes, $object = null); @@ -36,7 +36,7 @@ interface AccessDecisionManagerInterface * * @param string $attribute An attribute * - * @return bool true if this decision manager supports the attribute, false otherwise + * @return bool true if this decision manager supports the attribute, false otherwise */ public function supportsAttribute($attribute); diff --git a/Core/Authorization/Voter/VoterInterface.php b/Core/Authorization/Voter/VoterInterface.php index f955e65..d00ff1c 100644 --- a/Core/Authorization/Voter/VoterInterface.php +++ b/Core/Authorization/Voter/VoterInterface.php @@ -29,7 +29,7 @@ interface VoterInterface * * @param string $attribute An attribute * - * @return bool true if this Voter supports the attribute, false otherwise + * @return bool true if this Voter supports the attribute, false otherwise */ public function supportsAttribute($attribute); @@ -38,7 +38,7 @@ interface VoterInterface * * @param string $class A class name * - * @return bool true if this Voter can process the class + * @return bool true if this Voter can process the class */ public function supportsClass($class); @@ -52,7 +52,7 @@ interface VoterInterface * @param object|null $object The object to secure * @param array $attributes An array of attributes associated with the method being invoked * - * @return int either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED + * @return int either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED */ public function vote(TokenInterface $token, $object, array $attributes); } diff --git a/Core/Encoder/BCryptPasswordEncoder.php b/Core/Encoder/BCryptPasswordEncoder.php index 27a7334..f62e8f5 100644 --- a/Core/Encoder/BCryptPasswordEncoder.php +++ b/Core/Encoder/BCryptPasswordEncoder.php @@ -27,9 +27,9 @@ class BCryptPasswordEncoder extends BasePasswordEncoder /** * Constructor. * - * @param int $cost The algorithmic cost that should be used + * @param int $cost The algorithmic cost that should be used * - * @throws \RuntimeException When no BCrypt encoder is available + * @throws \RuntimeException When no BCrypt encoder is available * @throws \InvalidArgumentException if cost is out of range */ public function __construct($cost) diff --git a/Core/Encoder/BasePasswordEncoder.php b/Core/Encoder/BasePasswordEncoder.php index 5bf223b..1c9ada1 100644 --- a/Core/Encoder/BasePasswordEncoder.php +++ b/Core/Encoder/BasePasswordEncoder.php @@ -79,7 +79,7 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface * @param string $password1 The first password * @param string $password2 The second password * - * @return bool true if the two passwords are the same, false otherwise + * @return bool true if the two passwords are the same, false otherwise */ protected function comparePasswords($password1, $password2) { @@ -91,7 +91,7 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface * * @param string $password The password to check * - * @return bool true if the password is too long, false otherwise + * @return bool true if the password is too long, false otherwise */ protected function isPasswordTooLong($password) { diff --git a/Core/Encoder/MessageDigestPasswordEncoder.php b/Core/Encoder/MessageDigestPasswordEncoder.php index 9aa240a..03de228 100644 --- a/Core/Encoder/MessageDigestPasswordEncoder.php +++ b/Core/Encoder/MessageDigestPasswordEncoder.php @@ -27,9 +27,9 @@ class MessageDigestPasswordEncoder extends BasePasswordEncoder /** * Constructor. * - * @param string $algorithm The digest algorithm to use - * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash - * @param int $iterations The number of iterations to use to stretch the password hash + * @param string $algorithm The digest algorithm to use + * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash + * @param int $iterations The number of iterations to use to stretch the password hash */ public function __construct($algorithm = 'sha512', $encodeHashAsBase64 = true, $iterations = 5000) { diff --git a/Core/Encoder/PasswordEncoderInterface.php b/Core/Encoder/PasswordEncoderInterface.php index 23acaf3..8c018be 100644 --- a/Core/Encoder/PasswordEncoderInterface.php +++ b/Core/Encoder/PasswordEncoderInterface.php @@ -35,7 +35,7 @@ interface PasswordEncoderInterface * @param string $raw A raw password * @param string $salt The salt * - * @return bool true if the password is valid, false otherwise + * @return bool true if the password is valid, false otherwise */ public function isPasswordValid($encoded, $raw, $salt); } diff --git a/Core/Encoder/Pbkdf2PasswordEncoder.php b/Core/Encoder/Pbkdf2PasswordEncoder.php index 55b5261..dac1cad 100644 --- a/Core/Encoder/Pbkdf2PasswordEncoder.php +++ b/Core/Encoder/Pbkdf2PasswordEncoder.php @@ -36,10 +36,10 @@ class Pbkdf2PasswordEncoder extends BasePasswordEncoder /** * Constructor. * - * @param string $algorithm The digest algorithm to use - * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash - * @param int $iterations The number of iterations to use to stretch the password hash - * @param int $length Length of derived key to create + * @param string $algorithm The digest algorithm to use + * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash + * @param int $iterations The number of iterations to use to stretch the password hash + * @param int $length Length of derived key to create */ public function __construct($algorithm = 'sha512', $encodeHashAsBase64 = true, $iterations = 1000, $length = 40) { diff --git a/Core/Encoder/PlaintextPasswordEncoder.php b/Core/Encoder/PlaintextPasswordEncoder.php index bdb058a..09059f6 100644 --- a/Core/Encoder/PlaintextPasswordEncoder.php +++ b/Core/Encoder/PlaintextPasswordEncoder.php @@ -25,7 +25,7 @@ class PlaintextPasswordEncoder extends BasePasswordEncoder /** * Constructor. * - * @param bool $ignorePasswordCase Compare password case-insensitive + * @param bool $ignorePasswordCase Compare password case-insensitive */ public function __construct($ignorePasswordCase = false) { diff --git a/Core/User/AdvancedUserInterface.php b/Core/User/AdvancedUserInterface.php index 19775c0..087c3c6 100644 --- a/Core/User/AdvancedUserInterface.php +++ b/Core/User/AdvancedUserInterface.php @@ -43,7 +43,7 @@ interface AdvancedUserInterface extends UserInterface * Internally, if this method returns false, the authentication system * will throw an AccountExpiredException and prevent login. * - * @return bool true if the user's account is non expired, false otherwise + * @return bool true if the user's account is non expired, false otherwise * * @see AccountExpiredException */ @@ -55,7 +55,7 @@ interface AdvancedUserInterface extends UserInterface * Internally, if this method returns false, the authentication system * will throw a LockedException and prevent login. * - * @return bool true if the user is not locked, false otherwise + * @return bool true if the user is not locked, false otherwise * * @see LockedException */ @@ -67,7 +67,7 @@ interface AdvancedUserInterface extends UserInterface * Internally, if this method returns false, the authentication system * will throw a CredentialsExpiredException and prevent login. * - * @return bool true if the user's credentials are non expired, false otherwise + * @return bool true if the user's credentials are non expired, false otherwise * * @see CredentialsExpiredException */ @@ -79,7 +79,7 @@ interface AdvancedUserInterface extends UserInterface * Internally, if this method returns false, the authentication system * will throw a DisabledException and prevent login. * - * @return bool true if the user is enabled, false otherwise + * @return bool true if the user is enabled, false otherwise * * @see DisabledException */ diff --git a/Core/Util/SecureRandomInterface.php b/Core/Util/SecureRandomInterface.php index 2cf7779..87d3ace 100644 --- a/Core/Util/SecureRandomInterface.php +++ b/Core/Util/SecureRandomInterface.php @@ -21,7 +21,7 @@ interface SecureRandomInterface /** * Generates the specified number of secure random bytes. * - * @param int $nbBytes + * @param int $nbBytes * * @return string */ diff --git a/Core/Util/StringUtils.php b/Core/Util/StringUtils.php index 01441cb..f326fe0 100644 --- a/Core/Util/StringUtils.php +++ b/Core/Util/StringUtils.php @@ -34,7 +34,7 @@ class StringUtils * @param string $knownString The string of known length to compare against * @param string $userInput The string that the user can control * - * @return bool true if the two strings are the same, false otherwise + * @return bool true if the two strings are the same, false otherwise */ public static function equals($knownString, $userInput) { diff --git a/Http/Firewall/LogoutListener.php b/Http/Firewall/LogoutListener.php index 2faf9c7..a558c2c 100644 --- a/Http/Firewall/LogoutListener.php +++ b/Http/Firewall/LogoutListener.php @@ -76,7 +76,7 @@ class LogoutListener implements ListenerInterface * * @param GetResponseEvent $event A GetResponseEvent instance * - * @throws LogoutException if the CSRF token is invalid + * @throws LogoutException if the CSRF token is invalid * @throws \RuntimeException if the LogoutSuccessHandlerInterface instance does not return a response */ public function handle(GetResponseEvent $event) diff --git a/Http/HttpUtils.php b/Http/HttpUtils.php index 50d4f26..50e68d3 100644 --- a/Http/HttpUtils.php +++ b/Http/HttpUtils.php @@ -96,7 +96,7 @@ class HttpUtils * @param Request $request A Request instance * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) * - * @return bool true if the path is the same as the one from the Request, false otherwise + * @return bool true if the path is the same as the one from the Request, false otherwise */ public function checkRequestPath(Request $request, $path) { diff --git a/Http/RememberMe/TokenBasedRememberMeServices.php b/Http/RememberMe/TokenBasedRememberMeServices.php index 7581a68..132831e 100644 --- a/Http/RememberMe/TokenBasedRememberMeServices.php +++ b/Http/RememberMe/TokenBasedRememberMeServices.php @@ -73,7 +73,7 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices * @param string $hash1 The first hash * @param string $hash2 The second hash * - * @return bool true if the two hashes are the same, false otherwise + * @return bool true if the two hashes are the same, false otherwise */ private function compareHashes($hash1, $hash2) { @@ -114,10 +114,10 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices /** * Generates the cookie value. * - * @param string $class - * @param string $username The username - * @param int $expires The Unix timestamp when the cookie expires - * @param string $password The encoded password + * @param string $class + * @param string $username The username + * @param int $expires The Unix timestamp when the cookie expires + * @param string $password The encoded password * * @throws \RuntimeException if username contains invalid chars * @@ -136,10 +136,10 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices /** * Generates a hash for the cookie to ensure it is not being tempered with * - * @param string $class - * @param string $username The username - * @param int $expires The Unix timestamp when the cookie expires - * @param string $password The encoded password + * @param string $class + * @param string $username The username + * @param int $expires The Unix timestamp when the cookie expires + * @param string $password The encoded password * * @throws \RuntimeException when the private key is empty * diff --git a/Tests/Acl/Dbal/MutableAclProviderTest.php b/Tests/Acl/Dbal/MutableAclProviderTest.php index 832a896..3f60efa 100644 --- a/Tests/Acl/Dbal/MutableAclProviderTest.php +++ b/Tests/Acl/Dbal/MutableAclProviderTest.php @@ -422,6 +422,7 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase * * @param AclProvider $provider * @param array $data + * * @throws \InvalidArgumentException * @throws \Exception */ |