From ad1fbde7c8eb4e2b8e3d76fbad288631ca381fa8 Mon Sep 17 00:00:00 2001 From: Marcos Marcolin <48370677+marcosmarcolin@users.noreply.github.com> Date: Fri, 27 Oct 2023 05:15:16 -0300 Subject: [PATCH] chore: removes redundant validation of $repeat, as it is the while condition. (#12521) --- run-tests.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/run-tests.php b/run-tests.php index e12912ca4aa..9ed8816713c 100755 --- a/run-tests.php +++ b/run-tests.php @@ -398,15 +398,13 @@ function main(): void $is_switch = true; - if ($repeat) { - foreach ($cfgtypes as $type) { - if (strpos($switch, '--' . $type) === 0) { - foreach ($cfgfiles as $file) { - if ($switch == '--' . $type . '-' . $file) { - $cfg[$type][$file] = true; - $is_switch = false; - break; - } + foreach ($cfgtypes as $type) { + if (strpos($switch, '--' . $type) === 0) { + foreach ($cfgfiles as $file) { + if ($switch == '--' . $type . '-' . $file) { + $cfg[$type][$file] = true; + $is_switch = false; + break; } } }