@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | private $node; |
37 | 37 | |
38 | - public function __construct(GlHtmlNode $node,$level) { |
|
38 | + public function __construct(GlHtmlNode $node, $level) { |
|
39 | 39 | $this->node = $node; |
40 | 40 | $this->level = $level; |
41 | 41 | } |
@@ -234,7 +234,7 @@ |
||
234 | 234 | $body = $this->get("body")[0]; |
235 | 235 | |
236 | 236 | $summary = []; |
237 | - $callback = function (GlHtmlNode $childNode) use (&$summary) { |
|
237 | + $callback = function(GlHtmlNode $childNode) use (&$summary) { |
|
238 | 238 | $nodeName = $childNode->getName(); |
239 | 239 | |
240 | 240 | if (preg_match('/^h(\d+)$/', $nodeName, $matches)) { |
@@ -255,6 +255,10 @@ |
||
255 | 255 | return $summary; |
256 | 256 | } |
257 | 257 | |
258 | + /** |
|
259 | + * @param integer $start |
|
260 | + * @param GlHtmlSummary[] $summary |
|
261 | + */ |
|
258 | 262 | private function convertHToTree( |
259 | 263 | &$start, |
260 | 264 | $summary, |
@@ -273,9 +273,9 @@ |
||
273 | 273 | if ($nextLevel > $currentLevel) { |
274 | 274 | $start++; |
275 | 275 | $diff = $this->convertHToTree( |
276 | - $start, |
|
277 | - $summary, |
|
278 | - $summaryTree[$text]['children'] |
|
276 | + $start, |
|
277 | + $summary, |
|
278 | + $summaryTree[$text]['children'] |
|
279 | 279 | ); |
280 | 280 | if ($diff > 0) { |
281 | 281 | return $diff - 1; |