diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php b/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php
index f0c0bf256e67c1a0650a049b311dc7429cb48cdc..4ec56b1c7035427b3f6f1d6f24d53337d8d1d9e6 100644
--- a/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php
+++ b/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php
@@ -233,7 +233,7 @@ class Solr extends AbstractBase
                 'title' => $top->getTitle()
             );
             $children = $this->getChildrenJson($id, $count);
-            if(!empty($children)) {
+            if (!empty($children)) {
                 $json['children'] = $children;
             }
             if ($cacheFile) {
@@ -297,7 +297,7 @@ class Solr extends AbstractBase
                     $current->getUniqueID(),
                     $count
                 );
-                if(!empty($children)) {
+                if (!empty($children)) {
                     $childNode['children'] = $children;
                 }
             }
diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php
index f76315ec4cad43b6041426b1d1adec184a1d19cc..a3a51d0df5ed472951b657c5bff9b68cf87f6b44 100644
--- a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php
+++ b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php
@@ -167,7 +167,8 @@ class JSTree extends AbstractBase
     /**
      * Convert JSTree JSON structure to HTML
      *
-     * @param JSON $node JSON object of a the JSTree
+     * @param object $node     JSON object of a the JSTree
+     * @param string $recordID The currently active record
      *
      * @return string
      */
@@ -215,7 +216,9 @@ class JSTree extends AbstractBase
         if ($json == null) {
             return false;
         }
-        return json_encode($this->formatJSON(json_decode($json), $context, $hierarchyID));
+        return json_encode(
+            $this->formatJSON(json_decode($json), $context, $hierarchyID)
+        );
     }
 
     /**
@@ -244,7 +247,8 @@ class JSTree extends AbstractBase
         if (isset($node->children)) {
             $ret['children'] = array();
             for ($i=0;$i<count($node->children);$i++) {
-                $ret['children'][$i] = $this->formatJSON($node->children[$i], $context, $hierarchyID);
+                $ret['children'][$i] = $this
+                    ->formatJSON($node->children[$i], $context, $hierarchyID);
             }
         }
         return $ret;