From 3d3d027ce91e7be3bdce7edf091c5fbc640e1507 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 16 Jun 2011 23:40:13 +0000 Subject: [PATCH] Minor doc fix to r84741 Remove unreachable code from WatchAction Documentation added to Init.php --- includes/GlobalFunctions.php | 2 +- includes/Init.php | 20 +++++++++++++++++--- includes/actions/WatchAction.php | 1 - 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 226350736d..4bd58090aa 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3526,7 +3526,7 @@ function wfBCP47( $code ) { /** * Get a cache object. * - * @param integer $inputType Cache type, one the the CACHE_* constants. + * @param $inputType integer Cache type, one the the CACHE_* constants. * @return BagOStuff */ function wfGetCache( $inputType ) { diff --git a/includes/Init.php b/includes/Init.php index ac55181700..de8672828f 100644 --- a/includes/Init.php +++ b/includes/Init.php @@ -70,15 +70,20 @@ class MWInit { /** * The equivalent of MWInit::interpretedPath() but for files relative to the * extensions directory. + * + * @param $file string + * @return string */ static function extInterpretedPath( $file ) { return self::getExtensionsDirectory() . '/' . $file; } /** - * The equivalent of MWInit::compiledPath() but for files relative to the + * The equivalent of MWInit::compiledPath() but for files relative to the * extensions directory. Any files referenced in this way must be registered * for compilation by including them in $wgCompiledFiles. + * @param $file string + * @return string */ static function extCompiledPath( $file ) { if ( defined( 'MW_COMPILED' ) ) { @@ -95,8 +100,10 @@ class MWInit { * * require( MWInit::extSetupPath( 'ParserFunctions/ParserFunctions.php' ) ); * - * @param $path The path relative to the extensions directory, as defined by + * @param $extRel string The path relative to the extensions directory, as defined by * $wgExtensionsDirectory. + * + * @return string */ static function extSetupPath( $extRel ) { $baseRel = "extensions/$extRel"; @@ -109,6 +116,9 @@ class MWInit { } } + /** + * @return bool|string + */ static function getExtensionsDirectory() { global $wgExtensionsDirectory, $IP; if ( $wgExtensionsDirectory === false ) { @@ -160,8 +170,12 @@ class MWInit { } /** - * Call a static method of a class with variable arguments without causing + * Call a static method of a class with variable arguments without causing * it to become volatile. + * @param $className string + * @param $methodName string + * @param $args array + * */ static function callStaticMethod( $className, $methodName, $args ) { $r = new ReflectionMethod( $className, $methodName ); diff --git a/includes/actions/WatchAction.php b/includes/actions/WatchAction.php index cce0b15e5b..94ad1cca2f 100644 --- a/includes/actions/WatchAction.php +++ b/includes/actions/WatchAction.php @@ -50,7 +50,6 @@ class WatchAction extends FormlessAction { if ( !$user->matchEditToken( $this->getRequest()->getVal( 'token' ), $salt ) ) { throw new ErrorPageError( 'sessionfailure-title', 'sessionfailure' ); - return; } return parent::checkCanExecute( $user ); -- 2.20.1