Skip to content

Commit

Permalink
Style improvement on dumps. Nested array shouldn't be spaced, only di…
Browse files Browse the repository at this point in the history
…rect values.
  • Loading branch information
hpolthof committed Sep 18, 2015
1 parent f024e6c commit 3b87b9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Console/Commands/DumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 3b87b9d

Please sign in to comment.