From 3b87b9d747c470b5910d190ba94bab8d5563c216 Mon Sep 17 00:00:00 2001 From: Paul Olthof Date: Fri, 18 Sep 2015 09:12:01 +0200 Subject: [PATCH] Style improvement on dumps. Nested array shouldn't be spaced, only direct values. --- src/Console/Commands/DumpCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Console/Commands/DumpCommand.php b/src/Console/Commands/DumpCommand.php index 41e035d..be63aad 100644 --- a/src/Console/Commands/DumpCommand.php +++ b/src/Console/Commands/DumpCommand.php @@ -148,11 +148,11 @@ private function getArrayText($arr, $ident_size = 4, $level = 0) $filler = str_repeat(' ', $max_key_length - strlen($key)); - $result .= $ident.str_repeat(' ', $ident_size)."'{$key}'{$filler} => "; - if(is_array($value)) { + $result .= $ident.str_repeat(' ', $ident_size)."'{$key}' => "; $result .= $this->getArrayText($value, $ident_size, $level+1); } else { + $result .= $ident.str_repeat(' ', $ident_size)."'{$key}'{$filler} => "; $result .= var_export($value, true); } $result .= ",\n";