From 3d7eddb2727c61df81ba74e641a3f21e63887068 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 6 Jun 2016 11:38:47 +0200 Subject: `@throws` annotations should go after `@return` --- Acl/Dbal/MutableAclProvider.php | 20 ++++++++++---------- Acl/Domain/ObjectIdentity.php | 4 ++-- Acl/Model/AclInterface.php | 4 ++-- Acl/Model/MutableAclProviderInterface.php | 4 ++-- Acl/Permission/MaskBuilder.php | 4 ++-- 5 files changed, 18 insertions(+), 18 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/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) { -- cgit v1.1 From b583bf8ede8938a8ec5593da5da544fc4a8a73d9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 28 Jun 2016 07:50:50 +0200 Subject: removed dots at the end of @param and @return --- Acl/Domain/PermissionGrantingStrategy.php | 2 +- Core/Authentication/Token/AnonymousToken.php | 2 +- Core/Authentication/Token/PreAuthenticatedToken.php | 2 +- Core/Authentication/Token/TokenInterface.php | 2 +- Core/Authentication/Token/UsernamePasswordToken.php | 2 +- Core/User/InMemoryUserProvider.php | 2 +- Http/Authentication/DefaultAuthenticationFailureHandler.php | 2 +- Http/Authentication/DefaultAuthenticationSuccessHandler.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) 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/Core/Authentication/Token/AnonymousToken.php b/Core/Authentication/Token/AnonymousToken.php index 5f3241f..0d7dea0 100644 --- a/Core/Authentication/Token/AnonymousToken.php +++ b/Core/Authentication/Token/AnonymousToken.php @@ -26,7 +26,7 @@ class AnonymousToken extends AbstractToken * Constructor. * * @param string $key The key shared with the authentication provider - * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string. + * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string * @param RoleInterface[] $roles An array of roles */ public function __construct($key, $user, array $roles = array()) diff --git a/Core/Authentication/Token/PreAuthenticatedToken.php b/Core/Authentication/Token/PreAuthenticatedToken.php index 5a3fc95..b4b5e70 100644 --- a/Core/Authentication/Token/PreAuthenticatedToken.php +++ b/Core/Authentication/Token/PreAuthenticatedToken.php @@ -26,7 +26,7 @@ class PreAuthenticatedToken extends AbstractToken /** * Constructor. * - * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string. + * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string * @param mixed $credentials The user credentials * @param string $providerKey The provider key * @param RoleInterface[]|string[] $roles An array of roles diff --git a/Core/Authentication/Token/TokenInterface.php b/Core/Authentication/Token/TokenInterface.php index be90802..4e1dd7b 100644 --- a/Core/Authentication/Token/TokenInterface.php +++ b/Core/Authentication/Token/TokenInterface.php @@ -33,7 +33,7 @@ interface TokenInterface extends \Serializable /** * Returns the user roles. * - * @return RoleInterface[] An array of RoleInterface instances. + * @return RoleInterface[] An array of RoleInterface instances */ public function getRoles(); diff --git a/Core/Authentication/Token/UsernamePasswordToken.php b/Core/Authentication/Token/UsernamePasswordToken.php index 9248136..33b00f0 100644 --- a/Core/Authentication/Token/UsernamePasswordToken.php +++ b/Core/Authentication/Token/UsernamePasswordToken.php @@ -26,7 +26,7 @@ class UsernamePasswordToken extends AbstractToken /** * Constructor. * - * @param string|object $user The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method. + * @param string|object $user The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method * @param string $credentials This usually is the password of the user * @param string $providerKey The provider key * @param RoleInterface[]|string[] $roles An array of roles diff --git a/Core/User/InMemoryUserProvider.php b/Core/User/InMemoryUserProvider.php index c1981de..e09d72e 100644 --- a/Core/User/InMemoryUserProvider.php +++ b/Core/User/InMemoryUserProvider.php @@ -97,7 +97,7 @@ class InMemoryUserProvider implements UserProviderInterface /** * Returns the user by given username. * - * @param string $username The username. + * @param string $username The username * * @return User * diff --git a/Http/Authentication/DefaultAuthenticationFailureHandler.php b/Http/Authentication/DefaultAuthenticationFailureHandler.php index f8004d6..830c00a 100644 --- a/Http/Authentication/DefaultAuthenticationFailureHandler.php +++ b/Http/Authentication/DefaultAuthenticationFailureHandler.php @@ -46,7 +46,7 @@ class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandle * * @param HttpKernelInterface $httpKernel * @param HttpUtils $httpUtils - * @param array $options Options for processing a failed authentication attempt. + * @param array $options Options for processing a failed authentication attempt * @param LoggerInterface $logger Optional logger */ public function __construct(HttpKernelInterface $httpKernel, HttpUtils $httpUtils, array $options = array(), LoggerInterface $logger = null) diff --git a/Http/Authentication/DefaultAuthenticationSuccessHandler.php b/Http/Authentication/DefaultAuthenticationSuccessHandler.php index 5fa7071..b6a7df5 100644 --- a/Http/Authentication/DefaultAuthenticationSuccessHandler.php +++ b/Http/Authentication/DefaultAuthenticationSuccessHandler.php @@ -39,7 +39,7 @@ class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandle * Constructor. * * @param HttpUtils $httpUtils - * @param array $options Options for processing a successful authentication attempt. + * @param array $options Options for processing a successful authentication attempt */ public function __construct(HttpUtils $httpUtils, array $options = array()) { -- cgit v1.1