diff --git a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php
index 269367872e..872779c2f8 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php
@@ -121,7 +121,7 @@ class DbalLoggerTest extends \PHPUnit_Framework_TestCase
$shortString = '';
$longString = '';
- for ($i = 1; $i <= DbalLogger::MAX_STRING_LENGTH; $i++) {
+ for ($i = 1; $i <= DbalLogger::MAX_STRING_LENGTH; ++$i) {
$shortString .= $testStringArray[$i % $testStringCount];
$longString .= $testStringArray[$i % $testStringCount];
}
diff --git a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php
index dd049b0f62..df87a19284 100644
--- a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php
+++ b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php
@@ -141,7 +141,7 @@ class CodeExtension extends \Twig_Extension
$content = preg_split('#
#', $code);
$lines = array();
- for ($i = max($line - 3, 1), $max = min($line + 3, count($content)); $i <= $max; $i++) {
+ for ($i = max($line - 3, 1), $max = min($line + 3, count($content)); $i <= $max; ++$i) {
$lines[] = '
'.self::fixCodeMarkup($content[$i - 1]).'
';
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
index 33659718fb..0779dfe90b 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
@@ -141,7 +141,7 @@ EOF
$optionsCount = 0;
foreach ($options as $option) {
if ($input->getOption($option)) {
- $optionsCount++;
+ ++$optionsCount;
}
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php
index 770a5e5b3d..0d7dc15771 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php
@@ -135,7 +135,7 @@ class CodeHelper extends Helper
$content = preg_split('#
#', $code);
$lines = array();
- for ($i = max($line - 3, 1), $max = min($line + 3, count($content)); $i <= $max; $i++) {
+ for ($i = max($line - 3, 1), $max = min($line + 3, count($content)); $i <= $max; ++$i) {
$lines[] = ''.self::fixCodeMarkup($content[$i - 1]).'
';
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php
index 5007a86bca..8084b0fd7a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php
@@ -148,7 +148,7 @@ class PhpExtractor implements ExtractorInterface
{
$tokenIterator = new \ArrayIterator($tokens);
- for ($key = 0; $key < $tokenIterator->count(); $key++) {
+ for ($key = 0; $key < $tokenIterator->count(); ++$key) {
foreach ($this->sequences as $sequence) {
$message = '';
$tokenIterator->seek($key);
diff --git a/src/Symfony/Component/ClassLoader/ClassMapGenerator.php b/src/Symfony/Component/ClassLoader/ClassMapGenerator.php
index 4c2aeab3ac..112bee87bd 100644
--- a/src/Symfony/Component/ClassLoader/ClassMapGenerator.php
+++ b/src/Symfony/Component/ClassLoader/ClassMapGenerator.php
@@ -95,7 +95,7 @@ class ClassMapGenerator
$classes = array();
$namespace = '';
- for ($i = 0, $max = count($tokens); $i < $max; $i++) {
+ for ($i = 0, $max = count($tokens); $i < $max; ++$i) {
$token = $tokens[$i];
if (is_string($token)) {
diff --git a/src/Symfony/Component/Config/Loader/FileLoader.php b/src/Symfony/Component/Config/Loader/FileLoader.php
index db754e0a63..9c1b4d9f1e 100644
--- a/src/Symfony/Component/Config/Loader/FileLoader.php
+++ b/src/Symfony/Component/Config/Loader/FileLoader.php
@@ -91,7 +91,7 @@ abstract class FileLoader extends Loader
}
$resources = is_array($resource) ? $resource : array($resource);
- for ($i = 0; $i < $resourcesCount = count($resources); $i++) {
+ for ($i = 0; $i < $resourcesCount = count($resources); ++$i) {
if (isset(self::$loading[$resources[$i]])) {
if ($i == $resourcesCount - 1) {
throw new FileLoaderImportCircularReferenceException(array_keys(self::$loading));
diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php
index 571682e137..8c50bf9cb2 100644
--- a/src/Symfony/Component/Console/Application.php
+++ b/src/Symfony/Component/Console/Application.php
@@ -713,7 +713,7 @@ class Application
'args' => array(),
));
- for ($i = 0, $count = count($trace); $i < $count; $i++) {
+ for ($i = 0, $count = count($trace); $i < $count; ++$i) {
$class = isset($trace[$i]['class']) ? $trace[$i]['class'] : '';
$type = isset($trace[$i]['type']) ? $trace[$i]['type'] : '';
$function = $trace[$i]['function'];
diff --git a/src/Symfony/Component/Console/Helper/DialogHelper.php b/src/Symfony/Component/Console/Helper/DialogHelper.php
index 4b5c86d67d..eb68c4c508 100644
--- a/src/Symfony/Component/Console/Helper/DialogHelper.php
+++ b/src/Symfony/Component/Console/Helper/DialogHelper.php
@@ -138,7 +138,7 @@ class DialogHelper extends InputAwareHelper
// Backspace Character
if ("\177" === $c) {
if (0 === $numMatches && 0 !== $i) {
- $i--;
+ --$i;
// Move cursor backwards
$output->write("\033[1D");
}
@@ -191,7 +191,7 @@ class DialogHelper extends InputAwareHelper
} else {
$output->write($c);
$ret .= $c;
- $i++;
+ ++$i;
$numMatches = 0;
$ofs = 0;
diff --git a/src/Symfony/Component/Console/Input/ArgvInput.php b/src/Symfony/Component/Console/Input/ArgvInput.php
index f5cc5d136b..97b0cfc05d 100644
--- a/src/Symfony/Component/Console/Input/ArgvInput.php
+++ b/src/Symfony/Component/Console/Input/ArgvInput.php
@@ -123,7 +123,7 @@ class ArgvInput extends Input
private function parseShortOptionSet($name)
{
$len = strlen($name);
- for ($i = 0; $i < $len; $i++) {
+ for ($i = 0; $i < $len; ++$i) {
if (!$this->definition->hasShortcut($name[$i])) {
throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i]));
}
diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php
index 0086240c81..41ece8a422 100644
--- a/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php
+++ b/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php
@@ -84,7 +84,7 @@ class FunctionExtension extends AbstractExtension
if ($last) {
$expr = 'last() - '.$expr;
- $b--;
+ --$b;
}
if (0 !== $b) {
diff --git a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php
index 923c47ffa0..99eaf497d5 100644
--- a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php
+++ b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php
@@ -189,9 +189,9 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase
public function testTooBigArray()
{
$a = array();
- for ($i = 0; $i < 20; $i++) {
- for ($j = 0; $j < 50; $j++) {
- for ($k = 0; $k < 10; $k++) {
+ for ($i = 0; $i < 20; ++$i) {
+ for ($j = 0; $j < 50; ++$j) {
+ for ($k = 0; $k < 10; ++$k) {
$a[$i][$j][$k] = 'value';
}
}
diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php
index cf540c71a3..048ba69274 100644
--- a/src/Symfony/Component/Filesystem/Filesystem.php
+++ b/src/Symfony/Component/Filesystem/Filesystem.php
@@ -337,7 +337,7 @@ class Filesystem
// Find for which directory the common path stops
$index = 0;
while (isset($startPathArr[$index]) && isset($endPathArr[$index]) && $startPathArr[$index] === $endPathArr[$index]) {
- $index++;
+ ++$index;
}
// Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels)
diff --git a/src/Symfony/Component/Finder/Expression/Glob.php b/src/Symfony/Component/Finder/Expression/Glob.php
index 3023ceea69..a6984b82e3 100644
--- a/src/Symfony/Component/Finder/Expression/Glob.php
+++ b/src/Symfony/Component/Finder/Expression/Glob.php
@@ -105,7 +105,7 @@ class Glob implements ValueInterface
$inCurlies = 0;
$regex = '';
$sizeGlob = strlen($this->pattern);
- for ($i = 0; $i < $sizeGlob; $i++) {
+ for ($i = 0; $i < $sizeGlob; ++$i) {
$car = $this->pattern[$i];
if ($firstByte) {
if ($strictLeadingDot && '.' !== $car) {
diff --git a/src/Symfony/Component/Finder/Glob.php b/src/Symfony/Component/Finder/Glob.php
index c2030c9232..fedcc5e708 100644
--- a/src/Symfony/Component/Finder/Glob.php
+++ b/src/Symfony/Component/Finder/Glob.php
@@ -51,7 +51,7 @@ class Glob
$inCurlies = 0;
$regex = '';
$sizeGlob = strlen($glob);
- for ($i = 0; $i < $sizeGlob; $i++) {
+ for ($i = 0; $i < $sizeGlob; ++$i) {
$car = $glob[$i];
if ($firstByte) {
if ($strictLeadingDot && '.' !== $car) {
diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php
index 4d196840a5..8976706096 100644
--- a/src/Symfony/Component/Finder/Tests/FinderTest.php
+++ b/src/Symfony/Component/Finder/Tests/FinderTest.php
@@ -475,7 +475,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
$i = 0;
foreach ($directory as $dir) {
- $i++;
+ ++$i;
}
$this->assertCount($i, $directory);
@@ -487,7 +487,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
$i = 0;
foreach ($files as $file) {
- $i++;
+ ++$i;
}
$this->assertCount($i, $files);
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/FilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/FilterIteratorTest.php
index 029a266b7b..41e05a0a7b 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/FilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/FilterIteratorTest.php
@@ -31,7 +31,7 @@ class FilterIteratorTest extends RealIteratorTestCase
$c = 0;
foreach ($i as $item) {
- $c++;
+ ++$c;
}
$this->assertEquals(1, $c);
@@ -40,7 +40,7 @@ class FilterIteratorTest extends RealIteratorTestCase
$c = 0;
foreach ($i as $item) {
- $c++;
+ ++$c;
}
// This would fail with \FilterIterator but works with Symfony\Component\Finder\Iterator\FilterIterator
diff --git a/src/Symfony/Component/HttpFoundation/IpUtils.php b/src/Symfony/Component/HttpFoundation/IpUtils.php
index ea68e2ea8b..68e9421d94 100644
--- a/src/Symfony/Component/HttpFoundation/IpUtils.php
+++ b/src/Symfony/Component/HttpFoundation/IpUtils.php
@@ -110,7 +110,7 @@ class IpUtils
$bytesAddr = unpack('n*', inet_pton($address));
$bytesTest = unpack('n*', inet_pton($requestIp));
- for ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; $i++) {
+ for ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; ++$i) {
$left = $netmask - 16 * ($i - 1);
$left = ($left <= 16) ? $left : 16;
$mask = ~(0xffff >> $left) & 0xffff;
diff --git a/src/Symfony/Component/HttpFoundation/ParameterBag.php b/src/Symfony/Component/HttpFoundation/ParameterBag.php
index 348aab9685..6081f3f4a6 100644
--- a/src/Symfony/Component/HttpFoundation/ParameterBag.php
+++ b/src/Symfony/Component/HttpFoundation/ParameterBag.php
@@ -113,7 +113,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
$value = $this->parameters[$root];
$currentKey = null;
- for ($i = $pos, $c = strlen($path); $i < $c; $i++) {
+ for ($i = $pos, $c = strlen($path); $i < $c; ++$i) {
$char = $path[$i];
if ('[' === $char) {
diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php
index 6df3df3457..1c730ef059 100644
--- a/src/Symfony/Component/HttpFoundation/Request.php
+++ b/src/Symfony/Component/HttpFoundation/Request.php
@@ -1591,7 +1591,7 @@ class Request
$lang = $codes[1];
}
} else {
- for ($i = 0, $max = count($codes); $i < $max; $i++) {
+ for ($i = 0, $max = count($codes); $i < $max; ++$i) {
if ($i === 0) {
$lang = strtolower($codes[0]);
} else {
diff --git a/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php
index 9b925d70f0..ada9ac0d1e 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php
@@ -196,7 +196,7 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase
$i = 0;
foreach ($headerBag as $key => $val) {
- $i++;
+ ++$i;
$this->assertEquals(array($headers[$key]), $val);
}
diff --git a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
index f19a8da239..16fedbf83a 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
@@ -233,7 +233,7 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase
$i = 0;
foreach ($bag as $key => $val) {
- $i++;
+ ++$i;
$this->assertEquals($parameters[$key], $val);
}
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php
index d291590fd9..5515003b40 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php
@@ -177,7 +177,7 @@ class AttributeBagTest extends \PHPUnit_Framework_TestCase
$i = 0;
foreach ($this->bag as $key => $val) {
$this->assertEquals($this->array[$key], $val);
- $i++;
+ ++$i;
}
$this->assertEquals(count($this->array), $i);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php
index 6b529ab41f..c424591755 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php
@@ -145,7 +145,7 @@ class FlashBagTest extends \PHPUnit_Framework_TestCase
$i = 0;
foreach ($this->bag as $key => $val) {
$this->assertEquals(array($flashes[$key]), $val);
- $i++;
+ ++$i;
}
$this->assertEquals(count($flashes), $i);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php
index 4e1667cf9e..385df1e46a 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php
@@ -203,7 +203,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase
$i = 0;
foreach ($this->session as $key => $val) {
$this->assertEquals($attributes[$key], $val);
- $i++;
+ ++$i;
}
$this->assertEquals(count($attributes), $i);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php b/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php
index 07dff696d6..aa2b31dbc3 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php
@@ -17,7 +17,7 @@ abstract class AbstractProfilerStorageTest extends \PHPUnit_Framework_TestCase
{
public function testStore()
{
- for ($i = 0; $i < 10; $i++) {
+ for ($i = 0; $i < 10; ++$i) {
$profile = new Profile('token_'.$i);
$profile->setIp('127.0.0.1');
$profile->setUrl('http://foo.bar');
@@ -159,7 +159,7 @@ abstract class AbstractProfilerStorageTest extends \PHPUnit_Framework_TestCase
$dt = new \DateTime('now');
$start = $dt->getTimestamp();
- for ($i = 0; $i < 3; $i++) {
+ for ($i = 0; $i < 3; ++$i) {
$dt->modify('+1 minute');
$profile = new Profile('time_'.$i);
$profile->setIp('127.0.0.1');
@@ -181,7 +181,7 @@ abstract class AbstractProfilerStorageTest extends \PHPUnit_Framework_TestCase
public function testRetrieveByEmptyUrlAndIp()
{
- for ($i = 0; $i < 5; $i++) {
+ for ($i = 0; $i < 5; ++$i) {
$profile = new Profile('token_'.$i);
$profile->setMethod('GET');
$this->getStorage()->write($profile);
@@ -193,7 +193,7 @@ abstract class AbstractProfilerStorageTest extends \PHPUnit_Framework_TestCase
public function testRetrieveByMethodAndLimit()
{
foreach (array('POST', 'GET') as $method) {
- for ($i = 0; $i < 5; $i++) {
+ for ($i = 0; $i < 5; ++$i) {
$profile = new Profile('token_'.$i.$method);
$profile->setMethod($method);
$this->getStorage()->write($profile);
@@ -233,7 +233,7 @@ abstract class AbstractProfilerStorageTest extends \PHPUnit_Framework_TestCase
public function testDuplicates()
{
- for ($i = 1; $i <= 5; $i++) {
+ for ($i = 1; $i <= 5; ++$i) {
$profile = new Profile('foo'.$i);
$profile->setIp('127.0.0.1');
$profile->setUrl('http://example.net/');
diff --git a/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php b/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php
index 6c74621419..d5edc70032 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php
@@ -62,7 +62,7 @@ class FileProfilerStorageTest extends AbstractProfilerStorageTest
public function testMultiRowIndexFile()
{
$iteration = 3;
- for ($i = 0; $i < $iteration; $i++) {
+ for ($i = 0; $i < $iteration; ++$i) {
$profile = new Profile('token'.$i);
$profile->setIp('127.0.0.'.$i);
$profile->setUrl('http://foo.bar/'.$i);
@@ -74,7 +74,7 @@ class FileProfilerStorageTest extends AbstractProfilerStorageTest
}
$handle = fopen(self::$tmpDir.'/index.csv', 'r');
- for ($i = 0; $i < $iteration; $i++) {
+ for ($i = 0; $i < $iteration; ++$i) {
$row = fgetcsv($handle);
$this->assertEquals('token'.$i, $row[0]);
$this->assertEquals('127.0.0.'.$i, $row[1]);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php b/src/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php
index c72732563c..29525fe6bd 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php
@@ -100,7 +100,7 @@ class MongoDbProfilerStorageTest extends AbstractProfilerStorageTest
public function testCleanup()
{
$dt = new \DateTime('-2 day');
- for ($i = 0; $i < 3; $i++) {
+ for ($i = 0; $i < 3; ++$i) {
$dt->modify('-1 day');
$profile = new Profile('time_'.$i);
$profile->setTime($dt->getTimestamp());
diff --git a/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php b/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php
index 4ba3893751..df4169fea0 100644
--- a/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php
+++ b/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php
@@ -586,7 +586,7 @@ abstract class AbstractNumberFormatterTest extends \PHPUnit_Framework_TestCase
$r->setAccessible(true);
$expected = $r->getValue('Symfony\Component\Intl\NumberFormatter\NumberFormatter');
- for ($i = 0; $i <= 17; $i++) {
+ for ($i = 0; $i <= 17; ++$i) {
$this->assertSame($expected[1][$i], $decimalFormatter->getSymbol($i));
$this->assertSame($expected[2][$i], $currencyFormatter->getSymbol($i));
}
@@ -601,7 +601,7 @@ abstract class AbstractNumberFormatterTest extends \PHPUnit_Framework_TestCase
$r->setAccessible(true);
$expected = $r->getValue('Symfony\Component\Intl\NumberFormatter\NumberFormatter');
- for ($i = 0; $i <= 5; $i++) {
+ for ($i = 0; $i <= 5; ++$i) {
$this->assertSame($expected[1][$i], $decimalFormatter->getTextAttribute($i));
$this->assertSame($expected[2][$i], $currencyFormatter->getTextAttribute($i));
}
diff --git a/src/Symfony/Component/Process/Tests/SignalListener.php b/src/Symfony/Component/Process/Tests/SignalListener.php
index 335ac6027e..bd4d138b04 100644
--- a/src/Symfony/Component/Process/Tests/SignalListener.php
+++ b/src/Symfony/Component/Process/Tests/SignalListener.php
@@ -10,7 +10,7 @@ $n = 0;
// ticks require activity to work - sleep(4); does not work
while ($n < 400) {
usleep(10000);
- $n++;
+ ++$n;
}
return;
diff --git a/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php b/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php
index 92abf3648a..757542740b 100644
--- a/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php
+++ b/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php
@@ -201,7 +201,7 @@ abstract class AnnotationClassLoader implements LoaderInterface
if ($this->defaultRouteIndex > 0) {
$name .= '_'.$this->defaultRouteIndex;
}
- $this->defaultRouteIndex++;
+ ++$this->defaultRouteIndex;
return $name;
}
diff --git a/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php b/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php
index e54a0181c7..8ce57ac18c 100644
--- a/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php
+++ b/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php
@@ -88,7 +88,7 @@ class AnnotationFileLoader extends FileLoader
$class = false;
$namespace = false;
$tokens = token_get_all(file_get_contents($file));
- for ($i = 0, $count = count($tokens); $i < $count; $i++) {
+ for ($i = 0, $count = count($tokens); $i < $count; ++$i) {
$token = $tokens[$i];
if (!is_array($token)) {
diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
index 1bd4fac07c..b97f9f35c3 100644
--- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
+++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
@@ -63,7 +63,7 @@ class ApacheMatcherDumper extends MatcherDumper
if (null !== $hostRegex && $prevHostRegex !== $hostRegex) {
$prevHostRegex = $hostRegex;
- $hostRegexUnique++;
+ ++$hostRegexUnique;
$rule = array();
diff --git a/src/Symfony/Component/Routing/RouteCompiler.php b/src/Symfony/Component/Routing/RouteCompiler.php
index e998b93e93..f6637da666 100644
--- a/src/Symfony/Component/Routing/RouteCompiler.php
+++ b/src/Symfony/Component/Routing/RouteCompiler.php
@@ -145,7 +145,7 @@ class RouteCompiler implements RouteCompilerInterface
// find the first optional token
$firstOptional = PHP_INT_MAX;
if (!$isHost) {
- for ($i = count($tokens) - 1; $i >= 0; $i--) {
+ for ($i = count($tokens) - 1; $i >= 0; --$i) {
$token = $tokens[$i];
if ('variable' === $token[0] && $route->hasDefault($token[3])) {
$firstOptional = $i;
@@ -157,7 +157,7 @@ class RouteCompiler implements RouteCompilerInterface
// compute the matching regexp
$regexp = '';
- for ($i = 0, $nbToken = count($tokens); $i < $nbToken; $i++) {
+ for ($i = 0, $nbToken = count($tokens); $i < $nbToken; ++$i) {
$regexp .= self::computeRegexp($tokens, $i, $firstOptional);
}
diff --git a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
index 4714fb3c77..19b902fa37 100644
--- a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
+++ b/src/Symfony/Component/Security/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;
@@ -281,7 +281,7 @@ SELECTCLAUSE;
$types = array();
$count = count($batch);
- for ($i = 0; $i < $count; $i++) {
+ for ($i = 0; $i < $count; ++$i) {
if (!isset($types[$batch[$i]->getType()])) {
$types[$batch[$i]->getType()] = true;
@@ -296,7 +296,7 @@ SELECTCLAUSE;
if (1 === count($types)) {
$ids = array();
- for ($i = 0; $i < $count; $i++) {
+ for ($i = 0; $i < $count; ++$i) {
$identifier = (string) $batch[$i]->getIdentifier();
$ids[] = $this->connection->quote($identifier);
}
@@ -308,7 +308,7 @@ SELECTCLAUSE;
);
} else {
$where = '(o.object_identifier = %s AND c.class_type = %s)';
- for ($i = 0; $i < $count; $i++) {
+ for ($i = 0; $i < $count; ++$i) {
$sql .= sprintf(
$where,
$this->connection->quote($batch[$i]->getIdentifier()),
diff --git a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
index b28e2b2f0e..7d802d485f 100644
--- a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
+++ b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
@@ -854,7 +854,7 @@ QUERY;
$sids = new \SplObjectStorage();
$classIds = new \SplObjectStorage();
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()) {
@@ -895,7 +895,7 @@ QUERY;
{
$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()) {
@@ -905,7 +905,7 @@ QUERY;
}
foreach ($changes[0] as $old) {
- for ($i = 0, $c = count($old); $i < $c; $i++) {
+ for ($i = 0, $c = count($old); $i < $c; ++$i) {
$ace = $old[$i];
if (!isset($currentIds[$ace->getId()])) {
@@ -928,7 +928,7 @@ QUERY;
$sids = new \SplObjectStorage();
$classIds = new \SplObjectStorage();
- 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()) {
@@ -969,7 +969,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()) {
@@ -977,7 +977,7 @@ QUERY;
}
}
- for ($i = 0, $c = count($old); $i < $c; $i++) {
+ for ($i = 0, $c = count($old); $i < $c; ++$i) {
$ace = $old[$i];
if (!isset($currentIds[$ace->getId()])) {
diff --git a/src/Symfony/Component/Security/Acl/Domain/Acl.php b/src/Symfony/Component/Security/Acl/Domain/Acl.php
index 61153afda4..f417c8fda0 100644
--- a/src/Symfony/Component/Security/Acl/Domain/Acl.php
+++ b/src/Symfony/Component/Security/Acl/Domain/Acl.php
@@ -409,7 +409,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);
}
}
@@ -435,7 +435,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);
}
}
@@ -480,7 +480,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);
}
}
@@ -538,7 +538,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/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php b/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php
index 589adaa98a..7c1e50367d 100644
--- a/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php
+++ b/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php
@@ -122,7 +122,7 @@ class MaskBuilder
$length = strlen($pattern);
$bitmask = str_pad(decbin($this->mask), $length, '0', STR_PAD_LEFT);
- for ($i = $length - 1; $i >= 0; $i--) {
+ for ($i = $length - 1; $i >= 0; --$i) {
if ('1' === $bitmask[$i]) {
try {
$pattern[$i] = self::getCode(1 << ($length - $i - 1));
diff --git a/src/Symfony/Component/Security/Acl/Tests/Dbal/AclProviderBenchmarkTest.php b/src/Symfony/Component/Security/Acl/Tests/Dbal/AclProviderBenchmarkTest.php
index 1f967521d6..c95b474dca 100644
--- a/src/Symfony/Component/Security/Acl/Tests/Dbal/AclProviderBenchmarkTest.php
+++ b/src/Symfony/Component/Security/Acl/Tests/Dbal/AclProviderBenchmarkTest.php
@@ -92,7 +92,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
$this->insertEntryStmt = $this->con->prepare('INSERT INTO acl_entries (id, class_id, object_identity_id, field_name, ace_order, security_identity_id, mask, granting, granting_strategy, audit_success, audit_failure) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
$this->insertOidAncestorStmt = $this->con->prepare('INSERT INTO acl_object_identity_ancestors (object_identity_id, ancestor_id) VALUES (?, ?)');
- for ($i = 0; $i < 40000; $i++) {
+ for ($i = 0; $i < 40000; ++$i) {
$this->generateAclHierarchy();
}
}
@@ -107,7 +107,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) {
@@ -178,7 +178,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
$sids = array();
$fieldOrder = array();
- for ($i = 0; $i <= 30; $i++) {
+ for ($i = 0; $i <= 30; ++$i) {
$fieldName = rand(0, 1) ? null : $this->getRandomString(rand(10, 20));
do {
@@ -226,7 +226,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
while ($i <= 30) {
$mask |= 1 << rand(0, 30);
- $i++;
+ ++$i;
}
return $mask;
diff --git a/src/Symfony/Component/Security/Acl/Tests/Dbal/AclProviderTest.php b/src/Symfony/Component/Security/Acl/Tests/Dbal/AclProviderTest.php
index 717a2585e4..9470d80834 100644
--- a/src/Symfony/Component/Security/Acl/Tests/Dbal/AclProviderTest.php
+++ b/src/Symfony/Component/Security/Acl/Tests/Dbal/AclProviderTest.php
@@ -130,7 +130,7 @@ class AclProviderTest extends \PHPUnit_Framework_TestCase
$i = 0;
foreach ($aces as $index => $ace) {
$this->assertEquals($i, $index);
- $i++;
+ ++$i;
}
$sid = $aces[0]->getSecurityIdentity();
diff --git a/src/Symfony/Component/Security/Acl/Tests/Domain/DoctrineAclCacheTest.php b/src/Symfony/Component/Security/Acl/Tests/Domain/DoctrineAclCacheTest.php
index 128f2c8483..255f7f4447 100644
--- a/src/Symfony/Component/Security/Acl/Tests/Domain/DoctrineAclCacheTest.php
+++ b/src/Symfony/Component/Security/Acl/Tests/Domain/DoctrineAclCacheTest.php
@@ -72,7 +72,7 @@ class DoctrineAclCacheTest extends \PHPUnit_Framework_TestCase
$acl->insertClassFieldAce('foo', $sid, 1);
$acl->insertObjectAce($sid, 1);
$acl->insertObjectFieldAce('foo', $sid, 1);
- $id++;
+ ++$id;
if ($depth > 0) {
$acl->setParentAcl($this->getAcl($depth - 1));
diff --git a/src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php b/src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php
index 03de2284ac..1706fc86a8 100644
--- a/src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php
+++ b/src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php
@@ -55,7 +55,7 @@ class MessageDigestPasswordEncoder extends BasePasswordEncoder
$digest = hash($this->algorithm, $salted, true);
// "stretch" hash
- for ($i = 1; $i < $this->iterations; $i++) {
+ for ($i = 1; $i < $this->iterations; ++$i) {
$digest = hash($this->algorithm, $digest.$salted, true);
}
diff --git a/src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php b/src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php
index dac1cad600..6f24c4f1e2 100644
--- a/src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php
+++ b/src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php
@@ -87,11 +87,11 @@ class Pbkdf2PasswordEncoder extends BasePasswordEncoder
$blocks = ceil($length / strlen(hash($algorithm, null, true)));
$digest = '';
- for ($i = 1; $i <= $blocks; $i++) {
+ for ($i = 1; $i <= $blocks; ++$i) {
$ib = $block = hash_hmac($algorithm, $salt.pack('N', $i), $password, true);
// Iterations
- for ($j = 1; $j < $iterations; $j++) {
+ for ($j = 1; $j < $iterations; ++$j) {
$ib ^= ($block = hash_hmac($algorithm, $block, $password, true));
}
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php
index 126bfe8e74..3c970d148a 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php
@@ -153,13 +153,13 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
protected function getVoters($grants, $denies, $abstains)
{
$voters = array();
- for ($i = 0; $i < $grants; $i++) {
+ for ($i = 0; $i < $grants; ++$i) {
$voters[] = $this->getVoter(VoterInterface::ACCESS_GRANTED);
}
- for ($i = 0; $i < $denies; $i++) {
+ for ($i = 0; $i < $denies; ++$i) {
$voters[] = $this->getVoter(VoterInterface::ACCESS_DENIED);
}
- for ($i = 0; $i < $abstains; $i++) {
+ for ($i = 0; $i < $abstains; ++$i) {
$voters[] = $this->getVoter(VoterInterface::ACCESS_ABSTAIN);
}
diff --git a/src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php b/src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php
index 2f7b845acd..ecad3e5f63 100644
--- a/src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php
@@ -40,7 +40,7 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase
public function testCostInRange()
{
- for ($cost = 4; $cost <= 31; $cost++) {
+ for ($cost = 4; $cost <= 31; ++$cost) {
new BCryptPasswordEncoder($cost);
}
}
diff --git a/src/Symfony/Component/Security/Core/Tests/Util/SecureRandomTest.php b/src/Symfony/Component/Security/Core/Tests/Util/SecureRandomTest.php
index 5dfe1c8e33..666af30d49 100644
--- a/src/Symfony/Component/Security/Core/Tests/Util/SecureRandomTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/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;
}
diff --git a/src/Symfony/Component/Security/Core/Util/StringUtils.php b/src/Symfony/Component/Security/Core/Util/StringUtils.php
index e68347f393..343585c88c 100644
--- a/src/Symfony/Component/Security/Core/Util/StringUtils.php
+++ b/src/Symfony/Component/Security/Core/Util/StringUtils.php
@@ -60,7 +60,7 @@ class StringUtils
$result = 0;
- for ($i = 0; $i < $knownLen; $i++) {
+ for ($i = 0; $i < $knownLen; ++$i) {
$result |= (ord($knownString[$i]) ^ ord($userInput[$i]));
}
diff --git a/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php
index e06566052c..f6420967fb 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php
@@ -38,7 +38,7 @@ class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCas
$this->session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface');
$this->request = $this->getMock('Symfony\Component\HttpFoundation\Request');
$this->request->expects($this->any())->method('getSession')->will($this->returnValue($this->session));
- $this->exception = $this->getMock('Symfony\Component\Security\Core\Exception\AuthenticationException');
+ $this->exception = $this->getMock('Symfony\Component\Security\Core\Exception\AuthenticationException', array('getMessage'));
}
public function testForward()
diff --git a/src/Symfony/Component/Translation/Loader/MoFileLoader.php b/src/Symfony/Component/Translation/Loader/MoFileLoader.php
index ab4e7a9574..746fd52904 100644
--- a/src/Symfony/Component/Translation/Loader/MoFileLoader.php
+++ b/src/Symfony/Component/Translation/Loader/MoFileLoader.php
@@ -116,7 +116,7 @@ class MoFileLoader extends ArrayLoader
$messages = array();
- for ($i = 0; $i < $count; $i++) {
+ for ($i = 0; $i < $count; ++$i) {
$singularId = $pluralId = null;
$translated = null;
diff --git a/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php b/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php
index 1e8ee704fa..066e07f5ab 100644
--- a/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php
+++ b/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php
@@ -112,7 +112,7 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase
{
$matrix = array();
foreach ($langCodes as $langCode) {
- for ($count = 0; $count < 200; $count++) {
+ for ($count = 0; $count < 200; ++$count) {
$plural = PluralizationRules::get($count, $langCode);
$matrix[$langCode][$count] = $plural;
}
diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/FilesLoader.php b/src/Symfony/Component/Validator/Tests/Fixtures/FilesLoader.php
index 59d8ee8b39..a4d6a6ab47 100644
--- a/src/Symfony/Component/Validator/Tests/Fixtures/FilesLoader.php
+++ b/src/Symfony/Component/Validator/Tests/Fixtures/FilesLoader.php
@@ -27,7 +27,7 @@ abstract class FilesLoader extends BaseFilesLoader
protected function getFileLoaderInstance($file)
{
- $this->timesCalled++;
+ ++$this->timesCalled;
return $this->loader;
}