summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Acl/Domain/PermissionGrantingStrategy.php6
-rw-r--r--Acl/Permission/BasicPermissionMap.php16
-rw-r--r--Acl/Permission/MaskBuilder.php44
-rw-r--r--Acl/Resources/bin/generateSql.php16
-rw-r--r--Core/Authentication/Token/AbstractToken.php2
-rw-r--r--Core/Authentication/Token/UsernamePasswordToken.php8
-rw-r--r--Core/Authorization/Voter/VoterInterface.php2
-rw-r--r--Core/SecurityContextInterface.php4
-rw-r--r--Http/Firewall/AbstractAuthenticationListener.php16
-rw-r--r--Http/Firewall/AnonymousAuthenticationListener.php6
-rw-r--r--Http/Firewall/LogoutListener.php4
-rw-r--r--Http/Firewall/UsernamePasswordFormAuthenticationListener.php6
-rw-r--r--Http/Session/SessionAuthenticationStrategy.php6
-rw-r--r--Http/Tests/Firewall/BasicAuthenticationListenerTest.php6
-rw-r--r--Http/Tests/Firewall/LogoutListenerTest.php6
-rw-r--r--Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php2
-rw-r--r--Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php2
-rw-r--r--Tests/Core/User/InMemoryUserProviderTest.php4
18 files changed, 78 insertions, 78 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 86200a8..32084ed 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/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php
index b54d25e..75d177f 100644
--- a/Core/Authentication/Token/AbstractToken.php
+++ b/Core/Authentication/Token/AbstractToken.php
@@ -84,7 +84,7 @@ abstract class AbstractToken implements TokenInterface
* The user can be a UserInterface instance, or an object implementing
* a __toString method or the username as a regular string.
*
- * @param mixed $user The user
+ * @param string|object $user The user
* @throws \InvalidArgumentException
*/
public function setUser($user)
diff --git a/Core/Authentication/Token/UsernamePasswordToken.php b/Core/Authentication/Token/UsernamePasswordToken.php
index b6dfce4..9248136 100644
--- a/Core/Authentication/Token/UsernamePasswordToken.php
+++ b/Core/Authentication/Token/UsernamePasswordToken.php
@@ -26,10 +26,10 @@ class UsernamePasswordToken extends AbstractToken
/**
* Constructor.
*
- * @param string $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[] $roles An array of roles
+ * @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
*
* @throws \InvalidArgumentException
*/
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 4421622..bceb506 100644
--- a/Core/SecurityContextInterface.php
+++ b/Core/SecurityContextInterface.php
@@ -22,7 +22,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
*/
interface SecurityContextInterface extends TokenStorageInterface, AuthorizationCheckerInterface
{
- const ACCESS_DENIED_ERROR = Security::ACCESS_DENIED_ERROR;
+ const ACCESS_DENIED_ERROR = Security::ACCESS_DENIED_ERROR;
const AUTHENTICATION_ERROR = Security::AUTHENTICATION_ERROR;
- const LAST_USERNAME = Security::LAST_USERNAME;
+ const LAST_USERNAME = Security::LAST_USERNAME;
}
diff --git a/Http/Firewall/AbstractAuthenticationListener.php b/Http/Firewall/AbstractAuthenticationListener.php
index 7cd0746..d89785e 100644
--- a/Http/Firewall/AbstractAuthenticationListener.php
+++ b/Http/Firewall/AbstractAuthenticationListener.php
@@ -93,15 +93,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 e3c35a0..68f8987 100644
--- a/Http/Firewall/AnonymousAuthenticationListener.php
+++ b/Http/Firewall/AnonymousAuthenticationListener.php
@@ -33,10 +33,10 @@ class AnonymousAuthenticationListener implements ListenerInterface
public function __construct(SecurityContextInterface $context, $key, LoggerInterface $logger = null, AuthenticationManagerInterface $authenticationManager = null)
{
- $this->context = $context;
- $this->key = $key;
+ $this->context = $context;
+ $this->key = $key;
$this->authenticationManager = $authenticationManager;
- $this->logger = $logger;
+ $this->logger = $logger;
}
/**
diff --git a/Http/Firewall/LogoutListener.php b/Http/Firewall/LogoutListener.php
index 91f17bb..2e9250b 100644
--- a/Http/Firewall/LogoutListener.php
+++ b/Http/Firewall/LogoutListener.php
@@ -60,8 +60,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->csrfTokenManager = $csrfTokenManager;
diff --git a/Http/Firewall/UsernamePasswordFormAuthenticationListener.php b/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
index 5562539..b857fb3 100644
--- a/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
+++ b/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
@@ -53,9 +53,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->csrfTokenManager = $csrfTokenManager;
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/Http/Tests/Firewall/BasicAuthenticationListenerTest.php b/Http/Tests/Firewall/BasicAuthenticationListenerTest.php
index 4080485..0ef993f 100644
--- a/Http/Tests/Firewall/BasicAuthenticationListenerTest.php
+++ b/Http/Tests/Firewall/BasicAuthenticationListenerTest.php
@@ -24,7 +24,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');
@@ -70,7 +70,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');
@@ -199,7 +199,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/Http/Tests/Firewall/LogoutListenerTest.php b/Http/Tests/Firewall/LogoutListenerTest.php
index 29ce114..041febc 100644
--- a/Http/Tests/Firewall/LogoutListenerTest.php
+++ b/Http/Tests/Firewall/LogoutListenerTest.php
@@ -215,9 +215,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' => '/',
),
$tokenManager
);
diff --git a/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php b/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php
index a490e9a..5914259 100644
--- a/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php
+++ b/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php
@@ -289,7 +289,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/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php b/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php
index 8d81d8a..2bc0419 100644
--- a/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php
+++ b/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php
@@ -220,7 +220,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());
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'),
),
));