http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90053

Revision: 90053
Author:   ialex
Date:     2011-06-14 15:08:52 +0000 (Tue, 14 Jun 2011)
Log Message:
-----------
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
    trunk/phase3/maintenance/preprocessorFuzzTest.php

Modified: trunk/phase3/includes/parser/Parser.php
===================================================================
--- trunk/phase3/includes/parser/Parser.php     2011-06-14 14:57:18 UTC (rev 
90052)
+++ trunk/phase3/includes/parser/Parser.php     2011-06-14 15:08:52 UTC (rev 
90053)
@@ -5463,7 +5463,7 @@
         *
         * @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 @@
                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 );
        }
 

Modified: trunk/phase3/maintenance/preprocessorFuzzTest.php
===================================================================
--- trunk/phase3/maintenance/preprocessorFuzzTest.php   2011-06-14 14:57:18 UTC 
(rev 90052)
+++ trunk/phase3/maintenance/preprocessorFuzzTest.php   2011-06-14 15:08:52 UTC 
(rev 90053)
@@ -227,12 +227,12 @@
        }
 
        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 );
                }
        }
 }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to