File: ForLoopShouldBeWhileLoopUnitTest.inc

package info (click to toggle)
php-codesniffer 1.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,092 kB
  • sloc: php: 30,445; xml: 3,768; makefile: 15; pascal: 8; sh: 6
file content (13 lines) | stat: -rw-r--r-- 239 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
for ($i = 0; $i < 10; $i++) {
    // Everything is fine
}

for (; $it->valid();) {
    $it->next();
}

for (;(($it1->valid() && $foo) || (!$it2->value && ($bar || false)));/*Could be ingored*/) {
    $it1->next();
    $it2->next();
}