Skip to content

Commit

Permalink
upsome for format code
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jan 28, 2021
1 parent d8dbb5f commit ffa2ea1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Util/FormatUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Inhere\Console\Util;

use Toolkit\Cli\ColorTag;
use Toolkit\Stdlib\Helper\JsonHelper;
use Toolkit\Sys\Sys;
use function array_keys;
use function array_merge;
Expand Down Expand Up @@ -279,12 +280,11 @@ public static function spliceKeyValue(array $data, array $opts = []): string
if (is_array($value)) {
$temp = '[';

/** @var array $value */
foreach ($value as $k => $val) {
if (is_bool($val)) {
$val = $val ? '(True)' : '(False)';
} else {
$val = is_scalar($val) ? (string)$val : gettype($val);
$val = is_scalar($val) ? (string)$val : JsonHelper::unescaped($val);
}

$temp .= (!is_numeric($k) ? "$k: " : '') . "$val, ";
Expand Down

0 comments on commit ffa2ea1

Please sign in to comment.