Let prettyprint do it's own thing with arguments

This commit is contained in:
filp
2013-04-12 14:07:16 +01:00
parent 8cfd27aa81
commit a802b2bec0
2 changed files with 1 additions and 14 deletions
-13
View File
@@ -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;
});
+1 -1
View File
@@ -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)): ?>