diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2015-08-24 08:53:33 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-08-24 09:13:45 +0200 |
commit | 5ccfeae19f3bf9238148326f32850672f3fea7e4 (patch) | |
tree | 36e1eb54f68768c3f5bf0369d8a4a25a21966e39 | |
parent | 3d137c73cd8c6cb584e3f478b52de00e751d2289 (diff) | |
download | symfony-security-5ccfeae19f3bf9238148326f32850672f3fea7e4.zip symfony-security-5ccfeae19f3bf9238148326f32850672f3fea7e4.tar.gz symfony-security-5ccfeae19f3bf9238148326f32850672f3fea7e4.tar.bz2 |
fixes CS
25 files changed, 40 insertions, 26 deletions
diff --git a/Acl/Dbal/MutableAclProvider.php b/Acl/Dbal/MutableAclProvider.php index 9129e8b..bf08f60 100644 --- a/Acl/Dbal/MutableAclProvider.php +++ b/Acl/Dbal/MutableAclProvider.php @@ -111,7 +111,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf /** * Deletes the security identity from the database. - * ACL entries have the CASCADE option on their foreign key so they will also get deleted + * ACL entries have the CASCADE option on their foreign key so they will also get deleted. * * @param SecurityIdentityInterface $sid * @@ -366,7 +366,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf } /** - * Updates a user security identity when the user's username changes + * Updates a user security identity when the user's username changes. * * @param UserSecurityIdentity $usid * @param string $oldUsername diff --git a/Acl/Permission/AbstractMaskBuilder.php b/Acl/Permission/AbstractMaskBuilder.php index 867d2e2..93f1755 100644 --- a/Acl/Permission/AbstractMaskBuilder.php +++ b/Acl/Permission/AbstractMaskBuilder.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Security\Acl\Permission; /** - * This abstract class implements nearly all the MaskBuilderInterface methods + * This abstract class implements nearly all the MaskBuilderInterface methods. */ abstract class AbstractMaskBuilder implements MaskBuilderInterface { diff --git a/Acl/Permission/MaskBuilder.php b/Acl/Permission/MaskBuilder.php index 4788a1f..0b5f388 100644 --- a/Acl/Permission/MaskBuilder.php +++ b/Acl/Permission/MaskBuilder.php @@ -124,7 +124,7 @@ class MaskBuilder extends AbstractMaskBuilder } /** - * Returns the mask for the passed code + * Returns the mask for the passed code. * * @param mixed $code * diff --git a/Acl/Permission/MaskBuilderInterface.php b/Acl/Permission/MaskBuilderInterface.php index ba41830..ef183de 100644 --- a/Acl/Permission/MaskBuilderInterface.php +++ b/Acl/Permission/MaskBuilderInterface.php @@ -17,11 +17,12 @@ namespace Symfony\Component\Security\Acl\Permission; interface MaskBuilderInterface { /** - * Set the mask of this permission + * Set the mask of this permission. * * @param int $mask * * @return MaskBuilderInterface + * * @throws \InvalidArgumentException if $mask is not an integer */ public function set($mask); @@ -63,7 +64,7 @@ interface MaskBuilderInterface public function reset(); /** - * Returns the mask for the passed code + * Returns the mask for the passed code. * * @param mixed $code * diff --git a/Acl/Permission/MaskBuilderRetrievalInterface.php b/Acl/Permission/MaskBuilderRetrievalInterface.php index 7a99bca..2cde262 100644 --- a/Acl/Permission/MaskBuilderRetrievalInterface.php +++ b/Acl/Permission/MaskBuilderRetrievalInterface.php @@ -12,12 +12,12 @@ namespace Symfony\Component\Security\Acl\Permission; /** - * Retrieves the MaskBuilder + * Retrieves the MaskBuilder. */ interface MaskBuilderRetrievalInterface { /** - * Returns a new instance of the MaskBuilder used in the permissionMap + * Returns a new instance of the MaskBuilder used in the permissionMap. * * @return MaskBuilderInterface */ diff --git a/Core/Authentication/Token/Storage/TokenStorage.php b/Core/Authentication/Token/Storage/TokenStorage.php index 4b6c11f..b493081 100644 --- a/Core/Authentication/Token/Storage/TokenStorage.php +++ b/Core/Authentication/Token/Storage/TokenStorage.php @@ -14,7 +14,7 @@ namespace Symfony\Component\Security\Core\Authentication\Token\Storage; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; /** - * TokenStorage contains a TokenInterface + * TokenStorage contains a TokenInterface. * * It gives access to the token representing the current user authentication. * diff --git a/Core/Authorization/Voter/AbstractVoter.php b/Core/Authorization/Voter/AbstractVoter.php index 43ca558..efa1562 100644 --- a/Core/Authorization/Voter/AbstractVoter.php +++ b/Core/Authorization/Voter/AbstractVoter.php @@ -15,7 +15,7 @@ use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; /** - * Abstract Voter implementation that reduces boilerplate code required to create a custom Voter + * Abstract Voter implementation that reduces boilerplate code required to create a custom Voter. * * @author Roman Marintšenko <inoryy@gmail.com> */ @@ -44,7 +44,7 @@ abstract class AbstractVoter implements VoterInterface } /** - * Iteratively check all given attributes by calling isGranted + * Iteratively check all given attributes by calling isGranted. * * This method terminates as soon as it is able to return ACCESS_GRANTED * If at least one attribute is supported, but access not granted, then ACCESS_DENIED is returned @@ -83,14 +83,14 @@ abstract class AbstractVoter implements VoterInterface } /** - * Return an array of supported classes. This will be called by supportsClass + * Return an array of supported classes. This will be called by supportsClass. * * @return array an array of supported classes, i.e. array('Acme\DemoBundle\Model\Product') */ abstract protected function getSupportedClasses(); /** - * Return an array of supported attributes. This will be called by supportsAttribute + * Return an array of supported attributes. This will be called by supportsAttribute. * * @return array an array of supported attributes, i.e. array('CREATE', 'READ') */ @@ -101,7 +101,7 @@ abstract class AbstractVoter implements VoterInterface * It is safe to assume that $attribute and $object's class pass supportsAttribute/supportsClass * $user can be one of the following: * a UserInterface object (fully authenticated user) - * a string (anonymously authenticated user) + * a string (anonymously authenticated user). * * @param string $attribute * @param object $object diff --git a/Core/Encoder/UserPasswordEncoder.php b/Core/Encoder/UserPasswordEncoder.php index 13ee835..b096049 100644 --- a/Core/Encoder/UserPasswordEncoder.php +++ b/Core/Encoder/UserPasswordEncoder.php @@ -14,7 +14,7 @@ namespace Symfony\Component\Security\Core\Encoder; use Symfony\Component\Security\Core\User\UserInterface; /** - * A generic password encoder + * A generic password encoder. * * @author Ariel Ferrandini <arielferrandini@gmail.com> */ diff --git a/Core/Encoder/UserPasswordEncoderInterface.php b/Core/Encoder/UserPasswordEncoderInterface.php index 39e906a..7861caa 100644 --- a/Core/Encoder/UserPasswordEncoderInterface.php +++ b/Core/Encoder/UserPasswordEncoderInterface.php @@ -21,7 +21,6 @@ use Symfony\Component\Security\Core\User\UserInterface; interface UserPasswordEncoderInterface { /** - * * Encodes the plain password. * * @param UserInterface $user The user diff --git a/Core/SecurityContext.php b/Core/SecurityContext.php index 8bcbfee..027ff49 100644 --- a/Core/SecurityContext.php +++ b/Core/SecurityContext.php @@ -28,6 +28,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; * * @author Fabien Potencier <fabien@symfony.com> * @author Johannes M. Schmitt <schmittjoh@gmail.com> + * * @deprecated since version 2.6, to be removed in 3.0. */ class SecurityContext implements SecurityContextInterface @@ -43,7 +44,7 @@ class SecurityContext implements SecurityContextInterface private $authorizationChecker; /** - * For backwards compatibility, the signature of sf <2.6 still works + * For backwards compatibility, the signature of sf <2.6 still works. * * @param TokenStorageInterface|AuthenticationManagerInterface $tokenStorage * @param AuthorizationCheckerInterface|AccessDecisionManagerInterface $authorizationChecker diff --git a/Core/SecurityContextInterface.php b/Core/SecurityContextInterface.php index 61cdf4f..a759feb 100644 --- a/Core/SecurityContextInterface.php +++ b/Core/SecurityContextInterface.php @@ -20,6 +20,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; * The SecurityContextInterface. * * @author Johannes M. Schmitt <schmittjoh@gmail.com> + * * @deprecated since version 2.6, to be removed in 3.0. */ interface SecurityContextInterface extends TokenStorageInterface, AuthorizationCheckerInterface diff --git a/Core/Tests/LegacySecurityContextTest.php b/Core/Tests/LegacySecurityContextTest.php index c5da22d..92d7c16 100644 --- a/Core/Tests/LegacySecurityContextTest.php +++ b/Core/Tests/LegacySecurityContextTest.php @@ -81,7 +81,7 @@ class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase } /** - * Test dedicated to check if the backwards compatibility is still working + * Test dedicated to check if the backwards compatibility is still working. */ public function testOldConstructorSignature() { diff --git a/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php b/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php index 72e08c0..8053732 100644 --- a/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php +++ b/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php @@ -15,6 +15,7 @@ use Symfony\Component\Validator\Validation; /** * @since 2.5.4 + * * @author Bernhard Schussek <bschussek@gmail.com> * @group legacy */ diff --git a/Csrf/CsrfTokenManagerInterface.php b/Csrf/CsrfTokenManagerInterface.php index 5abe47c..bccabe6 100644 --- a/Csrf/CsrfTokenManagerInterface.php +++ b/Csrf/CsrfTokenManagerInterface.php @@ -15,6 +15,7 @@ namespace Symfony\Component\Security\Csrf; * Manages CSRF tokens. * * @since 2.4 + * * @author Bernhard Schussek <bschussek@gmail.com> */ interface CsrfTokenManagerInterface diff --git a/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php b/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php index 4fb0c99..1b325e5 100644 --- a/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php +++ b/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php @@ -21,7 +21,8 @@ class UriSafeTokenGeneratorTest extends \PHPUnit_Framework_TestCase const ENTROPY = 1000; /** - * A non alpha-numeric byte string + * A non alpha-numeric byte string. + * * @var string */ private static $bytes; @@ -57,7 +58,7 @@ class UriSafeTokenGeneratorTest extends \PHPUnit_Framework_TestCase { $this->random->expects($this->once()) ->method('nextBytes') - ->with(self::ENTROPY/8) + ->with(self::ENTROPY / 8) ->will($this->returnValue(self::$bytes)); $token = $this->generator->generateToken(); diff --git a/Csrf/TokenGenerator/TokenGeneratorInterface.php b/Csrf/TokenGenerator/TokenGeneratorInterface.php index e02ac66..1405b84 100644 --- a/Csrf/TokenGenerator/TokenGeneratorInterface.php +++ b/Csrf/TokenGenerator/TokenGeneratorInterface.php @@ -15,6 +15,7 @@ namespace Symfony\Component\Security\Csrf\TokenGenerator; * Generates CSRF tokens. * * @since 2.4 + * * @author Bernhard Schussek <bschussek@gmail.com> */ interface TokenGeneratorInterface diff --git a/Csrf/TokenGenerator/UriSafeTokenGenerator.php b/Csrf/TokenGenerator/UriSafeTokenGenerator.php index 122bc02..edeb435 100644 --- a/Csrf/TokenGenerator/UriSafeTokenGenerator.php +++ b/Csrf/TokenGenerator/UriSafeTokenGenerator.php @@ -18,6 +18,7 @@ use Symfony\Component\Security\Core\Util\SecureRandom; * Generates CSRF tokens. * * @since 2.4 + * * @author Bernhard Schussek <bernhard.schussek@symfony.com> */ class UriSafeTokenGenerator implements TokenGeneratorInterface diff --git a/Csrf/TokenStorage/NativeSessionTokenStorage.php b/Csrf/TokenStorage/NativeSessionTokenStorage.php index 60145c6..2620156 100644 --- a/Csrf/TokenStorage/NativeSessionTokenStorage.php +++ b/Csrf/TokenStorage/NativeSessionTokenStorage.php @@ -17,12 +17,14 @@ use Symfony\Component\Security\Csrf\Exception\TokenNotFoundException; * Token storage that uses PHP's native session handling. * * @since 2.4 + * * @author Bernhard Schussek <bschussek@gmail.com> */ class NativeSessionTokenStorage implements TokenStorageInterface { /** * The namespace used to store values in the session. + * * @var string */ const SESSION_NAMESPACE = '_csrf'; diff --git a/Csrf/TokenStorage/SessionTokenStorage.php b/Csrf/TokenStorage/SessionTokenStorage.php index f08eb96..a6a6ea3 100644 --- a/Csrf/TokenStorage/SessionTokenStorage.php +++ b/Csrf/TokenStorage/SessionTokenStorage.php @@ -18,18 +18,21 @@ use Symfony\Component\Security\Csrf\Exception\TokenNotFoundException; * Token storage that uses a Symfony2 Session object. * * @since 2.4 + * * @author Bernhard Schussek <bschussek@gmail.com> */ class SessionTokenStorage implements TokenStorageInterface { /** * The namespace used to store values in the session. + * * @var string */ const SESSION_NAMESPACE = '_csrf'; /** - * The user session from which the session ID is returned + * The user session from which the session ID is returned. + * * @var SessionInterface */ private $session; diff --git a/Csrf/TokenStorage/TokenStorageInterface.php b/Csrf/TokenStorage/TokenStorageInterface.php index 0fadfa3..5efe72f 100644 --- a/Csrf/TokenStorage/TokenStorageInterface.php +++ b/Csrf/TokenStorage/TokenStorageInterface.php @@ -15,6 +15,7 @@ namespace Symfony\Component\Security\Csrf\TokenStorage; * Stores CSRF tokens. * * @since 2.4 + * * @author Bernhard Schussek <bschussek@gmail.com> */ interface TokenStorageInterface diff --git a/Http/Authentication/AuthenticationUtils.php b/Http/Authentication/AuthenticationUtils.php index 317c8a0..4d5c71a 100644 --- a/Http/Authentication/AuthenticationUtils.php +++ b/Http/Authentication/AuthenticationUtils.php @@ -17,7 +17,7 @@ use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Core\Security; /** - * Extracts Security Errors from Request + * Extracts Security Errors from Request. * * @author Boris Vujicic <boris.vujicic@gmail.com> */ @@ -72,6 +72,7 @@ class AuthenticationUtils /** * @return Request + * * @throws \LogicException */ private function getRequest() diff --git a/Http/Authentication/SimpleAuthenticationHandler.php b/Http/Authentication/SimpleAuthenticationHandler.php index 6a1311f..c5c43f2 100644 --- a/Http/Authentication/SimpleAuthenticationHandler.php +++ b/Http/Authentication/SimpleAuthenticationHandler.php @@ -19,7 +19,7 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface; /** - * Class to proxy authentication success/failure handlers + * Class to proxy authentication success/failure handlers. * * Events are sent to the SimpleAuthenticatorInterface if it implements * the right interface, otherwise (or if it fails to return a Response) diff --git a/Http/Firewall/DigestAuthenticationListener.php b/Http/Firewall/DigestAuthenticationListener.php index 9a6fbfe..15b71ef 100644 --- a/Http/Firewall/DigestAuthenticationListener.php +++ b/Http/Firewall/DigestAuthenticationListener.php @@ -101,7 +101,7 @@ class DigestAuthenticationListener implements ListenerInterface if ($serverDigestMd5 !== $digestAuth->getResponse()) { if (null !== $this->logger) { - $this->logger->debug("Unexpected response from the DigestAuth received; is the header returning a clear text passwords?", array('expected' => $serverDigestMd5, 'received' => $digestAuth->getResponse())); + $this->logger->debug('Unexpected response from the DigestAuth received; is the header returning a clear text passwords?', array('expected' => $serverDigestMd5, 'received' => $digestAuth->getResponse())); } $this->fail($event, $request, new BadCredentialsException('Incorrect response')); diff --git a/Tests/Core/Authentication/Voter/AbstractVoterTest.php b/Tests/Core/Authentication/Voter/AbstractVoterTest.php index c5e9466..af7b82f 100644 --- a/Tests/Core/Authentication/Voter/AbstractVoterTest.php +++ b/Tests/Core/Authentication/Voter/AbstractVoterTest.php @@ -72,7 +72,7 @@ class VoterFixture extends AbstractVoter protected function getSupportedAttributes() { - return array( 'foo', 'bar', 'baz'); + return array('foo', 'bar', 'baz'); } protected function isGranted($attribute, $object, $user = null) diff --git a/Tests/Core/LegacySecurityContextInterfaceTest.php b/Tests/Core/LegacySecurityContextInterfaceTest.php index 57517bf..5225eb5 100644 --- a/Tests/Core/LegacySecurityContextInterfaceTest.php +++ b/Tests/Core/LegacySecurityContextInterfaceTest.php @@ -20,7 +20,7 @@ use Symfony\Component\Security\Core\Security; class LegacySecurityContextInterfaceTest extends \PHPUnit_Framework_TestCase { /** - * Test if the BC Layer is working as intended + * Test if the BC Layer is working as intended. */ public function testConstantSync() { |