From 0317245d4d41dec0a13ec085e2a2d2317b1ca272 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Mon, 16 Oct 2023 12:48:20 +0700 Subject: [PATCH] run rector --- system/CLI/CLI.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/CLI/CLI.php b/system/CLI/CLI.php index f5e3d20e453e..50a846a25e05 100644 --- a/system/CLI/CLI.php +++ b/system/CLI/CLI.php @@ -267,7 +267,7 @@ public static function prompt(string $field, $options = null, $validation = null // Read the input from keyboard. $input = trim(static::input()) ?: $default; - if ($validation) { + if ($validation !== []) { while (! static::validate('"' . trim($field) . '"', $input, $validation)) { $input = static::prompt($field, $options, $validation); } @@ -1088,7 +1088,7 @@ public static function table(array $tbody, array $thead = []) foreach ($tableRows[$row] as $col) { $diff = $maxColsLengths[$column] - static::strlen($col); - if ($diff) { + if ($diff !== 0) { $tableRows[$row][$column] .= str_repeat(' ', $diff); }