Fixed LegacyDevelopment Exception handler to produce less verbose output

This commit is contained in:
Igor Scheller 2019-11-30 23:34:25 +01:00
parent cd794fa5e8
commit 9329889235
1 changed files with 25 additions and 1 deletions

View File

@ -50,9 +50,33 @@ class LegacyDevelopment extends Legacy
$functionName = $trace['function'];
$args = [];
foreach (($trace['args'] ?? []) as $arg) {
// @codeCoverageIgnoreStart
switch (gettype($arg)) {
case 'string':
case 'integer':
case 'double':
$args[] = $arg;
break;
case 'boolean':
$args[] = $arg ? 'true' : 'false';
break;
case 'object':
$args[] = get_class($arg);
break;
case 'resource':
$args[] = get_resource_type($arg);
break;
default:
$args[] = gettype($arg);
// @codeCoverageIgnoreEnd
}
}
$return[] = [
'file' => $path . ':' . $line,
$functionName => $trace['args'] ?? null,
$functionName => $args ?? null,
];
}