From 248b74afb98740c6db59ad1cda9ab06812cf4a9f Mon Sep 17 00:00:00 2001 From: Erik Bernhardson Date: Thu, 30 Jun 2016 15:08:33 -0700 Subject: [PATCH] Fix undefined classes 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 | 2 +- includes/tidy/RaggettInternalHHVM.php | 2 +- includes/tidy/TidyDriverBase.php | 2 +- includes/utils/MWCryptHKDF.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/session/SessionProvider.php b/includes/session/SessionProvider.php index 50794d0104..4d57ad9dcb 100644 --- a/includes/session/SessionProvider.php +++ b/includes/session/SessionProvider.php @@ -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( diff --git a/includes/tidy/RaggettInternalHHVM.php b/includes/tidy/RaggettInternalHHVM.php index 2a3986dfdb..bb83d6a325 100644 --- a/includes/tidy/RaggettInternalHHVM.php +++ b/includes/tidy/RaggettInternalHHVM.php @@ -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 ) { diff --git a/includes/tidy/TidyDriverBase.php b/includes/tidy/TidyDriverBase.php index 06775ef021..96ee8c394f 100644 --- a/includes/tidy/TidyDriverBase.php +++ b/includes/tidy/TidyDriverBase.php @@ -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()" ); } /** diff --git a/includes/utils/MWCryptHKDF.php b/includes/utils/MWCryptHKDF.php index 9469c41f60..1376fa7bb9 100644 --- a/includes/utils/MWCryptHKDF.php +++ b/includes/utils/MWCryptHKDF.php @@ -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() { -- 2.20.1