chore: removes redundant validation of $repeat, as it is the while condition. (#12521)

This commit is contained in:
Marcos Marcolin 2023-10-27 05:15:16 -03:00 committed by GitHub
parent bd185c3dd5
commit ad1fbde7c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -398,15 +398,13 @@ function main(): void
$is_switch = true; $is_switch = true;
if ($repeat) { foreach ($cfgtypes as $type) {
foreach ($cfgtypes as $type) { if (strpos($switch, '--' . $type) === 0) {
if (strpos($switch, '--' . $type) === 0) { foreach ($cfgfiles as $file) {
foreach ($cfgfiles as $file) { if ($switch == '--' . $type . '-' . $file) {
if ($switch == '--' . $type . '-' . $file) { $cfg[$type][$file] = true;
$cfg[$type][$file] = true; $is_switch = false;
$is_switch = false; break;
break;
}
} }
} }
} }