Skip to content

Commit

Permalink
Clean up some logic for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
scottchiefbaker committed Aug 1, 2022
1 parent 1dfc2be commit d3c0831
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions class.krumo.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,12 @@ public static function dump($data, $second = '')
$_ = debug_backtrace();
while ($d = array_pop($_)) {
$callback = static::$lineNumberTestCallback;
$class = strtolower($d['class'] ?? '');
$function = strtolower($d['function'] ?? '');
if (in_array($function, array('krumo','k','kd')) || $class == 'krumo' || (is_callable($callback) && call_user_func($callback, $d))) {

$class = strtolower($d['class'] ?? '');
$function = strtolower($d['function'] ?? '');
$is_krumo_func = in_array($function, array('krumo','k','kd'));

if ($is_krumo_func || $class == 'krumo' || (is_callable($callback) && call_user_func($callback, $d))) {
break;
}
}
Expand Down

0 comments on commit d3c0831

Please sign in to comment.