Fix undefined classes
authorErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 30 Jun 2016 22:08:33 +0000 (15:08 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 30 Jun 2016 22:08:35 +0000 (15:08 -0700)
Applying static analysis to mediawiki core found a short list of classes
that were undefined. Fix those up.

Change-Id: Ib7f9dbd847ada287b35afb799782fc04a3b39ce4

includes/session/SessionProvider.php
includes/tidy/RaggettInternalHHVM.php
includes/tidy/TidyDriverBase.php
includes/utils/MWCryptHKDF.php

index 50794d0..4d57ad9 100644 (file)
@@ -456,7 +456,7 @@ abstract class SessionProvider implements SessionProviderInterface, LoggerAwareI
         * @warning This will be called early during MediaWiki startup. Do not
         *  use $wgUser, $wgLang, $wgOut, $wgParser, or their equivalents via
         *  RequestContext from this method!
-        * @return Message
+        * @return \Message
         */
        protected function describeMessage() {
                return wfMessage(
index 2a3986d..bb83d6a 100644 (file)
@@ -14,7 +14,7 @@ class RaggettInternalHHVM extends RaggettBase {
         */
        protected function cleanWrapped( $text, $stderr = false, &$retval = null ) {
                if ( $stderr ) {
-                       throw new Exception( "\$stderr cannot be used with RaggettInternalHHVM" );
+                       throw new \Exception( "\$stderr cannot be used with RaggettInternalHHVM" );
                }
                $cleansource = tidy_repair_string( $text, $this->config['tidyConfigFile'], 'utf8' );
                if ( $cleansource === false ) {
index 06775ef..96ee8c3 100644 (file)
@@ -27,7 +27,7 @@ abstract class TidyDriverBase {
         * @return bool Whether the HTML is valid
         */
        public function validate( $text, &$errorStr ) {
-               throw new MWException( get_class( $this ) . " does not support validate()" );
+               throw new \MWException( get_class( $this ) . " does not support validate()" );
        }
 
        /**
index 9469c41..1376fa7 100644 (file)
@@ -156,7 +156,7 @@ class MWCryptHKDF {
 
        /**
         * Return a singleton instance, based on the global configs.
-        * @return HKDF
+        * @return self
         * @throws MWException
         */
        protected static function singleton() {