Merge pull request #8239 from carusogabriel/improve-redability-foreach

Make usage of foreach to improve readability
main
Jordi Boggiano 5 years ago committed by GitHub
commit 555fa5bae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -162,18 +162,18 @@ class AllFunctionalTest extends TestCase
}
};
for ($i = 0, $c = count($tokens); $i < $c; $i++) {
if ('' === $tokens[$i] && null === $section) {
foreach ($tokens as $token) {
if ('' === $token && null === $section) {
continue;
}
// Handle section headers.
if (null === $section) {
$section = $tokens[$i];
$section = $token;
continue;
}
$sectionData = $tokens[$i];
$sectionData = $token;
// Allow sections to validate, or modify their section data.
switch ($section) {

Loading…
Cancel
Save