diff options
author | Pascal Borreli <pascal@borreli.com> | 2010-10-19 15:11:42 +0000 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2010-10-19 17:22:31 +0200 |
commit | e8e3b7636fb777461ddcdf07fd559c9a73456961 (patch) | |
tree | 2b29342e4d9f6f8cec7e4b1c7e6d669e490e7acb | |
parent | a9fb07f10fc85309cf441c19535154aacd4228f1 (diff) | |
download | symfony-security-e8e3b7636fb777461ddcdf07fd559c9a73456961.zip symfony-security-e8e3b7636fb777461ddcdf07fd559c9a73456961.tar.gz symfony-security-e8e3b7636fb777461ddcdf07fd559c9a73456961.tar.bz2 |
[Security] Fixed coding standard
-rw-r--r-- | Authentication/AuthenticationManagerInterface.php | 2 | ||||
-rw-r--r-- | Authentication/Provider/DaoAuthenticationProvider.php | 2 | ||||
-rw-r--r-- | Authentication/Provider/PreAuthenticatedAuthenticationProvider.php | 13 | ||||
-rw-r--r-- | Authentication/Token/Token.php | 4 | ||||
-rw-r--r-- | Authentication/Token/TokenInterface.php | 2 | ||||
-rw-r--r-- | Authorization/AccessDecisionManagerInterface.php | 2 | ||||
-rw-r--r-- | Authorization/Voter/AuthenticatedVoter.php | 4 | ||||
-rw-r--r-- | Encoder/BasePasswordEncoder.php | 9 | ||||
-rw-r--r-- | Encoder/PasswordEncoderInterface.php | 6 | ||||
-rw-r--r-- | Exception/AuthenticationCredentialsNotFoundException.php | 2 | ||||
-rw-r--r-- | Role/RoleHierarchyInterface.php | 2 | ||||
-rw-r--r-- | User/AccountChecker.php | 8 |
12 files changed, 28 insertions, 28 deletions
diff --git a/Authentication/AuthenticationManagerInterface.php b/Authentication/AuthenticationManagerInterface.php index 8ab2eda..b0291a4 100644 --- a/Authentication/AuthenticationManagerInterface.php +++ b/Authentication/AuthenticationManagerInterface.php @@ -25,7 +25,7 @@ interface AuthenticationManagerInterface /** * Attempts to authenticates a TokenInterface object. * - * @param TokenInterface The TokenInterface instance to authenticate + * @param TokenInterface $token The TokenInterface instance to authenticate * * @return TokenInterface An authenticated TokenInterface instance * diff --git a/Authentication/Provider/DaoAuthenticationProvider.php b/Authentication/Provider/DaoAuthenticationProvider.php index f814988..3035725 100644 --- a/Authentication/Provider/DaoAuthenticationProvider.php +++ b/Authentication/Provider/DaoAuthenticationProvider.php @@ -35,8 +35,8 @@ class DaoAuthenticationProvider extends UserAuthenticationProvider * Constructor. * * @param UserProviderInterface $userProvider A UserProviderInterface instance - * @param PasswordEncoderInterface $passwordEncoder A PasswordEncoderInterface instance * @param AccountCheckerInterface $accountChecker An AccountCheckerInterface instance + * @param PasswordEncoderInterface $passwordEncoder A PasswordEncoderInterface instance */ public function __construct(UserProviderInterface $userProvider, AccountCheckerInterface $accountChecker, PasswordEncoderInterface $passwordEncoder = null) { diff --git a/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php b/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php index 8617fdb..736493d 100644 --- a/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php +++ b/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php @@ -26,8 +26,7 @@ use Symfony\Component\Security\Authentication\Token\TokenInterface; * requests, as they should already be pre-authenticated. However, the * AuthenticationUserDetailsService implementation may still throw a UsernameNotFoundException, for example. * - * @author Ruud Senden - * @since 2.0 + * @author Fabien Potencier <fabien.potencier@symfony-project.com> */ class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderInterface { @@ -37,8 +36,8 @@ class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderIn /** * Constructor. * - * @param UserProviderInterface $userProvider A UserProviderInterface instance - * @param AccountCheckerInterface $accountChecker An AccountCheckerInterface instance + * @param UserProviderInterface $userProvider A UserProviderInterface instance + * @param AccountCheckerInterface $accountChecker An AccountCheckerInterface instance */ public function __construct(UserProviderInterface $userProvider, AccountCheckerInterface $accountChecker) { @@ -51,9 +50,9 @@ class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderIn */ public function authenticate(TokenInterface $token) { - if (!$this->supports($token)) { - return null; - } + if (!$this->supports($token)) { + return null; + } if (null === $token->getUser()) { throw new BadCredentialsException('No pre-authenticated principal found in request.'); diff --git a/Authentication/Token/Token.php b/Authentication/Token/Token.php index 8279363..1903cc1 100644 --- a/Authentication/Token/Token.php +++ b/Authentication/Token/Token.php @@ -31,7 +31,7 @@ abstract class Token implements TokenInterface /** * Constructor. * - * @param Role[] An array of roles + * @param Role[] $roles An array of roles */ public function __construct(array $roles = array()) { @@ -47,7 +47,7 @@ abstract class Token implements TokenInterface /** * Adds a Role to the token. * - * @param RoleInterface A RoleInterface instance + * @param RoleInterface $role A RoleInterface instance */ public function addRole(RoleInterface $role) { diff --git a/Authentication/Token/TokenInterface.php b/Authentication/Token/TokenInterface.php index 1300716..a56c01d 100644 --- a/Authentication/Token/TokenInterface.php +++ b/Authentication/Token/TokenInterface.php @@ -63,7 +63,7 @@ interface TokenInterface extends \Serializable /** * Sets the authenticated flag. * - * @param Boolean The authenticated flag + * @param Boolean $isAuthenticated The authenticated flag */ function setAuthenticated($isAuthenticated); } diff --git a/Authorization/AccessDecisionManagerInterface.php b/Authorization/AccessDecisionManagerInterface.php index 5bb28b8..88066c3 100644 --- a/Authorization/AccessDecisionManagerInterface.php +++ b/Authorization/AccessDecisionManagerInterface.php @@ -26,8 +26,8 @@ interface AccessDecisionManagerInterface * Decides whether the access is possible or not. * * @param TokenInterface $token A TokenInterface instance - * @param object $object The object to secure * @param array $attributes An array of attributes associated with the method being invoked + * @param object $object The object to secure * * @return Boolean true if the access is granted, false otherwise */ diff --git a/Authorization/Voter/AuthenticatedVoter.php b/Authorization/Voter/AuthenticatedVoter.php index eb444c7..feaea05 100644 --- a/Authorization/Voter/AuthenticatedVoter.php +++ b/Authorization/Voter/AuthenticatedVoter.php @@ -21,8 +21,8 @@ use Symfony\Component\Security\Authentication\Token\AnonymousToken; */ class AuthenticatedVoter implements VoterInterface { - const IS_AUTHENTICATED_FULLY = "IS_AUTHENTICATED_FULLY"; - const IS_AUTHENTICATED_ANONYMOUSLY = "IS_AUTHENTICATED_ANONYMOUSLY"; + const IS_AUTHENTICATED_FULLY = 'IS_AUTHENTICATED_FULLY'; + const IS_AUTHENTICATED_ANONYMOUSLY = 'IS_AUTHENTICATED_ANONYMOUSLY'; /** * {@inheritdoc} diff --git a/Encoder/BasePasswordEncoder.php b/Encoder/BasePasswordEncoder.php index 1378d56..0544cd4 100644 --- a/Encoder/BasePasswordEncoder.php +++ b/Encoder/BasePasswordEncoder.php @@ -46,12 +46,13 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface /** * Merges a password and a salt. * - * @param password the password to be used (can be <code>null</code>) - * @param salt the salt to be used (can be <code>null</code>) + * @param string $password the password to be used + * @param string $salt the salt to be used * - * @return a merged password and salt <code>String</code> + * @return string a merged password and salt */ - protected function mergePasswordAndSalt($password, $salt) { + protected function mergePasswordAndSalt($password, $salt) + { if (empty($salt)) { return $password; } diff --git a/Encoder/PasswordEncoderInterface.php b/Encoder/PasswordEncoderInterface.php index 88d084b..3cb6a69 100644 --- a/Encoder/PasswordEncoderInterface.php +++ b/Encoder/PasswordEncoderInterface.php @@ -31,9 +31,9 @@ interface PasswordEncoderInterface /** * Checks a raw password against an encoded password. * - * @param string $encoded An encoded password - * @param string $raw A raw password - * @param string $salt The salt + * @param string $encoded An encoded password + * @param string $raw A raw password + * @param string $salt The salt * * @return Boolean true if the password is valid, false otherwise */ diff --git a/Exception/AuthenticationCredentialsNotFoundException.php b/Exception/AuthenticationCredentialsNotFoundException.php index 248df79..76cfc5e 100644 --- a/Exception/AuthenticationCredentialsNotFoundException.php +++ b/Exception/AuthenticationCredentialsNotFoundException.php @@ -15,7 +15,7 @@ namespace Symfony\Component\Security\Exception; * AuthenticationCredentialsNotFoundException is thrown when an authentication is rejected * because no Token is available. * - * @author Fabien Potencier <fabien.potencier@symfony-project.com> + * @author Fabien Potencier <fabien.potencier@symfony-project.com> */ class AuthenticationCredentialsNotFoundException extends AuthenticationException { diff --git a/Role/RoleHierarchyInterface.php b/Role/RoleHierarchyInterface.php index b93a93c..97156d7 100644 --- a/Role/RoleHierarchyInterface.php +++ b/Role/RoleHierarchyInterface.php @@ -25,7 +25,7 @@ interface RoleHierarchyInterface * roles that are transitively reachable from them in the role * hierarchy. * - * @param array $roles An array of directly assigned roles + * @param array $roles An array of directly assigned roles * * @return array An array of all reachable roles */ diff --git a/User/AccountChecker.php b/User/AccountChecker.php index 570f62b..ca73cab 100644 --- a/User/AccountChecker.php +++ b/User/AccountChecker.php @@ -33,7 +33,7 @@ class AccountChecker implements AccountCheckerInterface } if (!$account->isCredentialsNonExpired()) { - throw new CredentialsExpiredException("User credentials have expired.", $account); + throw new CredentialsExpiredException('User credentials have expired.', $account); } } @@ -47,15 +47,15 @@ class AccountChecker implements AccountCheckerInterface } if (!$account->isAccountNonLocked()) { - throw new LockedException("User account is locked.", $account); + throw new LockedException('User account is locked.', $account); } if (!$account->isEnabled()) { - throw new DisabledException("User account is disabled.", $account); + throw new DisabledException('User account is disabled.', $account); } if (!$account->isAccountNonExpired()) { - throw new AccountExpiredException("User account has expired.", $account); + throw new AccountExpiredException('User account has expired.', $account); } } } |