summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2016-02-26 20:19:31 +0100
committerAndreas Gohr <andi@splitbrain.org>2016-02-26 20:19:31 +0100
commit2b9b5e0b67e7fc4f7bd4aa41f524038db203db7c (patch)
treebca5e00c75446e87172dcfdb7f179ea15dd43edd
parent9ce1900762f393ccbff0976ee1c7f095cd6938ad (diff)
downloadxdebug-trace-tree-2b9b5e0b67e7fc4f7bd4aa41f524038db203db7c.zip
xdebug-trace-tree-2b9b5e0b67e7fc4f7bd4aa41f524038db203db7c.tar.gz
xdebug-trace-tree-2b9b5e0b67e7fc4f7bd4aa41f524038db203db7c.tar.bz2
close dangling diffs
-rw-r--r--XDebugParser.php9
-rw-r--r--index.php2
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;
diff --git a/index.php b/index.php
index 29a6d6d..387d0a3 100644
--- a/index.php
+++ b/index.php
@@ -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>