From 03e9fc938603d2eb7f8fe6b1aff139d7b689609b Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Fri, 7 Sep 2012 12:12:48 -0400
Subject: [PATCH] Eliminated more unnecessary statics.

---
 module/VuFind/src/VuFind/Search/Solr/Results.php       | 10 +++++-----
 module/VuFind/src/VuFind/Search/SolrAuth/Results.php   |  4 ++--
 .../VuFind/src/VuFind/Search/SolrReserves/Results.php  |  4 ++--
 module/VuFind/src/VuFind/Search/Summon/Results.php     |  8 ++++----
 module/VuFind/src/VuFind/Search/WorldCat/Results.php   | 10 +++++-----
 5 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/module/VuFind/src/VuFind/Search/Solr/Results.php b/module/VuFind/src/VuFind/Search/Solr/Results.php
index 06b9a0a1df0..140275657b1 100644
--- a/module/VuFind/src/VuFind/Search/Solr/Results.php
+++ b/module/VuFind/src/VuFind/Search/Solr/Results.php
@@ -134,7 +134,7 @@ class Results extends BaseResults
         // Construct record drivers for all the items in the response:
         $this->results = array();
         for ($x = 0; $x < count($this->rawResponse['response']['docs']); $x++) {
-            $this->results[] = static::initRecordDriver(
+            $this->results[] = $this->initRecordDriver(
                 $this->rawResponse['response']['docs'][$x]
             );
         }
@@ -470,7 +470,7 @@ class Results extends BaseResults
                 'Record ' . $id . ' does not exist.'
             );
         }
-        return static::initRecordDriver($record);
+        return $this->initRecordDriver($record);
     }
 
     /**
@@ -519,7 +519,7 @@ class Results extends BaseResults
         $rawResponse = $solr->getMoreLikeThis($id, $extras);
         $results = array();
         for ($x = 0; $x < count($rawResponse['response']['docs']); $x++) {
-            $results[] = static::initRecordDriver(
+            $results[] = $this->initRecordDriver(
                 $rawResponse['response']['docs'][$x]
             );
         }
@@ -527,14 +527,14 @@ class Results extends BaseResults
     }
 
     /**
-     * Support method for _performSearch(): given an array of Solr response data,
+     * Support method for performSearch(): given an array of Solr response data,
      * construct an appropriate record driver object.
      *
      * @param array $data Solr data
      *
      * @return \VuFind\RecordDriver\Base
      */
-    protected static function initRecordDriver($data)
+    protected function initRecordDriver($data)
     {
         // Remember bad classes to prevent unnecessary file accesses.
         static $badClasses = array();
diff --git a/module/VuFind/src/VuFind/Search/SolrAuth/Results.php b/module/VuFind/src/VuFind/Search/SolrAuth/Results.php
index c27ffc2073a..9a3c5bad9af 100644
--- a/module/VuFind/src/VuFind/Search/SolrAuth/Results.php
+++ b/module/VuFind/src/VuFind/Search/SolrAuth/Results.php
@@ -67,14 +67,14 @@ class Results extends SolrResults
     }
 
     /**
-     * Support method for _performSearch(): given an array of Solr response data,
+     * Support method for performSearch(): given an array of Solr response data,
      * construct an appropriate record driver object.
      *
      * @param array $data Solr data
      *
      * @return \VuFind\RecordDriver\AbstractBase
      */
-    protected static function initRecordDriver($data)
+    protected function initRecordDriver($data)
     {
         $driver = new \VuFind\RecordDriver\SolrAuth();
         $driver->setRawData($data);
diff --git a/module/VuFind/src/VuFind/Search/SolrReserves/Results.php b/module/VuFind/src/VuFind/Search/SolrReserves/Results.php
index f4115e5c802..b84b487999b 100644
--- a/module/VuFind/src/VuFind/Search/SolrReserves/Results.php
+++ b/module/VuFind/src/VuFind/Search/SolrReserves/Results.php
@@ -56,14 +56,14 @@ class Results extends \VuFind\Search\Solr\Results
     }
 
     /**
-     * Support method for _performSearch(): given an array of Solr response data,
+     * Support method for performSearch(): given an array of Solr response data,
      * construct an appropriate record driver object.
      *
      * @param array $data Solr data
      *
      * @return \VuFind\RecordDriver\Base
      */
-    protected static function initRecordDriver($data)
+    protected function initRecordDriver($data)
     {
         $driver = new \VuFind\RecordDriver\SolrReserves();
         $driver->setRawData($data);
diff --git a/module/VuFind/src/VuFind/Search/Summon/Results.php b/module/VuFind/src/VuFind/Search/Summon/Results.php
index 475de19a996..d8cef08d7ae 100644
--- a/module/VuFind/src/VuFind/Search/Summon/Results.php
+++ b/module/VuFind/src/VuFind/Search/Summon/Results.php
@@ -124,7 +124,7 @@ class Results extends BaseResults
         // Construct record drivers for all the items in the response:
         $this->results = array();
         foreach ($this->rawResponse['documents'] as $current) {
-            $this->results[] = self::initRecordDriver($current);
+            $this->results[] = $this->initRecordDriver($current);
         }
     }
 
@@ -145,18 +145,18 @@ class Results extends BaseResults
                 'Record ' . $id . ' does not exist.'
             );
         }
-        return static::initRecordDriver($record['documents'][0]);
+        return $this->initRecordDriver($record['documents'][0]);
     }
 
     /**
-     * Support method for _performSearch(): given an array of Solr response data,
+     * Support method for performSearch(): given an array of Summon response data,
      * construct an appropriate record driver object.
      *
      * @param array $data Raw record data
      *
      * @return \VuFind\RecordDriver\Base
      */
-    protected static function initRecordDriver($data)
+    protected function initRecordDriver($data)
     {
         $driver = new \VuFind\RecordDriver\Summon();
         $driver->setRawData($data);
diff --git a/module/VuFind/src/VuFind/Search/WorldCat/Results.php b/module/VuFind/src/VuFind/Search/WorldCat/Results.php
index 3bc637c3efc..a3890f10664 100644
--- a/module/VuFind/src/VuFind/Search/WorldCat/Results.php
+++ b/module/VuFind/src/VuFind/Search/WorldCat/Results.php
@@ -90,7 +90,7 @@ class Results extends BaseResults
             && count($this->rawResponse->records->record) > 0
         ) {
             foreach ($this->rawResponse->records->record as $current) {
-                $this->results[] = static::initRecordDriver(
+                $this->results[] = $this->initRecordDriver(
                     $current->recordData->record->asXML()
                 );
             }
@@ -114,18 +114,18 @@ class Results extends BaseResults
                 'Record ' . $id . ' does not exist.'
             );
         }
-        return static::initRecordDriver($record);
+        return $this->initRecordDriver($record);
     }
 
     /**
-     * Support method for _performSearch(): given an array of Solr response data,
+     * Support method for performSearch(): given a WorldCat MARC record,
      * construct an appropriate record driver object.
      *
-     * @param array $data Raw record data
+     * @param string $data Raw record data
      *
      * @return \VuFind\RecordDriver\Base
      */
-    protected static function initRecordDriver($data)
+    protected function initRecordDriver($data)
     {
         $driver = new \VuFind\RecordDriver\WorldCat();
         $driver->setRawData($data);
-- 
GitLab