r90053 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90052‎ | r90053 | r90054 >
Date:15:08, 14 June 2011
Author:ialex
Status:ok
Tags:
Comment:
Per Nikerabbit, fixes for r89176:
* correct variable name in preprocessorFuzzTest.php
* Added type hints in Parser's test methods
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/maintenance/preprocessorFuzzTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/preprocessorFuzzTest.php
@@ -227,12 +227,12 @@
228228 }
229229
230230 function getOption( $oname, $defaultOverride = null, $ignoreHidden = false ) {
231 - if ( $option === 'fancysig' ) {
 231+ if ( $oname === 'fancysig' ) {
232232 return $this->ppfz_test->fancySig;
233 - } elseif ( $option === 'nickname' ) {
 233+ } elseif ( $oname === 'nickname' ) {
234234 return $this->ppfz_test->nickname;
235235 } else {
236 - return parent::getOption( $option, $defaultOverride, $ignoreHidden );
 236+ return parent::getOption( $oname, $defaultOverride, $ignoreHidden );
237237 }
238238 }
239239 }
Index: trunk/phase3/includes/parser/Parser.php
@@ -5463,7 +5463,7 @@
54645464 *
54655465 * @return string
54665466 */
5467 - function testSrvus( $text, $title, ParserOptions $options, $outputType = self::OT_HTML ) {
 5467+ function testSrvus( $text, Title $title, ParserOptions $options, $outputType = self::OT_HTML ) {
54685468 $this->startParse( $title, $options, $outputType, true );
54695469
54705470 $text = $this->replaceVariables( $text );
@@ -5472,11 +5472,11 @@
54735473 return $text;
54745474 }
54755475
5476 - function testPst( $text, $title, $options ) {
 5476+ function testPst( $text, Title $title, ParserOptions $options ) {
54775477 return $this->preSaveTransform( $text, $title, $options->getUser(), $options );
54785478 }
54795479
5480 - function testPreprocess( $text, $title, $options ) {
 5480+ function testPreprocess( $text, Title $title, ParserOptions $options ) {
54815481 return $this->testSrvus( $text, $title, $options, self::OT_PREPROCESS );
54825482 }
54835483

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89176* make preprocessorFuzzTest.php pass the Title object to Parser, removed chec...ialex16:10, 30 May 2011

Status & tagging log