summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2014-09-22 11:14:18 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2014-09-22 11:14:18 +0200
commit133d64ad84f9e37d681c70db8a05743fa2001e11 (patch)
treedcc9de2e552cb9e008b74cf7fc745e9317503a7b
parent8f099fcbce1ba9a86d5b15c5558de80a8242d91e (diff)
parent78ebbab243651e31b940cb1330b06361dbd3c37b (diff)
downloadsymfony-security-133d64ad84f9e37d681c70db8a05743fa2001e11.zip
symfony-security-133d64ad84f9e37d681c70db8a05743fa2001e11.tar.gz
symfony-security-133d64ad84f9e37d681c70db8a05743fa2001e11.tar.bz2
Merge branch '2.4' into 2.5
* 2.4: fixed CS [Process] fixed some volatile tests [HttpKernel] fixed a volatile test [HttpFoundation] fixed some volatile tests [Tests] PHPUnit Optimizations Use getPathname() instead of string casting to get BinaryFileReponse file path Conflicts: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php src/Symfony/Component/ClassLoader/Tests/ApcUniversalClassLoaderTest.php src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php src/Symfony/Component/Process/Tests/AbstractProcessTest.php src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php src/Symfony/Component/Validator/Constraints/ChoiceValidator.php src/Symfony/Component/Validator/Constraints/CollectionValidator.php src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php src/Symfony/Component/Validator/Tests/ValidationVisitorTest.php src/Symfony/Component/Yaml/Parser.php
-rw-r--r--Acl/Dbal/AclProvider.php8
-rw-r--r--Acl/Dbal/MutableAclProvider.php15
-rw-r--r--Acl/Domain/Acl.php22
-rw-r--r--Acl/Permission/MaskBuilder.php2
-rw-r--r--Acl/Tests/Dbal/AclProviderBenchmarkTest.php8
-rw-r--r--Acl/Tests/Dbal/MutableAclProviderTest.php11
-rw-r--r--Acl/Tests/Domain/AclTest.php4
-rw-r--r--Acl/Tests/Domain/PermissionGrantingStrategyTest.php3
-rw-r--r--Acl/Tests/Domain/SecurityIdentityRetrievalStrategyTest.php2
-rw-r--r--Acl/Voter/AclVoter.php4
-rw-r--r--Core/Authentication/Token/AbstractToken.php2
-rw-r--r--Core/Tests/Authentication/Token/AbstractTokenTest.php14
-rw-r--r--Core/Tests/Authorization/AccessDecisionManagerTest.php5
-rw-r--r--Core/Tests/Authorization/Voter/RoleVoterTest.php1
-rw-r--r--Core/Tests/Encoder/EncoderFactoryTest.php28
-rw-r--r--Core/Util/ClassUtils.php4
-rw-r--r--Core/Util/StringUtils.php4
-rw-r--r--Http/Authentication/DefaultAuthenticationFailureHandler.php4
-rw-r--r--Http/RememberMe/TokenBasedRememberMeServices.php2
-rw-r--r--Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php2
-rw-r--r--Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php10
-rw-r--r--Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php10
-rw-r--r--Http/Tests/Firewall/BasicAuthenticationListenerTest.php6
-rw-r--r--Http/Tests/Firewall/ContextListenerTest.php2
-rw-r--r--Http/Tests/Firewall/DigestDataTest.php50
-rw-r--r--Http/Tests/Firewall/SwitchUserListenerTest.php2
-rw-r--r--Http/Tests/Firewall/X509AuthenticationListenerTest.php2
-rw-r--r--Http/Tests/FirewallTest.php2
-rw-r--r--Http/Tests/HttpUtilsTest.php2
-rw-r--r--Http/Tests/RememberMe/AbstractRememberMeServicesTest.php2
-rw-r--r--Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php3
-rw-r--r--Http/Tests/RememberMe/ResponseListenerTest.php2
32 files changed, 127 insertions, 111 deletions
diff --git a/Acl/Dbal/AclProvider.php b/Acl/Dbal/AclProvider.php
index 402e60e..5bcaf82 100644
--- a/Acl/Dbal/AclProvider.php
+++ b/Acl/Dbal/AclProvider.php
@@ -104,7 +104,7 @@ class AclProvider implements AclProviderInterface
$currentBatch = array();
$oidLookup = array();
- for ($i=0,$c=count($oids); $i<$c; $i++) {
+ for ($i = 0,$c = count($oids); $i<$c; $i++) {
$oid = $oids[$i];
$oidLookupKey = $oid->getIdentifier().$oid->getType();
$oidLookup[$oidLookupKey] = $oid;
@@ -502,8 +502,8 @@ QUERY;
$acls = $aces = $emptyArray = array();
$oidCache = $oidLookup;
$result = new \SplObjectStorage();
- $loadedAces =& $this->loadedAces;
- $loadedAcls =& $this->loadedAcls;
+ $loadedAces = & $this->loadedAces;
+ $loadedAcls = & $this->loadedAcls;
$permissionGrantingStrategy = $this->permissionGrantingStrategy;
// we need these to set protected properties on hydrated objects
@@ -595,7 +595,7 @@ QUERY;
// It is important to only ever have one ACE instance per actual row since
// some ACEs are shared between ACL instances
if (!isset($loadedAces[$aceId])) {
- if (!isset($sids[$key = ($username?'1':'0').$securityIdentifier])) {
+ if (!isset($sids[$key = ($username ? '1' : '0').$securityIdentifier])) {
if ($username) {
$sids[$key] = new UserSecurityIdentity(
substr($securityIdentifier, 1 + $pos = strpos($securityIdentifier, '-')),
diff --git a/Acl/Dbal/MutableAclProvider.php b/Acl/Dbal/MutableAclProvider.php
index 4e634de..261d932 100644
--- a/Acl/Dbal/MutableAclProvider.php
+++ b/Acl/Dbal/MutableAclProvider.php
@@ -201,7 +201,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
$propertyChanges['aces'] = new \SplObjectStorage();
}
- $acePropertyChanges = $propertyChanges['aces']->contains($ace)? $propertyChanges['aces']->offsetGet($ace) : array();
+ $acePropertyChanges = $propertyChanges['aces']->contains($ace) ? $propertyChanges['aces']->offsetGet($ace) : array();
if (isset($acePropertyChanges[$propertyName])) {
$oldValue = $acePropertyChanges[$propertyName][0];
@@ -472,8 +472,8 @@ QUERY;
$query,
$this->options['entry_table_name'],
$classId,
- null === $objectIdentityId? 'NULL' : intval($objectIdentityId),
- null === $field? 'NULL' : $this->connection->quote($field),
+ null === $objectIdentityId ? 'NULL' : intval($objectIdentityId),
+ null === $field ? 'NULL' : $this->connection->quote($field),
$aceOrder,
$securityIdentityId,
$mask,
@@ -831,7 +831,7 @@ QUERY;
$classIds = new \SplObjectStorage();
$currentIds = array();
foreach ($changes[1] as $field => $new) {
- for ($i=0,$c=count($new); $i<$c; $i++) {
+ for ($i = 0,$c = count($new); $i<$c; $i++) {
$ace = $new[$i];
if (null === $ace->getId()) {
@@ -908,7 +908,7 @@ QUERY;
$sids = new \SplObjectStorage();
$classIds = new \SplObjectStorage();
$currentIds = array();
- for ($i=0,$c=count($new); $i<$c; $i++) {
+ for ($i = 0,$c = count($new); $i<$c; $i++) {
$ace = $new[$i];
if (null === $ace->getId()) {
@@ -951,7 +951,7 @@ QUERY;
list($old, $new) = $changes;
$currentIds = array();
- for ($i=0,$c=count($new); $i<$c; $i++) {
+ for ($i = 0,$c = count($new); $i<$c; $i++) {
$ace = $new[$i];
if (null !== $ace->getId()) {
@@ -989,10 +989,9 @@ QUERY;
if (isset($propertyChanges['aceOrder'])
&& $propertyChanges['aceOrder'][1] > $propertyChanges['aceOrder'][0]
&& $propertyChanges == $aces->offsetGet($ace)) {
-
$aces->next();
if ($aces->valid()) {
- $this->updateAce($aces, $aces->current());
+ $this->updateAce($aces, $aces->current());
}
}
diff --git a/Acl/Domain/Acl.php b/Acl/Domain/Acl.php
index 5be5831..d3aecfb 100644
--- a/Acl/Domain/Acl.php
+++ b/Acl/Domain/Acl.php
@@ -119,7 +119,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
*/
public function getClassFieldAces($field)
{
- return isset($this->classFieldAces[$field])? $this->classFieldAces[$field] : array();
+ return isset($this->classFieldAces[$field]) ? $this->classFieldAces[$field] : array();
}
/**
@@ -397,7 +397,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
*/
private function deleteAce($property, $index)
{
- $aces =& $this->$property;
+ $aces = & $this->$property;
if (!isset($aces[$index])) {
throw new \OutOfBoundsException(sprintf('The index "%d" does not exist.', $index));
}
@@ -407,7 +407,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
$this->$property = array_values($this->$property);
$this->onPropertyChanged($property, $oldValue, $this->$property);
- for ($i=$index,$c=count($this->$property); $i<$c; $i++) {
+ for ($i = $index,$c = count($this->$property); $i<$c; $i++) {
$this->onEntryPropertyChanged($aces[$i], 'aceOrder', $i+1, $i);
}
}
@@ -422,7 +422,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
*/
private function deleteFieldAce($property, $index, $field)
{
- $aces =& $this->$property;
+ $aces = & $this->$property;
if (!isset($aces[$field][$index])) {
throw new \OutOfBoundsException(sprintf('The index "%d" does not exist.', $index));
}
@@ -432,7 +432,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
$aces[$field] = array_values($aces[$field]);
$this->onPropertyChanged($property, $oldValue, $this->$property);
- for ($i=$index,$c=count($aces[$field]); $i<$c; $i++) {
+ for ($i = $index,$c = count($aces[$field]); $i<$c; $i++) {
$this->onEntryPropertyChanged($aces[$field][$i], 'aceOrder', $i+1, $i);
}
}
@@ -467,7 +467,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
}
}
- $aces =& $this->$property;
+ $aces = & $this->$property;
$oldValue = $this->$property;
if (isset($aces[$index])) {
$this->$property = array_merge(
@@ -476,7 +476,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
array_slice($this->$property, $index)
);
- for ($i=$index,$c=count($this->$property)-1; $i<$c; $i++) {
+ for ($i = $index,$c = count($this->$property)-1; $i<$c; $i++) {
$this->onEntryPropertyChanged($aces[$i+1], 'aceOrder', $i, $i+1);
}
}
@@ -516,7 +516,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
}
}
- $aces =& $this->$property;
+ $aces = & $this->$property;
if (!isset($aces[$field])) {
$aces[$field] = array();
}
@@ -533,7 +533,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
array_slice($aces[$field], $index)
);
- for ($i=$index,$c=count($aces[$field])-1; $i<$c; $i++) {
+ for ($i = $index,$c = count($aces[$field])-1; $i<$c; $i++) {
$this->onEntryPropertyChanged($aces[$field][$i+1], 'aceOrder', $i, $i+1);
}
}
@@ -553,7 +553,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
*/
private function updateAce($property, $index, $mask, $strategy = null)
{
- $aces =& $this->$property;
+ $aces = & $this->$property;
if (!isset($aces[$index])) {
throw new \OutOfBoundsException(sprintf('The index "%d" does not exist.', $index));
}
@@ -612,7 +612,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
throw new \InvalidArgumentException('$field cannot be empty.');
}
- $aces =& $this->$property;
+ $aces = & $this->$property;
if (!isset($aces[$field][$index])) {
throw new \OutOfBoundsException(sprintf('The index "%d" does not exist.', $index));
}
diff --git a/Acl/Permission/MaskBuilder.php b/Acl/Permission/MaskBuilder.php
index 6b00b27..86200a8 100644
--- a/Acl/Permission/MaskBuilder.php
+++ b/Acl/Permission/MaskBuilder.php
@@ -122,7 +122,7 @@ class MaskBuilder
$length = strlen($pattern);
$bitmask = str_pad(decbin($this->mask), $length, '0', STR_PAD_LEFT);
- for ($i=$length-1; $i>=0; $i--) {
+ for ($i = $length-1; $i >= 0; $i--) {
if ('1' === $bitmask[$i]) {
try {
$pattern[$i] = self::getCode(1 << ($length - $i - 1));
diff --git a/Acl/Tests/Dbal/AclProviderBenchmarkTest.php b/Acl/Tests/Dbal/AclProviderBenchmarkTest.php
index 8f68f1f..c7383dc 100644
--- a/Acl/Tests/Dbal/AclProviderBenchmarkTest.php
+++ b/Acl/Tests/Dbal/AclProviderBenchmarkTest.php
@@ -92,7 +92,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
$this->insertEntryStmt = $this->con->prepare('INSERT INTO acl_entries (id, class_id, object_identity_id, field_name, ace_order, security_identity_id, mask, granting, granting_strategy, audit_success, audit_failure) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
$this->insertOidAncestorStmt = $this->con->prepare('INSERT INTO acl_object_identity_ancestors (object_identity_id, ancestor_id) VALUES (?, ?)');
- for ($i=0; $i<40000; $i++) {
+ for ($i = 0; $i<40000; $i++) {
$this->generateAclHierarchy();
}
}
@@ -107,7 +107,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
protected function generateAclLevel($depth, $parentId, $ancestors)
{
$level = count($ancestors);
- for ($i=0,$t=rand(1, 10); $i<$t; $i++) {
+ for ($i = 0,$t = rand(1, 10); $i<$t; $i++) {
$id = $this->generateAcl($this->chooseClassId(), $parentId, $ancestors);
if ($level < $depth) {
@@ -161,7 +161,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
$this->insertSidStmt->execute(array(
$id,
$this->getRandomString(rand(5, 30)),
- rand(0, 1)
+ rand(0, 1),
));
$id += 1;
@@ -178,7 +178,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
$sids = array();
$fieldOrder = array();
- for ($i=0; $i<=30; $i++) {
+ for ($i = 0; $i <= 30; $i++) {
$fieldName = rand(0, 1) ? null : $this->getRandomString(rand(10, 20));
do {
diff --git a/Acl/Tests/Dbal/MutableAclProviderTest.php b/Acl/Tests/Dbal/MutableAclProviderTest.php
index 8c920cf..f0a68a0 100644
--- a/Acl/Tests/Dbal/MutableAclProviderTest.php
+++ b/Acl/Tests/Dbal/MutableAclProviderTest.php
@@ -88,7 +88,8 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase
try {
$provider->findAcl($oid);
$this->fail('ACL has not been properly deleted.');
- } catch (AclNotFoundException $notFound) { }
+ } catch (AclNotFoundException $notFound) {
+ }
}
public function testDeleteAclDeletesChildren()
@@ -103,7 +104,8 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase
try {
$provider->findAcl(new ObjectIdentity(1, 'Foo'));
$this->fail('Child-ACLs have not been deleted.');
- } catch (AclNotFoundException $notFound) { }
+ } catch (AclNotFoundException $notFound) {
+ }
}
public function testFindAclsAddsPropertyListener()
@@ -148,7 +150,7 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase
'parent' => array(
'object_identifier' => '1',
'class_type' => 'anotherFoo',
- )
+ ),
));
$propertyChanges = $this->getField($provider, 'propertyChanges');
@@ -288,7 +290,8 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase
try {
$provider->updateAcl($acl1);
$this->fail('Provider failed to detect a concurrent modification.');
- } catch (ConcurrentModificationException $ex) { }
+ } catch (ConcurrentModificationException $ex) {
+ }
}
public function testUpdateAcl()
diff --git a/Acl/Tests/Domain/AclTest.php b/Acl/Tests/Domain/AclTest.php
index 2034c21..ff29bcf 100644
--- a/Acl/Tests/Domain/AclTest.php
+++ b/Acl/Tests/Domain/AclTest.php
@@ -128,7 +128,7 @@ class AclTest extends \PHPUnit_Framework_TestCase
$acl = $this->getAcl();
$listener = $this->getListener(array(
- $property, 'aceOrder', $property, 'aceOrder', $property
+ $property, 'aceOrder', $property, 'aceOrder', $property,
));
$acl->addPropertyChangedListener($listener);
@@ -358,7 +358,7 @@ class AclTest extends \PHPUnit_Framework_TestCase
$acl->{'insert'.$type}('foo', new UserSecurityIdentity('foo', 'Foo'), 1);
$listener = $this->getListener(array(
- 'mask', 'mask', 'strategy'
+ 'mask', 'mask', 'strategy',
));
$acl->addPropertyChangedListener($listener);
diff --git a/Acl/Tests/Domain/PermissionGrantingStrategyTest.php b/Acl/Tests/Domain/PermissionGrantingStrategyTest.php
index 490d256..c7675ea 100644
--- a/Acl/Tests/Domain/PermissionGrantingStrategyTest.php
+++ b/Acl/Tests/Domain/PermissionGrantingStrategyTest.php
@@ -154,7 +154,8 @@ class PermissionGrantingStrategyTest extends \PHPUnit_Framework_TestCase
try {
$strategy->isGranted($acl, array($requiredMask), array($sid));
$this->fail('The ACE is not supposed to match.');
- } catch (NoAceFoundException $noAce) { }
+ } catch (NoAceFoundException $noAce) {
+ }
} else {
$this->assertTrue($strategy->isGranted($acl, array($requiredMask), array($sid)));
}
diff --git a/Acl/Tests/Domain/SecurityIdentityRetrievalStrategyTest.php b/Acl/Tests/Domain/SecurityIdentityRetrievalStrategyTest.php
index 02fbe67..160c27c 100644
--- a/Acl/Tests/Domain/SecurityIdentityRetrievalStrategyTest.php
+++ b/Acl/Tests/Domain/SecurityIdentityRetrievalStrategyTest.php
@@ -103,7 +103,7 @@ class SecurityIdentityRetrievalStrategyTest extends \PHPUnit_Framework_TestCase
array('guest', array('ROLE_FOO'), 'anonymous', array(
new RoleSecurityIdentity('ROLE_FOO'),
new RoleSecurityIdentity('IS_AUTHENTICATED_ANONYMOUSLY'),
- ))
+ )),
);
}
diff --git a/Acl/Voter/AclVoter.php b/Acl/Voter/AclVoter.php
index b21b1e6..9657eed 100644
--- a/Acl/Voter/AclVoter.php
+++ b/Acl/Voter/AclVoter.php
@@ -64,7 +64,7 @@ class AclVoter implements VoterInterface
if (null === $object) {
if (null !== $this->logger) {
- $this->logger->debug(sprintf('Object identity unavailable. Voting to %s', $this->allowIfObjectIdentityUnavailable? 'grant access' : 'abstain'));
+ $this->logger->debug(sprintf('Object identity unavailable. Voting to %s', $this->allowIfObjectIdentityUnavailable ? 'grant access' : 'abstain'));
}
return $this->allowIfObjectIdentityUnavailable ? self::ACCESS_GRANTED : self::ACCESS_ABSTAIN;
@@ -79,7 +79,7 @@ class AclVoter implements VoterInterface
$oid = $object;
} elseif (null === $oid = $this->objectIdentityRetrievalStrategy->getObjectIdentity($object)) {
if (null !== $this->logger) {
- $this->logger->debug(sprintf('Object identity unavailable. Voting to %s', $this->allowIfObjectIdentityUnavailable? 'grant access' : 'abstain'));
+ $this->logger->debug(sprintf('Object identity unavailable. Voting to %s', $this->allowIfObjectIdentityUnavailable ? 'grant access' : 'abstain'));
}
return $this->allowIfObjectIdentityUnavailable ? self::ACCESS_GRANTED : self::ACCESS_ABSTAIN;
diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php
index 4590939..b54d25e 100644
--- a/Core/Authentication/Token/AbstractToken.php
+++ b/Core/Authentication/Token/AbstractToken.php
@@ -150,7 +150,7 @@ abstract class AbstractToken implements TokenInterface
is_object($this->user) ? clone $this->user : $this->user,
$this->authenticated,
$this->roles,
- $this->attributes
+ $this->attributes,
)
);
}
diff --git a/Core/Tests/Authentication/Token/AbstractTokenTest.php b/Core/Tests/Authentication/Token/AbstractTokenTest.php
index 098017e..6f2b6ed 100644
--- a/Core/Tests/Authentication/Token/AbstractTokenTest.php
+++ b/Core/Tests/Authentication/Token/AbstractTokenTest.php
@@ -52,7 +52,9 @@ class ConcreteToken extends AbstractToken
parent::unserialize($parentStr);
}
- public function getCredentials() {}
+ public function getCredentials()
+ {
+ }
}
class AbstractTokenTest extends \PHPUnit_Framework_TestCase
@@ -227,13 +229,13 @@ class AbstractTokenTest extends \PHPUnit_Framework_TestCase
'foo', $user,
),
array(
- 'foo', $advancedUser
+ 'foo', $advancedUser,
),
array(
- $user, 'foo'
+ $user, 'foo',
),
array(
- $advancedUser, 'foo'
+ $advancedUser, 'foo',
),
array(
$user, new TestUser('foo'),
@@ -254,10 +256,10 @@ class AbstractTokenTest extends \PHPUnit_Framework_TestCase
new TestUser('foo'), $advancedUser,
),
array(
- $user, $advancedUser
+ $user, $advancedUser,
),
array(
- $advancedUser, $user
+ $advancedUser, $user,
),
);
}
diff --git a/Core/Tests/Authorization/AccessDecisionManagerTest.php b/Core/Tests/Authorization/AccessDecisionManagerTest.php
index 34c3514..bf0ad11 100644
--- a/Core/Tests/Authorization/AccessDecisionManagerTest.php
+++ b/Core/Tests/Authorization/AccessDecisionManagerTest.php
@@ -93,7 +93,7 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
array($token, 'consensus', $this->getVoter(VoterInterface::ACCESS_DENIED), false),
array($token, 'consensus', $this->getVoter(VoterInterface::ACCESS_GRANTED), true),
-
+
array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_DENIED, VoterInterface::ACCESS_DENIED), false),
array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_DENIED, VoterInterface::ACCESS_GRANTED), false),
array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_GRANTED, VoterInterface::ACCESS_DENIED), false),
@@ -172,7 +172,6 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
$voter->expects($this->any())
->method('vote')
->will($this->returnValue($vote));
- ;
return $voter;
}
@@ -183,7 +182,6 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
$voter->expects($this->any())
->method('supportsClass')
->will($this->returnValue($ret));
- ;
return $voter;
}
@@ -194,7 +192,6 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
$voter->expects($this->any())
->method('supportsAttribute')
->will($this->returnValue($ret));
- ;
return $voter;
}
diff --git a/Core/Tests/Authorization/Voter/RoleVoterTest.php b/Core/Tests/Authorization/Voter/RoleVoterTest.php
index 62e3013..03ab2da 100644
--- a/Core/Tests/Authorization/Voter/RoleVoterTest.php
+++ b/Core/Tests/Authorization/Voter/RoleVoterTest.php
@@ -55,7 +55,6 @@ class RoleVoterTest extends \PHPUnit_Framework_TestCase
$token->expects($this->once())
->method('getRoles')
->will($this->returnValue($roles));
- ;
return $token;
}
diff --git a/Core/Tests/Encoder/EncoderFactoryTest.php b/Core/Tests/Encoder/EncoderFactoryTest.php
index 3d34d04..a8ca2f0 100644
--- a/Core/Tests/Encoder/EncoderFactoryTest.php
+++ b/Core/Tests/Encoder/EncoderFactoryTest.php
@@ -84,7 +84,7 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase
{
$factory = new EncoderFactory(array(
'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha256'),
- 'encoder_name' => new MessageDigestPasswordEncoder('sha1')
+ 'encoder_name' => new MessageDigestPasswordEncoder('sha1'),
));
$encoder = $factory->getEncoder(new EncAwareUser('user', 'pass'));
@@ -96,7 +96,7 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase
{
$factory = new EncoderFactory(array(
'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'),
- 'encoder_name' => new MessageDigestPasswordEncoder('sha256')
+ 'encoder_name' => new MessageDigestPasswordEncoder('sha256'),
));
$user = new EncAwareUser('user', 'pass');
@@ -113,7 +113,7 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase
{
$factory = new EncoderFactory(array(
'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'),
- 'encoder_name' => new MessageDigestPasswordEncoder('sha256')
+ 'encoder_name' => new MessageDigestPasswordEncoder('sha256'),
));
$user = new EncAwareUser('user', 'pass');
@@ -125,7 +125,7 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase
{
$factory = new EncoderFactory(array(
'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'),
- 'encoder_name' => new MessageDigestPasswordEncoder('sha256')
+ 'encoder_name' => new MessageDigestPasswordEncoder('sha256'),
));
$encoder = $factory->getEncoder('Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser');
@@ -136,11 +136,21 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase
class SomeUser implements UserInterface
{
- public function getRoles() {}
- public function getPassword() {}
- public function getSalt() {}
- public function getUsername() {}
- public function eraseCredentials() {}
+ public function getRoles()
+ {
+ }
+ public function getPassword()
+ {
+ }
+ public function getSalt()
+ {
+ }
+ public function getUsername()
+ {
+ }
+ public function eraseCredentials()
+ {
+ }
}
class SomeChildUser extends SomeUser
diff --git a/Core/Util/ClassUtils.php b/Core/Util/ClassUtils.php
index 26bf1a1..1d40c8d 100644
--- a/Core/Util/ClassUtils.php
+++ b/Core/Util/ClassUtils.php
@@ -39,7 +39,9 @@ class ClassUtils
/**
* This class should not be instantiated
*/
- private function __construct() {}
+ private function __construct()
+ {
+ }
/**
* Gets the real class name of a class name that could be a proxy.
diff --git a/Core/Util/StringUtils.php b/Core/Util/StringUtils.php
index acf8e9e..01441cb 100644
--- a/Core/Util/StringUtils.php
+++ b/Core/Util/StringUtils.php
@@ -21,7 +21,9 @@ class StringUtils
/**
* This class should not be instantiated
*/
- private function __construct() {}
+ private function __construct()
+ {
+ }
/**
* Compares two strings.
diff --git a/Http/Authentication/DefaultAuthenticationFailureHandler.php b/Http/Authentication/DefaultAuthenticationFailureHandler.php
index f106a4a..db96e67 100644
--- a/Http/Authentication/DefaultAuthenticationFailureHandler.php
+++ b/Http/Authentication/DefaultAuthenticationFailureHandler.php
@@ -53,7 +53,7 @@ class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandle
'failure_path' => null,
'failure_forward' => false,
'login_path' => '/login',
- 'failure_path_parameter' => '_failure_path'
+ 'failure_path_parameter' => '_failure_path',
), $options);
}
@@ -63,7 +63,7 @@ class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandle
public function onAuthenticationFailure(Request $request, AuthenticationException $exception)
{
if ($failureUrl = $request->get($this->options['failure_path_parameter'], null, true)) {
- $this->options['failure_path'] = $failureUrl;
+ $this->options['failure_path'] = $failureUrl;
}
if (null === $this->options['failure_path']) {
diff --git a/Http/RememberMe/TokenBasedRememberMeServices.php b/Http/RememberMe/TokenBasedRememberMeServices.php
index 0cc4a71..32a0df0 100644
--- a/Http/RememberMe/TokenBasedRememberMeServices.php
+++ b/Http/RememberMe/TokenBasedRememberMeServices.php
@@ -105,7 +105,7 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices
$class,
base64_encode($username),
$expires,
- $this->generateCookieHash($class, $username, $expires, $password)
+ $this->generateCookieHash($class, $username, $expires, $password),
));
}
diff --git a/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php b/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
index b775588..4d1847d 100644
--- a/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
+++ b/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
@@ -43,7 +43,7 @@ class DefaultAuthenticationSuccessHandlerTest extends \PHPUnit_Framework_TestCas
{
$options = array(
'always_use_default_target_path' => true,
- 'default_target_path' => '/dashboard'
+ 'default_target_path' => '/dashboard',
);
$response = $this->expectRedirectResponse('/dashboard');
diff --git a/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php b/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php
index f4e5425..ff5fbc2 100644
--- a/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php
+++ b/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php
@@ -39,26 +39,26 @@ class RetryAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase
80,
443,
Request::create('http://localhost/foo/bar?baz=bat'),
- 'https://localhost/foo/bar?baz=bat'
+ 'https://localhost/foo/bar?baz=bat',
),
array(
80,
443,
Request::create('https://localhost/foo/bar?baz=bat'),
- 'http://localhost/foo/bar?baz=bat'
+ 'http://localhost/foo/bar?baz=bat',
),
array(
80,
123,
Request::create('http://localhost/foo/bar?baz=bat'),
- 'https://localhost:123/foo/bar?baz=bat'
+ 'https://localhost:123/foo/bar?baz=bat',
),
array(
8080,
443,
Request::create('https://localhost/foo/bar?baz=bat'),
- 'http://localhost:8080/foo/bar?baz=bat'
- )
+ 'http://localhost:8080/foo/bar?baz=bat',
+ ),
);
}
}
diff --git a/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php b/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php
index 57a91cf..6e34532 100644
--- a/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php
+++ b/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php
@@ -49,7 +49,7 @@ class AbstractPreAuthenticatedListenerTest extends \PHPUnit_Framework_TestCase
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
$context,
$authenticationManager,
- 'TheProviderKey'
+ 'TheProviderKey',
));
$listener
->expects($this->once())
@@ -95,7 +95,7 @@ class AbstractPreAuthenticatedListenerTest extends \PHPUnit_Framework_TestCase
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
$context,
$authenticationManager,
- 'TheProviderKey'
+ 'TheProviderKey',
));
$listener
->expects($this->once())
@@ -143,7 +143,7 @@ class AbstractPreAuthenticatedListenerTest extends \PHPUnit_Framework_TestCase
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
$context,
$authenticationManager,
- 'TheProviderKey'
+ 'TheProviderKey',
));
$listener
->expects($this->once())
@@ -184,7 +184,7 @@ class AbstractPreAuthenticatedListenerTest extends \PHPUnit_Framework_TestCase
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
$context,
$authenticationManager,
- 'TheProviderKey'
+ 'TheProviderKey',
));
$listener
->expects($this->once())
@@ -233,7 +233,7 @@ class AbstractPreAuthenticatedListenerTest extends \PHPUnit_Framework_TestCase
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
$context,
$authenticationManager,
- 'TheProviderKey'
+ 'TheProviderKey',
));
$listener
->expects($this->once())
diff --git a/Http/Tests/Firewall/BasicAuthenticationListenerTest.php b/Http/Tests/Firewall/BasicAuthenticationListenerTest.php
index eb51f5f..4080485 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/ContextListenerTest.php b/Http/Tests/Firewall/ContextListenerTest.php
index c153fd5..d6bc5b4 100644
--- a/Http/Tests/Firewall/ContextListenerTest.php
+++ b/Http/Tests/Firewall/ContextListenerTest.php
@@ -174,7 +174,7 @@ class ContextListenerTest extends \PHPUnit_Framework_TestCase
return array(
array(serialize(new \__PHP_Incomplete_Class())),
array(serialize(null)),
- array(null)
+ array(null),
);
}
diff --git a/Http/Tests/Firewall/DigestDataTest.php b/Http/Tests/Firewall/DigestDataTest.php
index 86a5327..a7c8d49 100644
--- a/Http/Tests/Firewall/DigestDataTest.php
+++ b/Http/Tests/Firewall/DigestDataTest.php
@@ -18,9 +18,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetResponse()
{
$digestAuth = new DigestData(
- 'username="user", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="user", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -30,9 +30,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsername()
{
$digestAuth = new DigestData(
- 'username="user", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="user", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -42,9 +42,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsernameWithQuote()
{
$digestAuth = new DigestData(
- 'username="\"user\"", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="\"user\"", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -54,9 +54,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsernameWithQuoteAndEscape()
{
$digestAuth = new DigestData(
- 'username="\"u\\\\\"ser\"", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="\"u\\\\\"ser\"", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -66,9 +66,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsernameWithSingleQuote()
{
$digestAuth = new DigestData(
- 'username="\"u\'ser\"", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="\"u\'ser\"", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -78,9 +78,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsernameWithSingleQuoteAndEscape()
{
$digestAuth = new DigestData(
- 'username="\"u\\\'ser\"", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="\"u\\\'ser\"", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -90,9 +90,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsernameWithEscape()
{
$digestAuth = new DigestData(
- 'username="\"u\\ser\"", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="\"u\\ser\"", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -106,8 +106,8 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
$nonce = base64_encode($time.':'.md5($time.':'.$key));
$digestAuth = new DigestData(
- 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -146,8 +146,8 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
$nonce = base64_encode($time.':'.md5($time.':'.$key));
$digestAuth = new DigestData(
- 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
diff --git a/Http/Tests/Firewall/SwitchUserListenerTest.php b/Http/Tests/Firewall/SwitchUserListenerTest.php
index 110e05c..9e149a2 100644
--- a/Http/Tests/Firewall/SwitchUserListenerTest.php
+++ b/Http/Tests/Firewall/SwitchUserListenerTest.php
@@ -157,7 +157,7 @@ class SwitchUserListenerTest extends \PHPUnit_Framework_TestCase
$this->securityContext->expects($this->any())->method('getToken')->will($this->returnValue($token));
$this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue('kuba'));
$this->request->query->expects($this->once())->method('remove', '_switch_user');
- $this->request->query->expects($this->any())->method('all')->will($this->returnValue(array('page'=>3,'section'=>2)));
+ $this->request->query->expects($this->any())->method('all')->will($this->returnValue(array('page' => 3,'section' => 2)));
$this->request->expects($this->any())->method('getUri')->will($this->returnValue('/'));
$this->request->server->expects($this->once())->method('set')->with('QUERY_STRING', 'page=3&section=2');
diff --git a/Http/Tests/Firewall/X509AuthenticationListenerTest.php b/Http/Tests/Firewall/X509AuthenticationListenerTest.php
index 7eefb30..7f2da3e 100644
--- a/Http/Tests/Firewall/X509AuthenticationListenerTest.php
+++ b/Http/Tests/Firewall/X509AuthenticationListenerTest.php
@@ -106,7 +106,7 @@ class X509AuthenticationListenerTest extends \PHPUnit_Framework_TestCase
$request = new Request(array(), array(), array(), array(), array(), array(
'TheUserKey' => 'TheUser',
- 'TheCredentialsKey' => 'TheCredentials'
+ 'TheCredentialsKey' => 'TheCredentials',
));
$context = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface');
diff --git a/Http/Tests/FirewallTest.php b/Http/Tests/FirewallTest.php
index 67f4f15..9994737 100644
--- a/Http/Tests/FirewallTest.php
+++ b/Http/Tests/FirewallTest.php
@@ -73,7 +73,7 @@ class FirewallTest extends \PHPUnit_Framework_TestCase
array(
$this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'),
$this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false),
- HttpKernelInterface::MASTER_REQUEST
+ HttpKernelInterface::MASTER_REQUEST,
)
);
$event
diff --git a/Http/Tests/HttpUtilsTest.php b/Http/Tests/HttpUtilsTest.php
index 90380ea..5cac504 100644
--- a/Http/Tests/HttpUtilsTest.php
+++ b/Http/Tests/HttpUtilsTest.php
@@ -128,7 +128,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase
return array(
array(SecurityContextInterface::AUTHENTICATION_ERROR),
array(SecurityContextInterface::ACCESS_DENIED_ERROR),
- array(SecurityContextInterface::LAST_USERNAME)
+ array(SecurityContextInterface::LAST_USERNAME),
);
}
diff --git a/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php b/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php
index 927b771..c3d9260 100644
--- a/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php
+++ b/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php
@@ -243,7 +243,7 @@ class AbstractRememberMeServicesTest extends \PHPUnit_Framework_TestCase
}
return $this->getMockForAbstractClass('Symfony\Component\Security\Http\RememberMe\AbstractRememberMeServices', array(
- array($userProvider), 'fookey', 'fookey', $options, $logger
+ array($userProvider), 'fookey', 'fookey', $options, $logger,
));
}
diff --git a/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php b/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php
index 098f5b6..a490e9a 100644
--- a/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php
+++ b/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php
@@ -117,7 +117,8 @@ class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_Test
try {
$service->autoLogin($request);
$this->fail('Expected CookieTheftException was not thrown.');
- } catch (CookieTheftException $theft) { }
+ } catch (CookieTheftException $theft) {
+ }
$this->assertTrue($request->attributes->has(RememberMeServicesInterface::COOKIE_ATTR_NAME));
}
diff --git a/Http/Tests/RememberMe/ResponseListenerTest.php b/Http/Tests/RememberMe/ResponseListenerTest.php
index 3c228b4..9bb84a2 100644
--- a/Http/Tests/RememberMe/ResponseListenerTest.php
+++ b/Http/Tests/RememberMe/ResponseListenerTest.php
@@ -24,7 +24,7 @@ class ResponseListenerTest extends \PHPUnit_Framework_TestCase
$cookie = new Cookie('rememberme');
$request = $this->getRequest(array(
- RememberMeServicesInterface::COOKIE_ATTR_NAME => $cookie
+ RememberMeServicesInterface::COOKIE_ATTR_NAME => $cookie,
));
$response = $this->getResponse();