summaryrefslogtreecommitdiffstats
path: root/Tests/Core/Util
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-05-15 15:28:34 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2015-05-15 15:28:34 +0200
commitc29b2f6d4618d6366d6e5fb3770169c7e1773bf3 (patch)
tree0590e954cc2ecc984a70105855fb319701239122 /Tests/Core/Util
parentffa3efde95d20fb8840f47c26de3bbc6425e1277 (diff)
parent9278dfa5dd6dfbcda01e947459b34fdd0e2e68bb (diff)
downloadsymfony-security-c29b2f6d4618d6366d6e5fb3770169c7e1773bf3.zip
symfony-security-c29b2f6d4618d6366d6e5fb3770169c7e1773bf3.tar.gz
symfony-security-c29b2f6d4618d6366d6e5fb3770169c7e1773bf3.tar.bz2
minor #14121 CS: Pre incrementation/decrementation should be used if possible (gharlan)
This PR was merged into the 2.3 branch. Discussion ---------- CS: Pre incrementation/decrementation should be used if possible | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Fixes provided by new fixer: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1113 If this pr is merged I would change the level of the fixer to `symfony`. Commits ------- c5123d6 CS: Pre incrementation/decrementation should be used if possible
Diffstat (limited to 'Tests/Core/Util')
-rw-r--r--Tests/Core/Util/SecureRandomTest.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/Tests/Core/Util/SecureRandomTest.php b/Tests/Core/Util/SecureRandomTest.php
index 316b049..9fd1c16 100644
--- a/Tests/Core/Util/SecureRandomTest.php
+++ b/Tests/Core/Util/SecureRandomTest.php
@@ -35,17 +35,17 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
{
$b = $this->getBitSequence($secureRandom, 20000);
$c = array();
- for ($i = 0; $i <= 15; $i++) {
+ for ($i = 0; $i <= 15; ++$i) {
$c[$i] = 0;
}
- for ($j = 1; $j <= 5000; $j++) {
+ for ($j = 1; $j <= 5000; ++$j) {
$k = 4 * $j - 1;
++$c[8 * $b[$k - 3] + 4 * $b[$k - 2] + 2 * $b[$k - 1] + $b[$k]];
}
$f = 0;
- for ($i = 0; $i <= 15; $i++) {
+ for ($i = 0; $i <= 15; ++$i) {
$f += $c[$i] * $c[$i];
}
@@ -64,7 +64,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
$b = $this->getBitSequence($secureRandom, 20000);
$runs = array();
- for ($i = 1; $i <= 6; $i++) {
+ for ($i = 1; $i <= 6; ++$i) {
$runs[$i] = 0;
}
@@ -78,7 +78,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
$currentRun = 0;
$lastBit = null;
- for ($i = 0; $i < 20000; $i++) {
+ for ($i = 0; $i < 20000; ++$i) {
if ($lastBit === $b[$i]) {
++$currentRun;
} else {
@@ -113,7 +113,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
$longestRun = $currentRun = 0;
$lastBit = null;
- for ($i = 0; $i < 20000; $i++) {
+ for ($i = 0; $i < 20000; ++$i) {
if ($lastBit === $b[$i]) {
++$currentRun;
} else {
@@ -142,7 +142,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
$b = $this->getBitSequence($secureRandom, 20000);
$Z = 0;
- for ($i = 0; $i < 5000; $i++) {
+ for ($i = 0; $i < 5000; ++$i) {
$Z += $b[$i] === $b[$i + $shift] ? 1 : 0;
}