summaryrefslogtreecommitdiff
path: root/src/Exceptions/Handlers/LegacyDevelopment.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Exceptions/Handlers/LegacyDevelopment.php')
-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,
];
}