Merge pull request #8239 from carusogabriel/improve-redability-foreach
Make usage of foreach to improve readabilitypull/8252/head
commit
555fa5bae2
|
@ -162,18 +162,18 @@ class AllFunctionalTest extends TestCase
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for ($i = 0, $c = count($tokens); $i < $c; $i++) {
|
foreach ($tokens as $token) {
|
||||||
if ('' === $tokens[$i] && null === $section) {
|
if ('' === $token && null === $section) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle section headers.
|
// Handle section headers.
|
||||||
if (null === $section) {
|
if (null === $section) {
|
||||||
$section = $tokens[$i];
|
$section = $token;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sectionData = $tokens[$i];
|
$sectionData = $token;
|
||||||
|
|
||||||
// Allow sections to validate, or modify their section data.
|
// Allow sections to validate, or modify their section data.
|
||||||
switch ($section) {
|
switch ($section) {
|
||||||
|
|
Loading…
Reference in New Issue