From fba157340c77031185f17f2e1bf03c2bb81c107c Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 23 Jan 2015 09:41:16 -0500 Subject: [PATCH] Style fixes. --- .../src/VuFind/Hierarchy/TreeDataSource/Solr.php | 4 ++-- .../src/VuFind/Hierarchy/TreeRenderer/JSTree.php | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php b/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php index f0c0bf256e6..4ec56b1c703 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 f76315ec4ca..a3a51d0df5e 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; -- GitLab