diff options
author | Andreas Gohr <andi@splitbrain.org> | 2016-02-26 20:19:31 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2016-02-26 20:19:31 +0100 |
commit | 2b9b5e0b67e7fc4f7bd4aa41f524038db203db7c (patch) | |
tree | bca5e00c75446e87172dcfdb7f179ea15dd43edd | |
parent | 9ce1900762f393ccbff0976ee1c7f095cd6938ad (diff) | |
download | xdebug-trace-tree-2b9b5e0b67e7fc4f7bd4aa41f524038db203db7c.zip xdebug-trace-tree-2b9b5e0b67e7fc4f7bd4aa41f524038db203db7c.tar.gz xdebug-trace-tree-2b9b5e0b67e7fc4f7bd4aa41f524038db203db7c.tar.bz2 |
close dangling diffs
-rw-r--r-- | XDebugParser.php | 9 | ||||
-rw-r--r-- | index.php | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/XDebugParser.php b/XDebugParser.php index 94e809f..3cf2616 100644 --- a/XDebugParser.php +++ b/XDebugParser.php @@ -55,7 +55,7 @@ class XDebugParser $this->functions[$funcNr]['internal'] = !(bool) $parts[6]; $this->functions[$funcNr]['file'] = $parts[8]; $this->functions[$funcNr]['line'] = $parts[9]; - if($parts[7]) { + if ($parts[7]) { $this->functions[$funcNr]['params'] = array($parts[7]); } else { $this->functions[$funcNr]['params'] = array_slice($parts, 11); @@ -98,7 +98,6 @@ class XDebugParser echo '</div>'; echo '</div>'; - $level = 0; foreach ($this->functions as $func) { // depth wrapper @@ -137,6 +136,12 @@ class XDebugParser echo '</div>'; } + if ($level > 0) { + for ($i = 0; $i < $level; $i++) { + echo '</div>'; + } + } + $html = ob_get_contents(); ob_end_clean(); return $html; @@ -1,5 +1,7 @@ +<!doctype html> <html> <head> + <title>XDebug Trace Tree</title> <link rel="stylesheet" href="style.css"> <script src="https://code.jquery.com/jquery-2.2.1.min.js"></script> <script src="script.js"></script> |