summaryrefslogtreecommitdiffstats
path: root/Tests/Core
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-03-07 08:38:03 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2015-03-07 08:38:03 +0100
commit9c2566542e03e280f62b019264becf6b74891bdc (patch)
treebc3d92529ba0e455ebca9ffb575d482a6773a2b6 /Tests/Core
parent89ef6872e8c64eede0d4e6f7d03f0d654ddf2a42 (diff)
parent05fec30b749b3940e13a1115de6be46682de14dc (diff)
downloadsymfony-security-9c2566542e03e280f62b019264becf6b74891bdc.zip
symfony-security-9c2566542e03e280f62b019264becf6b74891bdc.tar.gz
symfony-security-9c2566542e03e280f62b019264becf6b74891bdc.tar.bz2
minor #13862 [2.3] [Config] [Console] [DependencyInjection] [DomCrawler] [Form] [HttpKernel] [PropertyAccess] [Security] [Translation] [Yaml] static code analysis, code cleanup (kalessil)
This PR was squashed before being merged into the 2.3 branch (closes #13862). Discussion ---------- [2.3] [Config] [Console] [DependencyInjection] [DomCrawler] [Form] [HttpKernel] [PropertyAccess] [Security] [Translation] [Yaml] static code analysis, code cleanup | 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 Split <a href="https://github.com/symfony/symfony/pull/13813">PR 13813</a>: part 1 - targeting v2.3 Following is included (no functional changes, found with <a href="https://plugins.jetbrains.com/plugin/7622?pr=phpStorm">Php Inspections (EA Extended)</a>): - Fixed couple of concatenation as array index warnings - Unset calls can be merged inspection fixes - array_search in in_array context inspection fixes - Is null usage inspection fixes - Prefixed increment/decrement inspection fixes - Elvis operator can be used inspection fixes - Alias functions usage inspection fixes - Ternary operator simplification inspection fixes - _ _ DIR _ _ equivalent inspection fixes Commits ------- f13b5f7 [2.3] [Config] [Console] [DependencyInjection] [DomCrawler] [Form] [HttpKernel] [PropertyAccess] [Security] [Translation] [Yaml] static code analysis, code cleanup
Diffstat (limited to 'Tests/Core')
-rw-r--r--Tests/Core/Util/SecureRandomTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/Tests/Core/Util/SecureRandomTest.php b/Tests/Core/Util/SecureRandomTest.php
index bd9fec5..a8cc660 100644
--- a/Tests/Core/Util/SecureRandomTest.php
+++ b/Tests/Core/Util/SecureRandomTest.php
@@ -41,7 +41,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
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]] += 1;
+ ++$c[8 * $b[$k - 3] + 4 * $b[$k - 2] + 2 * $b[$k - 1] + $b[$k]];
}
$f = 0;
@@ -73,14 +73,14 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
$run = 6;
}
- $runs[$run] += 1;
+ ++$runs[$run];
};
$currentRun = 0;
$lastBit = null;
for ($i = 0; $i < 20000; $i++) {
if ($lastBit === $b[$i]) {
- $currentRun += 1;
+ ++$currentRun;
} else {
if ($currentRun > 0) {
$addRun($currentRun);
@@ -115,7 +115,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
$lastBit = null;
for ($i = 0; $i < 20000; $i++) {
if ($lastBit === $b[$i]) {
- $currentRun += 1;
+ ++$currentRun;
} else {
if ($currentRun > $longestRun) {
$longestRun = $currentRun;