summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-11-30 23:34:25 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2019-11-30 23:44:07 +0100
commit932988923547b86c879268fab894f3df85e9e2ea (patch)
treec5b59d21293880dcb3400ba174cc3f241d1cf2ba /src
parentcd794fa5e8c4d41091fed64b128911edfe72f61f (diff)
Fixed LegacyDevelopment Exception handler to produce less verbose output
Diffstat (limited to 'src')
-rw-r--r--src/Exceptions/Handlers/LegacyDevelopment.php26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/Exceptions/Handlers/LegacyDevelopment.php b/src/Exceptions/Handlers/LegacyDevelopment.php
index d6a11949..34c52571 100644
--- a/src/Exceptions/Handlers/LegacyDevelopment.php
+++ b/src/Exceptions/Handlers/LegacyDevelopment.php
@@ -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,
];
}