summaryrefslogtreecommitdiffstats
path: root/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Core')
-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
7 files changed, 35 insertions, 23 deletions
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.