SearchResultSet: remove hasResults(), unused
authorChad Horohoe <chadh@wikimedia.org>
Fri, 20 Jun 2014 14:24:09 +0000 (07:24 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Fri, 20 Jun 2014 14:24:09 +0000 (07:24 -0700)
SolrStore, MWSearch and CirrusSearch all implement this and are
now free to drop their implementations.

Change-Id: Ia04bd3fc8526c35c3c9590c7fe4e2db2bc120283

includes/search/SearchResultSet.php

index f753e3d..f430dd0 100644 (file)
@@ -40,16 +40,6 @@ class SearchResultSet {
                return 0;
        }
 
-       /**
-        * Return true if results are included in this result set.
-        * STUB
-        *
-        * @return bool
-        */
-       function hasResults() {
-               return false;
-       }
-
        /**
         * Some search modes return a total hit count for the query
         * in the entire article database. This may include pages
@@ -200,12 +190,8 @@ class SearchNearMatchResultSet extends SearchResultSet {
                $this->result = $match;
        }
 
-       public function hasResult() {
-               return (bool)$this->result;
-       }
-
        public function numRows() {
-               return $this->hasResults() ? 1 : 0;
+               return $this->result ? 1 : 0;
        }
 
        public function next() {