diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php
index b7e52d2878459cdabafd92d18d40e155d22ce15f..6f4e75d1baa4ae45c26732bc1669e308b6352bb3 100644
--- a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php
+++ b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/JSTree.php
@@ -87,7 +87,6 @@ class JSTree extends AbstractBase
     public function getTreeList($hierarchyID = false)
     {
         $record = $this->getRecordDriver();
-        $id = $record->getUniqueID();
         $inHierarchies = $record->getHierarchyTopID();
         $inHierarchiesTitle = $record->getHierarchyTopTitle();
 
diff --git a/module/VuFind/src/VuFind/RecordDriver/Pazpar2.php b/module/VuFind/src/VuFind/RecordDriver/Pazpar2.php
index b2c6f489c2e65c2e2744079cd88013f22b4d61a0..d65d17df341c48d3a736836d632eecc73d1927cf 100644
--- a/module/VuFind/src/VuFind/RecordDriver/Pazpar2.php
+++ b/module/VuFind/src/VuFind/RecordDriver/Pazpar2.php
@@ -152,22 +152,21 @@ class Pazpar2 extends SolrDefault
      */
     public function getProviders()
     {
-        if ($this->pz2fields['location']) {
-            if (isset($this->pz2fields['location']['_attr_'])) {
-                return array($this->pz2fields['location']['_attr_']['name']);
-            } else {
-                $providers = array();
-                foreach ($this->pz2fields['location'] as $i=>$location) {
-                    if ( isset($location['_attr_']['name'])
-                        && !in_array($location['_attr_']['name'], $providers)
-                    ) {
-                        $providers[] = $location['_attr_']['name'];
-                    }
-                }
-                return $providers;
+        if (!$this->pz2fields['location']) {
+            return array();
+        }
+        if (isset($this->pz2fields['location']['_attr_'])) {
+            return array($this->pz2fields['location']['_attr_']['name']);
+        }
+        $providers = array();
+        foreach ($this->pz2fields['location'] as $location) {
+            if (isset($location['_attr_']['name'])
+                && !in_array($location['_attr_']['name'], $providers)
+            ) {
+                $providers[] = $location['_attr_']['name'];
             }
         }
-        return array();
+        return $providers;
     }
 
     /**
diff --git a/module/VuFind/src/VuFind/XSLT/Importer.php b/module/VuFind/src/VuFind/XSLT/Importer.php
index 756f61c717a6ce54c3193e9e6b6ee21c598ab3ee..3a2e437f16ebd6cab2ef146425ba4923c10ee1d5 100644
--- a/module/VuFind/src/VuFind/XSLT/Importer.php
+++ b/module/VuFind/src/VuFind/XSLT/Importer.php
@@ -70,7 +70,7 @@ class Importer implements ServiceLocatorAwareInterface
         // Save the results (or just display them, if in test mode):
         if (!$testMode) {
             $solr = $this->getServiceLocator()->get('VuFind\Solr\Writer');
-            $result = $solr->save($index, new RawXMLDocument($xml));
+            $solr->save($index, new RawXMLDocument($xml));
         } else {
             Console::write($xml . "\n");
         }
diff --git a/module/VuFindHttp/src/VuFindHttp/HttpService.php b/module/VuFindHttp/src/VuFindHttp/HttpService.php
index ce027a100a7c74454c68a6284723df76524ef1d1..b3f029fd7977fe83c9af34b03c961cfa3f1fc296 100644
--- a/module/VuFindHttp/src/VuFindHttp/HttpService.php
+++ b/module/VuFindHttp/src/VuFindHttp/HttpService.php
@@ -264,7 +264,7 @@ class HttpService implements HttpServiceInterface
      */
     public static function isAssocParams(array $array)
     {
-        foreach ($array as $key => $value) {
+        foreach (array_keys($array) as $key) {
             if (!is_numeric($key)) {
                 return true;
             }