Skip to content

Commit 7c856b4

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/JumbledIncrementer: rename variable to make test easier to read
Using `$same` instead of `$i` should help highlight which variable is expected to trigger the sniff when reading the test code.
1 parent 2d9779d commit 7c856b4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.1.inc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
for ($i = 0; $i < 20; $i++) {
4-
for ($j = 0; $j < 5; $i += 2) {
5-
for ($k = 0; $k > 3; $i++) {
3+
for ($same = 0; $same < 20; $same++) {
4+
for ($j = 0; $j < 5; $same += 2) {
5+
for ($k = 0; $k > 3; $same++) {
66

77
}
88
}
@@ -17,8 +17,8 @@ for ($i = 0; $i < 20; $i++) {
1717
}
1818

1919
for ($i = 0; $i < 20; $i++) {
20-
for ($j = 0; $j < 5; $j += 2) {
21-
for ($k = 0; $k > 3; $j++) {
20+
for ($same = 0; $same < 5; $same += 2) {
21+
for ($k = 0; $k > 3; $same++) {
2222

2323
}
2424
}

0 commit comments

Comments
 (0)