r70534 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70533‎ | r70534 | r70535 >
Date:00:46, 6 August 2010
Author:mah
Status:ok
Tags:
Comment:
ws cleanups
Modified paths:
  • /trunk/phase3/maintenance/parserTests.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.inc
@@ -117,7 +117,7 @@
118118 public function setupRecorder ( $options ) {
119119 if ( isset( $options['record'] ) ) {
120120 $this->recorder = new DbTestRecorder( $this );
121 - $this->recorder->version = isset( $options['setversion'] ) ?
 121+ $this->recorder->version = isset( $options['setversion'] ) ?
122122 $options['setversion'] : SpecialVersion::getVersion();
123123 } elseif ( isset( $options['compare'] ) ) {
124124 $this->recorder = new DbTestPreviewer( $this );
@@ -1015,7 +1015,7 @@
10161016 return preg_replace(
10171017 array( '/^(-.*)$/m', '/^(\+.*)$/m' ),
10181018 array( $this->term->color( 34 ) . '$1' . $this->term->reset(),
1019 - $this->term->color( 31 ) . '$1' . $this->term->reset() ),
 1019+ $this->term->color( 31 ) . '$1' . $this->term->reset() ),
10201020 $text );
10211021 }
10221022
@@ -1376,8 +1376,8 @@
13771377 array( 'tr_id' => $changedRun ),
13781378 __METHOD__ );
13791379 return "First recorded appearance: "
1380 - . date( "d-M-Y H:i:s", strtotime ( $appear->tr_date ) )
1381 - . ", " . $appear->tr_mw_version;
 1380+ . date( "d-M-Y H:i:s", strtotime ( $appear->tr_date ) )
 1381+ . ", " . $appear->tr_mw_version;
13821382 }
13831383
13841384 // Otherwise, this test has previous recorded results.
@@ -1582,11 +1582,11 @@
15831583 }
15841584
15851585 class TestFileIterator implements Iterator {
1586 - private $file;
1587 - private $fh;
1588 - private $parser;
1589 - private $index = 0;
1590 - private $test;
 1586+ private $file;
 1587+ private $fh;
 1588+ private $parser;
 1589+ private $index = 0;
 1590+ private $test;
15911591 private $lineNum;
15921592 private $eof;
15931593
@@ -1594,8 +1594,8 @@
15951595 global $IP;
15961596
15971597 $this->file = $file;
1598 - $this->fh = fopen( $this->file, "rt" );
1599 - if ( !$this->fh ) {
 1598+ $this->fh = fopen( $this->file, "rt" );
 1599+ if ( !$this->fh ) {
16001600 wfDie( "Couldn't open file '$file'\n" );
16011601 }
16021602
@@ -1619,28 +1619,28 @@
16201620 $this->next();
16211621
16221622 return true;
1623 - }
 1623+ }
16241624
1625 - function current() {
 1625+ function current() {
16261626 return $this->test;
1627 - }
 1627+ }
16281628
1629 - function key() {
 1629+ function key() {
16301630 return $this->index;
1631 - }
 1631+ }
16321632
1633 - function next() {
1634 - if ( $this->readNextTest() ) {
 1633+ function next() {
 1634+ if ( $this->readNextTest() ) {
16351635 $this->index++;
16361636 return true;
16371637 } else {
16381638 $this->eof = true;
16391639 }
1640 - }
 1640+ }
16411641
1642 - function valid() {
 1642+ function valid() {
16431643 return $this->eof != true;
1644 - }
 1644+ }
16451645
16461646 function readNextTest() {
16471647 $data = array();

Status & tagging log