Merge "linting: Start enforcing a basic CSS class naming rule (with lots of opt-outs)"
[lhc/web/wiklou.git] / includes / search / SearchEngine.php
index a0100ca..a3a8abe 100644 (file)
@@ -56,16 +56,16 @@ abstract class SearchEngine {
        /** @var array Feature values */
        protected $features = [];
 
-       /** @const string profile type for completionSearch */
+       /** Profile type for completionSearch */
        const COMPLETION_PROFILE_TYPE = 'completionSearchProfile';
 
-       /** @const string profile type for query independent ranking features */
+       /** Profile type for query independent ranking features */
        const FT_QUERY_INDEP_PROFILE_TYPE = 'fulltextQueryIndepProfile';
 
-       /** @const int flag for legalSearchChars: includes all chars allowed in a search query */
+       /** Integer flag for legalSearchChars: includes all chars allowed in a search query */
        const CHARS_ALL = 1;
 
-       /** @const int flag for legalSearchChars: includes all chars allowed in a search term */
+       /** Integer flag for legalSearchChars: includes all chars allowed in a search term */
        const CHARS_NO_SYNTAX = 2;
 
        /**
@@ -279,26 +279,13 @@ abstract class SearchEngine {
                return static::defaultNearMatcher()->getNearMatch( $searchterm );
        }
 
-       /**
-        * Do a near match (see SearchEngine::getNearMatch) and wrap it into a
-        * SearchResultSet.
-        * @deprecated since 1.27; Use SearchEngine::getNearMatcher()
-        * @param string $searchterm
-        * @return SearchResultSet
-        */
-       public static function getNearMatchResultSet( $searchterm ) {
-               wfDeprecated( __METHOD__, '1.27' );
-               return static::defaultNearMatcher()->getNearMatchResultSet( $searchterm );
-       }
-
        /**
         * Get chars legal for search
-        * NOTE: usage as static is deprecated and preserved only as BC measure
         * @param int $type type of search chars (see self::CHARS_ALL
         * and self::CHARS_NO_SYNTAX). Defaults to CHARS_ALL
         * @return string
         */
-       public static function legalSearchChars( $type = self::CHARS_ALL ) {
+       public function legalSearchChars( $type = self::CHARS_ALL ) {
                return "A-Za-z_'.0-9\\x80-\\xFF\\-";
        }
 
@@ -906,13 +893,3 @@ abstract class SearchEngine {
                }
        }
 }
-
-/**
- * Dummy class to be used when non-supported Database engine is present.
- * @todo FIXME: Dummy class should probably try something at least mildly useful,
- * such as a LIKE search through titles.
- * @ingroup Search
- */
-class SearchEngineDummy extends SearchEngine {
-       // no-op
-}