summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDariusz Górecki <darek.krk@gmail.com>2013-04-02 10:39:57 +0100
committerDariusz Górecki <darek.krk@gmail.com>2013-04-02 10:39:57 +0100
commitcfa23578e55c43c20a8d823bf9a01ed08bcde1d5 (patch)
tree5822fa6366ba33f0390760468be2733cc3f8bd25
parent708f7aa9f69b2ae48832a875c252f4e14f2d76e8 (diff)
downloadsymfony-security-cfa23578e55c43c20a8d823bf9a01ed08bcde1d5.zip
symfony-security-cfa23578e55c43c20a8d823bf9a01ed08bcde1d5.tar.gz
symfony-security-cfa23578e55c43c20a8d823bf9a01ed08bcde1d5.tar.bz2
[CS Fix] Consistent coding-style of concatenation operator usage
-rw-r--r--Core/Encoder/Pbkdf2PasswordEncoder.php2
-rw-r--r--Http/Firewall/ExceptionListener.php2
-rw-r--r--Tests/Core/Encoder/BCryptPasswordEncoderTest.php2
-rw-r--r--Tests/Http/Firewall/DigestDataTest.php12
4 files changed, 9 insertions, 9 deletions
diff --git a/Core/Encoder/Pbkdf2PasswordEncoder.php b/Core/Encoder/Pbkdf2PasswordEncoder.php
index 656545f..4f37ba3 100644
--- a/Core/Encoder/Pbkdf2PasswordEncoder.php
+++ b/Core/Encoder/Pbkdf2PasswordEncoder.php
@@ -82,7 +82,7 @@ class Pbkdf2PasswordEncoder extends BasePasswordEncoder
$digest = '';
for ($i = 1; $i <= $blocks; $i++) {
- $ib = $block = hash_hmac($algorithm, $salt . pack('N', $i), $password, true);
+ $ib = $block = hash_hmac($algorithm, $salt.pack('N', $i), $password, true);
// Iterations
for ($j = 1; $j < $iterations; $j++) {
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php
index 0f81d1b..6554595 100644
--- a/Http/Firewall/ExceptionListener.php
+++ b/Http/Firewall/ExceptionListener.php
@@ -181,7 +181,7 @@ class ExceptionListener
{
// session isn't required when using http basic authentication mechanism for example
if ($request->hasSession() && $request->isMethodSafe()) {
- $request->getSession()->set('_security.' . $this->providerKey . '.target_path', $request->getUri());
+ $request->getSession()->set('_security.'.$this->providerKey.'.target_path', $request->getUri());
}
}
}
diff --git a/Tests/Core/Encoder/BCryptPasswordEncoderTest.php b/Tests/Core/Encoder/BCryptPasswordEncoderTest.php
index bfaf5fc..45c8f74 100644
--- a/Tests/Core/Encoder/BCryptPasswordEncoderTest.php
+++ b/Tests/Core/Encoder/BCryptPasswordEncoderTest.php
@@ -105,7 +105,7 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase
$prefix = '$'.(version_compare(phpversion(), '5.3.7', '>=')
? '2y' : '2a').'$';
$salt = 'MDEyMzQ1Njc4OWFiY2RlZe';
- $expected = crypt(self::PASSWORD, $prefix . self::VALID_COST . '$' . $salt);
+ $expected = crypt(self::PASSWORD, $prefix.self::VALID_COST.'$'.$salt);
$this->assertEquals($expected, $result);
}
diff --git a/Tests/Http/Firewall/DigestDataTest.php b/Tests/Http/Firewall/DigestDataTest.php
index cfb929c..8b63d9c 100644
--- a/Tests/Http/Firewall/DigestDataTest.php
+++ b/Tests/Http/Firewall/DigestDataTest.php
@@ -103,10 +103,10 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
{
$time = microtime(true);
$key = 'ThisIsAKey';
- $nonce = base64_encode($time . ':' . md5($time . ':' . $key));
+ $nonce = base64_encode($time.':'.md5($time.':'.$key));
$digestAuth = new DigestData(
- 'username="user", realm="Welcome, robot!", nonce="' . $nonce . '", ' .
+ 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", ' .
'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -143,10 +143,10 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
{
$time = microtime(true) + 10;
$key = 'ThisIsAKey';
- $nonce = base64_encode($time . ':' . md5($time . ':' . $key));
+ $nonce = base64_encode($time.':'.md5($time.':'.$key));
$digestAuth = new DigestData(
- 'username="user", realm="Welcome, robot!", nonce="' . $nonce . '", ' .
+ 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", ' .
'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -164,10 +164,10 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
private function calculateServerDigest($username, $realm, $password, $key, $nc, $cnonce, $qop, $method, $uri)
{
$time = microtime(true);
- $nonce = base64_encode($time . ':' . md5($time . ':' . $key));
+ $nonce = base64_encode($time.':'.md5($time.':'.$key));
$response = md5(
- md5($username . ':' . $realm . ':' . $password) . ':' . $nonce . ':' . $nc . ':' . $cnonce . ':' . $qop . ':' . md5($method . ':' . $uri)
+ md5($username.':'.$realm.':'.$password).':'.$nonce.':'.$nc.':'.$cnonce.':'.$qop.':'.md5($method.':'.$uri)
);
$digest = sprintf('username="%s", realm="%s", nonce="%s", uri="%s", cnonce="%s", nc=%s, qop="%s", response="%s"',