mirror of
https://github.com/filp/whoops.git
synced 2026-09-11 18:26:22 +00:00
Let prettyprint do it's own thing with arguments
This commit is contained in:
@@ -118,19 +118,6 @@ class PrettyPageHandler extends Handler
|
||||
$_ : (substr($_, 0, $max - 1) . '...');
|
||||
};
|
||||
|
||||
// $type -> translate gettype to valid prettyprint class names
|
||||
$type = function($_) {
|
||||
static $map = array(
|
||||
'string' => 'str',
|
||||
'boolean' => 'kwd',
|
||||
'object' => 'typ'
|
||||
);
|
||||
|
||||
return isset($map[$_]) ? $map[$_] : $_;
|
||||
};
|
||||
|
||||
// $trim ->
|
||||
|
||||
require $templateFile;
|
||||
});
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
<?php foreach($args as $argN => $arg): ?>
|
||||
<li class="argument">
|
||||
<span class="argument-n"><?php echo $argN ?></span>
|
||||
<code class="prettyprint <?php echo $type(gettype($arg)) ?>">
|
||||
<code class="prettyprint <?php echo gettype($arg) ?>">
|
||||
<?php if(is_string($arg)): ?>
|
||||
"<?php echo $e($clamp($arg)) ?>"
|
||||
<?php elseif(is_object($arg)): ?>
|
||||
|
||||
Reference in New Issue
Block a user