Skip to content

Commit 64e3fe3

Browse files
committed
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: PHP-CS-Fixer/PHP-CS-Fixer#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
2 parents ab156d5 + 71c8243 commit 64e3fe3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Loader/MoFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private function parse($resource)
116116

117117
$messages = array();
118118

119-
for ($i = 0; $i < $count; $i++) {
119+
for ($i = 0; $i < $count; ++$i) {
120120
$singularId = $pluralId = null;
121121
$translated = null;
122122

Tests/PluralizationRulesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected function generateTestData($plural, $langCodes)
112112
{
113113
$matrix = array();
114114
foreach ($langCodes as $langCode) {
115-
for ($count = 0; $count < 200; $count++) {
115+
for ($count = 0; $count < 200; ++$count) {
116116
$plural = PluralizationRules::get($count, $langCode);
117117
$matrix[$langCode][$count] = $plural;
118118
}

0 commit comments

Comments
 (0)