]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/PageIncludeParser.php
respective book and chapter structure added.
[bookstack] / app / Entities / Tools / PageIncludeParser.php
index f1fbfba03278c8ad1d2589986284bcf2bb5b0913..dad7c29e60ee3392de7b6d56726fee5455074eb5 100644 (file)
@@ -72,8 +72,8 @@ class PageIncludeParser
         $includeTags = [];
 
         /** @var DOMNode $node */
-        /** @var DOMNode $childNode */
         foreach ($includeHosts as $node) {
+            /** @var DOMNode $childNode */
             foreach ($node->childNodes as $childNode) {
                 if ($childNode->nodeName === '#text') {
                     array_push($includeTags, ...$this->splitTextNodesAtTags($childNode));
@@ -174,8 +174,8 @@ class PageIncludeParser
         $parentNode->parentNode->insertBefore($parentClone, $parentNode);
         $parentClone->removeAttribute('id');
 
-        /** @var DOMNode $child */
         for ($i = 0; $i < $splitPos; $i++) {
+            /** @var DOMNode $child */
             $child = $children[$i];
             $parentClone->appendChild($child);
         }