diff options
author | Disquedur <contact@disquedur.tk> | 2014-10-22 20:27:13 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2014-10-26 08:30:58 +0100 |
commit | 2f5a2d1b21b05f07bb7dc301d504766edb7dcd9b (patch) | |
tree | 6db7bb361d84015917efef4948aea85500d7b902 | |
parent | cd022841a94f02dd95541fee4cc4a09c4b053d01 (diff) | |
download | symfony-security-2f5a2d1b21b05f07bb7dc301d504766edb7dcd9b.zip symfony-security-2f5a2d1b21b05f07bb7dc301d504766edb7dcd9b.tar.gz symfony-security-2f5a2d1b21b05f07bb7dc301d504766edb7dcd9b.tar.bz2 |
Remove aligned '=>' and '='
19 files changed, 83 insertions, 83 deletions
diff --git a/Acl/Domain/PermissionGrantingStrategy.php b/Acl/Domain/PermissionGrantingStrategy.php index 0ca0785..81ed9d8 100644 --- a/Acl/Domain/PermissionGrantingStrategy.php +++ b/Acl/Domain/PermissionGrantingStrategy.php @@ -26,8 +26,8 @@ use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface { const EQUAL = 'equal'; - const ALL = 'all'; - const ANY = 'any'; + const ALL = 'all'; + const ANY = 'any'; private $auditLogger; @@ -136,7 +136,7 @@ class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface */ private function hasSufficientPermissions(AclInterface $acl, array $aces, array $masks, array $sids, $administrativeMode) { - $firstRejectedAce = null; + $firstRejectedAce = null; foreach ($masks as $requiredMask) { foreach ($sids as $sid) { diff --git a/Acl/Permission/BasicPermissionMap.php b/Acl/Permission/BasicPermissionMap.php index fa3d543..4e26c02 100644 --- a/Acl/Permission/BasicPermissionMap.php +++ b/Acl/Permission/BasicPermissionMap.php @@ -19,14 +19,14 @@ namespace Symfony\Component\Security\Acl\Permission; */ class BasicPermissionMap implements PermissionMapInterface { - const PERMISSION_VIEW = 'VIEW'; - const PERMISSION_EDIT = 'EDIT'; - const PERMISSION_CREATE = 'CREATE'; - const PERMISSION_DELETE = 'DELETE'; - const PERMISSION_UNDELETE = 'UNDELETE'; - const PERMISSION_OPERATOR = 'OPERATOR'; - const PERMISSION_MASTER = 'MASTER'; - const PERMISSION_OWNER = 'OWNER'; + const PERMISSION_VIEW = 'VIEW'; + const PERMISSION_EDIT = 'EDIT'; + const PERMISSION_CREATE = 'CREATE'; + const PERMISSION_DELETE = 'DELETE'; + const PERMISSION_UNDELETE = 'UNDELETE'; + const PERMISSION_OPERATOR = 'OPERATOR'; + const PERMISSION_MASTER = 'MASTER'; + const PERMISSION_OWNER = 'OWNER'; protected $map; diff --git a/Acl/Permission/MaskBuilder.php b/Acl/Permission/MaskBuilder.php index 8ca25bc..bcf03c5 100644 --- a/Acl/Permission/MaskBuilder.php +++ b/Acl/Permission/MaskBuilder.php @@ -44,28 +44,28 @@ namespace Symfony\Component\Security\Acl\Permission; */ class MaskBuilder { - const MASK_VIEW = 1; // 1 << 0 - const MASK_CREATE = 2; // 1 << 1 - const MASK_EDIT = 4; // 1 << 2 - const MASK_DELETE = 8; // 1 << 3 - const MASK_UNDELETE = 16; // 1 << 4 - const MASK_OPERATOR = 32; // 1 << 5 - const MASK_MASTER = 64; // 1 << 6 - const MASK_OWNER = 128; // 1 << 7 - const MASK_IDDQD = 1073741823; // 1 << 0 | 1 << 1 | ... | 1 << 30 - - const CODE_VIEW = 'V'; - const CODE_CREATE = 'C'; - const CODE_EDIT = 'E'; - const CODE_DELETE = 'D'; - const CODE_UNDELETE = 'U'; - const CODE_OPERATOR = 'O'; - const CODE_MASTER = 'M'; - const CODE_OWNER = 'N'; - - const ALL_OFF = '................................'; - const OFF = '.'; - const ON = '*'; + const MASK_VIEW = 1; // 1 << 0 + const MASK_CREATE = 2; // 1 << 1 + const MASK_EDIT = 4; // 1 << 2 + const MASK_DELETE = 8; // 1 << 3 + const MASK_UNDELETE = 16; // 1 << 4 + const MASK_OPERATOR = 32; // 1 << 5 + const MASK_MASTER = 64; // 1 << 6 + const MASK_OWNER = 128; // 1 << 7 + const MASK_IDDQD = 1073741823; // 1 << 0 | 1 << 1 | ... | 1 << 30 + + const CODE_VIEW = 'V'; + const CODE_CREATE = 'C'; + const CODE_EDIT = 'E'; + const CODE_DELETE = 'D'; + const CODE_UNDELETE = 'U'; + const CODE_OPERATOR = 'O'; + const CODE_MASTER = 'M'; + const CODE_OWNER = 'N'; + + const ALL_OFF = '................................'; + const OFF = '.'; + const ON = '*'; private $mask; diff --git a/Acl/Resources/bin/generateSql.php b/Acl/Resources/bin/generateSql.php index 4a5ca05..722c4c4 100644 --- a/Acl/Resources/bin/generateSql.php +++ b/Acl/Resources/bin/generateSql.php @@ -17,20 +17,20 @@ use Symfony\Component\Security\Acl\Dbal\Schema; $loader = new ClassLoader(); $loader->addPrefixes(array( - 'Symfony' => __DIR__.'/../../../../../..', - 'Doctrine\\Common' => __DIR__.'/../../../../../../../vendor/doctrine-common/lib', + 'Symfony' => __DIR__.'/../../../../../..', + 'Doctrine\\Common' => __DIR__.'/../../../../../../../vendor/doctrine-common/lib', 'Doctrine\\DBAL\\Migrations' => __DIR__.'/../../../../../../../vendor/doctrine-migrations/lib', - 'Doctrine\\DBAL' => __DIR__.'/../../../../../../../vendor/doctrine-dbal/lib', - 'Doctrine' => __DIR__.'/../../../../../../../vendor/doctrine/lib', + 'Doctrine\\DBAL' => __DIR__.'/../../../../../../../vendor/doctrine-dbal/lib', + 'Doctrine' => __DIR__.'/../../../../../../../vendor/doctrine/lib', )); $loader->register(); $schema = new Schema(array( - 'class_table_name' => 'acl_classes', - 'entry_table_name' => 'acl_entries', - 'oid_table_name' => 'acl_object_identities', + 'class_table_name' => 'acl_classes', + 'entry_table_name' => 'acl_entries', + 'oid_table_name' => 'acl_object_identities', 'oid_ancestors_table_name' => 'acl_object_identity_ancestors', - 'sid_table_name' => 'acl_security_identities', + 'sid_table_name' => 'acl_security_identities', )); $reflection = new ReflectionClass('Doctrine\\DBAL\\Platforms\\AbstractPlatform'); diff --git a/Core/Authorization/Voter/VoterInterface.php b/Core/Authorization/Voter/VoterInterface.php index 79fa69f..f955e65 100644 --- a/Core/Authorization/Voter/VoterInterface.php +++ b/Core/Authorization/Voter/VoterInterface.php @@ -22,7 +22,7 @@ interface VoterInterface { const ACCESS_GRANTED = 1; const ACCESS_ABSTAIN = 0; - const ACCESS_DENIED = -1; + const ACCESS_DENIED = -1; /** * Checks if the voter supports the given attribute. diff --git a/Core/SecurityContextInterface.php b/Core/SecurityContextInterface.php index ca816a8..50c30bb 100644 --- a/Core/SecurityContextInterface.php +++ b/Core/SecurityContextInterface.php @@ -20,9 +20,9 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; */ interface SecurityContextInterface { - const ACCESS_DENIED_ERROR = '_security.403_error'; + const ACCESS_DENIED_ERROR = '_security.403_error'; const AUTHENTICATION_ERROR = '_security.last_error'; - const LAST_USERNAME = '_security.last_username'; + const LAST_USERNAME = '_security.last_username'; /** * Returns the current security token. diff --git a/Http/Authentication/DefaultAuthenticationFailureHandler.php b/Http/Authentication/DefaultAuthenticationFailureHandler.php index db96e67..b3c5c4d 100644 --- a/Http/Authentication/DefaultAuthenticationFailureHandler.php +++ b/Http/Authentication/DefaultAuthenticationFailureHandler.php @@ -46,13 +46,13 @@ class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandle public function __construct(HttpKernelInterface $httpKernel, HttpUtils $httpUtils, array $options, LoggerInterface $logger = null) { $this->httpKernel = $httpKernel; - $this->httpUtils = $httpUtils; - $this->logger = $logger; + $this->httpUtils = $httpUtils; + $this->logger = $logger; $this->options = array_merge(array( - 'failure_path' => null, - 'failure_forward' => false, - 'login_path' => '/login', + 'failure_path' => null, + 'failure_forward' => false, + 'login_path' => '/login', 'failure_path_parameter' => '_failure_path', ), $options); } diff --git a/Http/Authentication/DefaultAuthenticationSuccessHandler.php b/Http/Authentication/DefaultAuthenticationSuccessHandler.php index 54d6fc1..591a28d 100644 --- a/Http/Authentication/DefaultAuthenticationSuccessHandler.php +++ b/Http/Authentication/DefaultAuthenticationSuccessHandler.php @@ -36,14 +36,14 @@ class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandle */ public function __construct(HttpUtils $httpUtils, array $options) { - $this->httpUtils = $httpUtils; + $this->httpUtils = $httpUtils; $this->options = array_merge(array( 'always_use_default_target_path' => false, - 'default_target_path' => '/', - 'login_path' => '/login', - 'target_path_parameter' => '_target_path', - 'use_referer' => false, + 'default_target_path' => '/', + 'login_path' => '/login', + 'target_path_parameter' => '_target_path', + 'use_referer' => false, ), $options); } diff --git a/Http/Firewall/AbstractAuthenticationListener.php b/Http/Firewall/AbstractAuthenticationListener.php index 80bfcd0..2b3d386 100644 --- a/Http/Firewall/AbstractAuthenticationListener.php +++ b/Http/Firewall/AbstractAuthenticationListener.php @@ -92,15 +92,15 @@ abstract class AbstractAuthenticationListener implements ListenerInterface $this->successHandler = $successHandler; $this->failureHandler = $failureHandler; $this->options = array_merge(array( - 'check_path' => '/login_check', - 'login_path' => '/login', + 'check_path' => '/login_check', + 'login_path' => '/login', 'always_use_default_target_path' => false, - 'default_target_path' => '/', - 'target_path_parameter' => '_target_path', - 'use_referer' => false, - 'failure_path' => null, - 'failure_forward' => false, - 'require_previous_session' => true, + 'default_target_path' => '/', + 'target_path_parameter' => '_target_path', + 'use_referer' => false, + 'failure_path' => null, + 'failure_forward' => false, + 'require_previous_session' => true, ), $options); $this->logger = $logger; $this->dispatcher = $dispatcher; diff --git a/Http/Firewall/AnonymousAuthenticationListener.php b/Http/Firewall/AnonymousAuthenticationListener.php index 59f05ff..446dfec 100644 --- a/Http/Firewall/AnonymousAuthenticationListener.php +++ b/Http/Firewall/AnonymousAuthenticationListener.php @@ -31,8 +31,8 @@ class AnonymousAuthenticationListener implements ListenerInterface public function __construct(SecurityContextInterface $context, $key, LoggerInterface $logger = null) { $this->context = $context; - $this->key = $key; - $this->logger = $logger; + $this->key = $key; + $this->logger = $logger; } /** diff --git a/Http/Firewall/LogoutListener.php b/Http/Firewall/LogoutListener.php index 722f4a1..2faf9c7 100644 --- a/Http/Firewall/LogoutListener.php +++ b/Http/Firewall/LogoutListener.php @@ -50,8 +50,8 @@ class LogoutListener implements ListenerInterface $this->httpUtils = $httpUtils; $this->options = array_merge(array( 'csrf_parameter' => '_csrf_token', - 'intention' => 'logout', - 'logout_path' => '/logout', + 'intention' => 'logout', + 'logout_path' => '/logout', ), $options); $this->successHandler = $successHandler; $this->csrfProvider = $csrfProvider; diff --git a/Http/Firewall/UsernamePasswordFormAuthenticationListener.php b/Http/Firewall/UsernamePasswordFormAuthenticationListener.php index 81c2b37..2147817 100644 --- a/Http/Firewall/UsernamePasswordFormAuthenticationListener.php +++ b/Http/Firewall/UsernamePasswordFormAuthenticationListener.php @@ -42,9 +42,9 @@ class UsernamePasswordFormAuthenticationListener extends AbstractAuthenticationL parent::__construct($securityContext, $authenticationManager, $sessionStrategy, $httpUtils, $providerKey, $successHandler, $failureHandler, array_merge(array( 'username_parameter' => '_username', 'password_parameter' => '_password', - 'csrf_parameter' => '_csrf_token', - 'intention' => 'authenticate', - 'post_only' => true, + 'csrf_parameter' => '_csrf_token', + 'intention' => 'authenticate', + 'post_only' => true, ), $options), $logger, $dispatcher); $this->csrfProvider = $csrfProvider; diff --git a/Http/Session/SessionAuthenticationStrategy.php b/Http/Session/SessionAuthenticationStrategy.php index 17160a1..0e688c7 100644 --- a/Http/Session/SessionAuthenticationStrategy.php +++ b/Http/Session/SessionAuthenticationStrategy.php @@ -26,9 +26,9 @@ use Symfony\Component\HttpFoundation\Request; */ class SessionAuthenticationStrategy implements SessionAuthenticationStrategyInterface { - const NONE = 'none'; - const MIGRATE = 'migrate'; - const INVALIDATE = 'invalidate'; + const NONE = 'none'; + const MIGRATE = 'migrate'; + const INVALIDATE = 'invalidate'; private $strategy; diff --git a/Tests/Core/User/InMemoryUserProviderTest.php b/Tests/Core/User/InMemoryUserProviderTest.php index 275426c..826e390 100644 --- a/Tests/Core/User/InMemoryUserProviderTest.php +++ b/Tests/Core/User/InMemoryUserProviderTest.php @@ -21,8 +21,8 @@ class InMemoryUserProviderTest extends \PHPUnit_Framework_TestCase $provider = new InMemoryUserProvider(array( 'fabien' => array( 'password' => 'foo', - 'enabled' => false, - 'roles' => array('ROLE_USER'), + 'enabled' => false, + 'roles' => array('ROLE_USER'), ), )); diff --git a/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php b/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php index c3a8370..600f518 100644 --- a/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php +++ b/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator; class UserPasswordValidatorTest extends \PHPUnit_Framework_TestCase { - const PASSWORD_VALID = true; + const PASSWORD_VALID = true; const PASSWORD_INVALID = false; protected $context; diff --git a/Tests/Http/Firewall/BasicAuthenticationListenerTest.php b/Tests/Http/Firewall/BasicAuthenticationListenerTest.php index b345178..2c94463 100644 --- a/Tests/Http/Firewall/BasicAuthenticationListenerTest.php +++ b/Tests/Http/Firewall/BasicAuthenticationListenerTest.php @@ -39,7 +39,7 @@ class BasicAuthenticationListenerTest extends \PHPUnit_Framework_TestCase { $request = new Request(array(), array(), array(), array(), array(), array( 'PHP_AUTH_USER' => 'TheUsername', - 'PHP_AUTH_PW' => 'ThePassword', + 'PHP_AUTH_PW' => 'ThePassword', )); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); @@ -85,7 +85,7 @@ class BasicAuthenticationListenerTest extends \PHPUnit_Framework_TestCase { $request = new Request(array(), array(), array(), array(), array(), array( 'PHP_AUTH_USER' => 'TheUsername', - 'PHP_AUTH_PW' => 'ThePassword', + 'PHP_AUTH_PW' => 'ThePassword', )); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); @@ -214,7 +214,7 @@ class BasicAuthenticationListenerTest extends \PHPUnit_Framework_TestCase { $request = new Request(array(), array(), array(), array(), array(), array( 'PHP_AUTH_USER' => 'TheUsername', - 'PHP_AUTH_PW' => 'ThePassword', + 'PHP_AUTH_PW' => 'ThePassword', )); $token = new PreAuthenticatedToken('TheUser', 'TheCredentials', 'TheProviderKey', array('ROLE_FOO')); diff --git a/Tests/Http/Firewall/LogoutListenerTest.php b/Tests/Http/Firewall/LogoutListenerTest.php index 456b281..58f6adb 100644 --- a/Tests/Http/Firewall/LogoutListenerTest.php +++ b/Tests/Http/Firewall/LogoutListenerTest.php @@ -236,9 +236,9 @@ class LogoutListenerTest extends \PHPUnit_Framework_TestCase $successHandler ?: $this->getSuccessHandler(), $options = array( 'csrf_parameter' => '_csrf_token', - 'intention' => 'logout', - 'logout_path' => '/logout', - 'target_url' => '/', + 'intention' => 'logout', + 'logout_path' => '/logout', + 'target_url' => '/', ), $csrfProvider ); diff --git a/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php b/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php index 0d485f3..4421bbf 100644 --- a/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php +++ b/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php @@ -296,7 +296,7 @@ class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_Test $service->loginSuccess($request, $response, $token); $cookies = $response->headers->getCookies(ResponseHeaderBag::COOKIES_ARRAY); - $cookie = $cookies['myfoodomain.foo']['/foo/path']['foo']; + $cookie = $cookies['myfoodomain.foo']['/foo/path']['foo']; $this->assertFalse($cookie->isCleared()); $this->assertTrue($cookie->isSecure()); $this->assertTrue($cookie->isHttpOnly()); diff --git a/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php b/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php index 3ff2ea6..a301f36 100644 --- a/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php +++ b/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php @@ -227,7 +227,7 @@ class TokenBasedRememberMeServicesTest extends \PHPUnit_Framework_TestCase $service->loginSuccess($request, $response, $token); $cookies = $response->headers->getCookies(ResponseHeaderBag::COOKIES_ARRAY); - $cookie = $cookies['myfoodomain.foo']['/foo/path']['foo']; + $cookie = $cookies['myfoodomain.foo']['/foo/path']['foo']; $this->assertFalse($cookie->isCleared()); $this->assertTrue($cookie->isSecure()); $this->assertTrue($cookie->isHttpOnly()); |