diff options
author | Graham Campbell <graham@mineuk.com> | 2014-12-02 19:42:47 +0000 |
---|---|---|
committer | Graham Campbell <graham@mineuk.com> | 2014-12-02 19:42:47 +0000 |
commit | c3100eb623f97650fa4cdede3e832a497b8e473c (patch) | |
tree | 87238486dccd52c64143a8d8e687f301966b84bd | |
parent | f9c498153d663c0cf0710ff9c89a11d2a4833cdc (diff) | |
download | symfony-security-c3100eb623f97650fa4cdede3e832a497b8e473c.zip symfony-security-c3100eb623f97650fa4cdede3e832a497b8e473c.tar.gz symfony-security-c3100eb623f97650fa4cdede3e832a497b8e473c.tar.bz2 |
PSR-2 fixesv2.3.23
-rw-r--r-- | Acl/Dbal/AclProvider.php | 2 | ||||
-rw-r--r-- | Acl/Dbal/MutableAclProvider.php | 6 | ||||
-rw-r--r-- | Acl/Domain/Acl.php | 8 | ||||
-rw-r--r-- | Tests/Acl/Dbal/AclProviderBenchmarkTest.php | 2 | ||||
-rw-r--r-- | Tests/Acl/Voter/AclVoterTest.php | 14 | ||||
-rw-r--r-- | Tests/Core/Authorization/AccessDecisionManagerTest.php | 4 | ||||
-rw-r--r-- | Tests/Http/Firewall/RememberMeListenerTest.php | 4 |
7 files changed, 20 insertions, 20 deletions
diff --git a/Acl/Dbal/AclProvider.php b/Acl/Dbal/AclProvider.php index 39d3efe..b53dc75 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; diff --git a/Acl/Dbal/MutableAclProvider.php b/Acl/Dbal/MutableAclProvider.php index 558691a..e2ec89b 100644 --- a/Acl/Dbal/MutableAclProvider.php +++ b/Acl/Dbal/MutableAclProvider.php @@ -787,7 +787,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()) { @@ -864,7 +864,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()) { @@ -907,7 +907,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()) { diff --git a/Acl/Domain/Acl.php b/Acl/Domain/Acl.php index a649d36..8222df7 100644 --- a/Acl/Domain/Acl.php +++ b/Acl/Domain/Acl.php @@ -414,7 +414,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); } } @@ -440,7 +440,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); } } @@ -485,7 +485,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); } } @@ -543,7 +543,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); } } diff --git a/Tests/Acl/Dbal/AclProviderBenchmarkTest.php b/Tests/Acl/Dbal/AclProviderBenchmarkTest.php index e930b19..46f4356 100644 --- a/Tests/Acl/Dbal/AclProviderBenchmarkTest.php +++ b/Tests/Acl/Dbal/AclProviderBenchmarkTest.php @@ -111,7 +111,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) { diff --git a/Tests/Acl/Voter/AclVoterTest.php b/Tests/Acl/Voter/AclVoterTest.php index 98e5ab9..57f9d1b 100644 --- a/Tests/Acl/Voter/AclVoterTest.php +++ b/Tests/Acl/Voter/AclVoterTest.php @@ -27,7 +27,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase */ public function testSupportsAttribute($attribute, $supported) { - list($voter,, $permissionMap,,) = $this->getVoter(true, false); + list($voter, , $permissionMap, ,) = $this->getVoter(true, false); $permissionMap ->expects($this->once()) @@ -44,7 +44,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase */ public function testSupportsAttributeNonString($attribute) { - list($voter,,,,,) = $this->getVoter(true, false); + list($voter, , , , ,) = $this->getVoter(true, false); $this->assertFalse($voter->supportsAttribute($attribute)); } @@ -72,7 +72,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase */ public function testSupportsClass($class) { - list($voter,,,,) = $this->getVoter(); + list($voter, , , ,) = $this->getVoter(); $this->assertTrue($voter->supportsClass($class)); } @@ -88,7 +88,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase public function testVote() { - list($voter,, $permissionMap,,) = $this->getVoter(); + list($voter, , $permissionMap, ,) = $this->getVoter(); $permissionMap ->expects($this->atLeastOnce()) ->method('getMasks') @@ -103,7 +103,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase */ public function testVoteWhenNoObjectIsPassed($allowIfObjectIdentityUnavailable) { - list($voter,, $permissionMap,,) = $this->getVoter($allowIfObjectIdentityUnavailable); + list($voter, , $permissionMap, ,) = $this->getVoter($allowIfObjectIdentityUnavailable); $permissionMap ->expects($this->once()) ->method('getMasks') @@ -124,7 +124,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase */ public function testVoteWhenOidStrategyReturnsNull($allowIfUnavailable) { - list($voter,, $permissionMap, $oidStrategy,) = $this->getVoter($allowIfUnavailable); + list($voter, , $permissionMap, $oidStrategy,) = $this->getVoter($allowIfUnavailable); $permissionMap ->expects($this->once()) ->method('getMasks') @@ -365,7 +365,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase { list($voter, $provider, $permissionMap, $oidStrategy, $sidStrategy) = $this->getVoter(); - $oid = new ObjectIdentity('someID','someType'); + $oid = new ObjectIdentity('someID', 'someType'); $permissionMap ->expects($this->once()) diff --git a/Tests/Core/Authorization/AccessDecisionManagerTest.php b/Tests/Core/Authorization/AccessDecisionManagerTest.php index 37e12b7..74e790a 100644 --- a/Tests/Core/Authorization/AccessDecisionManagerTest.php +++ b/Tests/Core/Authorization/AccessDecisionManagerTest.php @@ -99,8 +99,8 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase $voter->expects($this->exactly(2)) ->method('vote') ->will($this->returnValueMap(array( - array($token, null, array("ROLE_FOO"),$vote1), - array($token, null, array("ROLE_BAR"),$vote2), + array($token, null, array("ROLE_FOO"), $vote1), + array($token, null, array("ROLE_BAR"), $vote2), ))) ; diff --git a/Tests/Http/Firewall/RememberMeListenerTest.php b/Tests/Http/Firewall/RememberMeListenerTest.php index 8ad4c55..301bd6f 100644 --- a/Tests/Http/Firewall/RememberMeListenerTest.php +++ b/Tests/Http/Firewall/RememberMeListenerTest.php @@ -34,7 +34,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase public function testOnCoreSecurityDoesNotTryToPopulateNonEmptySecurityContext() { - list($listener, $context, $service,,) = $this->getListener(); + list($listener, $context, $service, ,) = $this->getListener(); $context ->expects($this->once()) @@ -52,7 +52,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase public function testOnCoreSecurityDoesNothingWhenNoCookieIsSet() { - list($listener, $context, $service,,) = $this->getListener(); + list($listener, $context, $service, ,) = $this->getListener(); $context ->expects($this->once()) |