public static function outputArray(array $array, $depth)
{
$isIndexed = array_values($array) === $array;
foreach ($array as $key => $value) {
if (is_array($value)) {
$val = '';
} else {
$val = $value;
}
if ($isIndexed) {
self::outputLine('- ' . $val, $depth * 4);
} else {
self::outputLine(sprintf('%-20s %s', $key . ':', $val), $depth * 4);
}
if (is_array($value)) {
self::outputArray($value, $depth + 1);
}
}
}