From bbdb64cd4750605cdcfd871c98b11845df5b1741 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 3 Oct 2025 17:29:18 +0700 Subject: [PATCH 1/2] refactor: apply code quality level 41 for Rector --- rector.php | 2 +- system/CLI/CLI.php | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/rector.php b/rector.php index d8af415767df..b5c0cc63b29b 100644 --- a/rector.php +++ b/rector.php @@ -202,4 +202,4 @@ // keep '\\' prefix string on string '\Foo\Bar' StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true, ]) - ->withCodeQualityLevel(40); + ->withCodeQualityLevel(41); diff --git a/system/CLI/CLI.php b/system/CLI/CLI.php index b8ea4714f39b..f05b29dda856 100644 --- a/system/CLI/CLI.php +++ b/system/CLI/CLI.php @@ -318,11 +318,7 @@ public static function promptByMultipleKeys(string $text, array $options): array if ($opts === []) { $extraOutput = $extraOutputDefault; } else { - $optsKey = []; - - foreach (array_keys($opts) as $key) { - $optsKey[] = $key; - } + $optsKey = array_keys($opts); $extraOutput = '[' . $extraOutputDefault . ', ' . implode(', ', $optsKey) . ']'; $extraOutput = 'You can specify multiple values separated by commas.' . PHP_EOL . $extraOutput; } From a433d03b18cc2ec0aad47c470da9b0dec06eb15f Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 3 Oct 2025 17:31:49 +0700 Subject: [PATCH 2/2] refactor: cs fix --- system/CLI/CLI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/CLI/CLI.php b/system/CLI/CLI.php index f05b29dda856..b7c9ed64e2de 100644 --- a/system/CLI/CLI.php +++ b/system/CLI/CLI.php @@ -318,7 +318,7 @@ public static function promptByMultipleKeys(string $text, array $options): array if ($opts === []) { $extraOutput = $extraOutputDefault; } else { - $optsKey = array_keys($opts); + $optsKey = array_keys($opts); $extraOutput = '[' . $extraOutputDefault . ', ' . implode(', ', $optsKey) . ']'; $extraOutput = 'You can specify multiple values separated by commas.' . PHP_EOL . $extraOutput; }