From e9763263437d0bc467890422f87442f4af863863 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 14 Jun 2011 15:08:52 +0000 Subject: [PATCH] Per Nikerabbit, fixes for r89176: * correct variable name in preprocessorFuzzTest.php * Added type hints in Parser's test methods --- includes/parser/Parser.php | 6 +++--- maintenance/preprocessorFuzzTest.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index ff0d9361be..94a6de59fb 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -5463,7 +5463,7 @@ class Parser { * * @return string */ - function testSrvus( $text, $title, ParserOptions $options, $outputType = self::OT_HTML ) { + function testSrvus( $text, Title $title, ParserOptions $options, $outputType = self::OT_HTML ) { $this->startParse( $title, $options, $outputType, true ); $text = $this->replaceVariables( $text ); @@ -5472,11 +5472,11 @@ class Parser { return $text; } - function testPst( $text, $title, $options ) { + function testPst( $text, Title $title, ParserOptions $options ) { return $this->preSaveTransform( $text, $title, $options->getUser(), $options ); } - function testPreprocess( $text, $title, $options ) { + function testPreprocess( $text, Title $title, ParserOptions $options ) { return $this->testSrvus( $text, $title, $options, self::OT_PREPROCESS ); } diff --git a/maintenance/preprocessorFuzzTest.php b/maintenance/preprocessorFuzzTest.php index 4b9d666f1c..55ca8e388e 100644 --- a/maintenance/preprocessorFuzzTest.php +++ b/maintenance/preprocessorFuzzTest.php @@ -227,12 +227,12 @@ class PPFuzzUser extends User { } function getOption( $oname, $defaultOverride = null, $ignoreHidden = false ) { - if ( $option === 'fancysig' ) { + if ( $oname === 'fancysig' ) { return $this->ppfz_test->fancySig; - } elseif ( $option === 'nickname' ) { + } elseif ( $oname === 'nickname' ) { return $this->ppfz_test->nickname; } else { - return parent::getOption( $option, $defaultOverride, $ignoreHidden ); + return parent::getOption( $oname, $defaultOverride, $ignoreHidden ); } } } -- 2.20.1