Change case of class names to match declarations

Found by running tests under a version of PHP patched to report
case mismatches as E_STRICT errors.

User classes:
* MIMEsearchPage
* MostlinkedTemplatesPage
* SpecialBookSources
* UnwatchedpagesPage

Internal classes:
* DOMXPath
* stdClass
* XMLReader

Did not change:
* testautoLoadedcamlCLASS
* testautoloadedserializedclass

Change-Id: Idc8caa82cd6adb7bab44b142af2b02e15f0a89ee
This commit is contained in:
Kevin Israel 2014-08-24 02:52:38 -04:00 committed by Umherirrender
parent 02ef5c96c8
commit 74faccfa26
9 changed files with 31 additions and 31 deletions

View file

@ -178,7 +178,7 @@ class HtmlFormatter {
// CSS Classes
$domElemsToRemove = array();
$xpath = new DOMXpath( $doc );
$xpath = new DOMXPath( $doc );
foreach ( $removals['CLASS'] as $classToRemove ) {
$elements = $xpath->query( '//*[contains(@class, "' . $classToRemove . '")]' );

View file

@ -424,11 +424,11 @@ class WikiImporter {
$buffer = "";
while ( $this->reader->read() ) {
switch ( $this->reader->nodeType ) {
case XmlReader::TEXT:
case XmlReader::SIGNIFICANT_WHITESPACE:
case XMLReader::TEXT:
case XMLReader::SIGNIFICANT_WHITESPACE:
$buffer .= $this->reader->value;
break;
case XmlReader::END_ELEMENT:
case XMLReader::END_ELEMENT:
return $buffer;
}
}
@ -466,7 +466,7 @@ class WikiImporter {
if ( !Hooks::run( 'ImportHandleToplevelXMLTag', array( $this ) ) ) {
// Do nothing
} elseif ( $tag == 'mediawiki' && $type == XmlReader::END_ELEMENT ) {
} elseif ( $tag == 'mediawiki' && $type == XMLReader::END_ELEMENT ) {
break;
} elseif ( $tag == 'siteinfo' ) {
$this->handleSiteInfo();
@ -516,7 +516,7 @@ class WikiImporter {
'logtitle', 'params' );
while ( $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
$this->reader->name == 'logitem' ) {
break;
}
@ -580,7 +580,7 @@ class WikiImporter {
$badTitle = false;
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
$this->reader->name == 'page' ) {
break;
}
@ -645,7 +645,7 @@ class WikiImporter {
$skip = false;
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
$this->reader->name == 'revision' ) {
break;
}
@ -737,7 +737,7 @@ class WikiImporter {
$skip = false;
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
$this->reader->name == 'upload' ) {
break;
}
@ -835,7 +835,7 @@ class WikiImporter {
$info = array();
while ( $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
$this->reader->name == 'contributor' ) {
break;
}

View file

@ -138,7 +138,7 @@ class SVGReader {
$keepReading = $this->reader->read();
/* Skip until first element */
while ( $keepReading && $this->reader->nodeType != XmlReader::ELEMENT ) {
while ( $keepReading && $this->reader->nodeType != XMLReader::ELEMENT ) {
$keepReading = $this->reader->read();
}
@ -158,7 +158,7 @@ class SVGReader {
$this->debug( "$tag" );
if ( $isSVG && $tag == 'svg' && $type == XmlReader::END_ELEMENT
if ( $isSVG && $tag == 'svg' && $type == XMLReader::END_ELEMENT
&& $this->reader->depth <= $exitDepth
) {
break;
@ -166,7 +166,7 @@ class SVGReader {
$this->readField( $tag, 'title' );
} elseif ( $isSVG && $tag == 'desc' ) {
$this->readField( $tag, 'description' );
} elseif ( $isSVG && $tag == 'metadata' && $type == XmlReader::ELEMENT ) {
} elseif ( $isSVG && $tag == 'metadata' && $type == XMLReader::ELEMENT ) {
$this->readXml( $tag, 'metadata' );
} elseif ( $isSVG && $tag == 'script' ) {
// We normally do not allow scripted svgs.
@ -199,17 +199,17 @@ class SVGReader {
*/
private function readField( $name, $metafield = null ) {
$this->debug( "Read field $metafield" );
if ( !$metafield || $this->reader->nodeType != XmlReader::ELEMENT ) {
if ( !$metafield || $this->reader->nodeType != XMLReader::ELEMENT ) {
return;
}
$keepReading = $this->reader->read();
while ( $keepReading ) {
if ( $this->reader->localName == $name
&& $this->reader->namespaceURI == self::NS_SVG
&& $this->reader->nodeType == XmlReader::END_ELEMENT
&& $this->reader->nodeType == XMLReader::END_ELEMENT
) {
break;
} elseif ( $this->reader->nodeType == XmlReader::TEXT ) {
} elseif ( $this->reader->nodeType == XMLReader::TEXT ) {
$this->metadata[$metafield] = trim( $this->reader->value );
}
$keepReading = $this->reader->read();
@ -224,7 +224,7 @@ class SVGReader {
*/
private function readXml( $metafield = null ) {
$this->debug( "Read top level metadata" );
if ( !$metafield || $this->reader->nodeType != XmlReader::ELEMENT ) {
if ( !$metafield || $this->reader->nodeType != XMLReader::ELEMENT ) {
return;
}
// @todo Find and store type of xml snippet. metadata['metadataType'] = "rdf"
@ -246,7 +246,7 @@ class SVGReader {
*/
private function animateFilterAndLang( $name ) {
$this->debug( "animate filter for tag $name" );
if ( $this->reader->nodeType != XmlReader::ELEMENT ) {
if ( $this->reader->nodeType != XMLReader::ELEMENT ) {
return;
}
if ( $this->reader->isEmptyElement ) {
@ -256,11 +256,11 @@ class SVGReader {
$keepReading = $this->reader->read();
while ( $keepReading ) {
if ( $this->reader->localName == $name && $this->reader->depth <= $exitDepth
&& $this->reader->nodeType == XmlReader::END_ELEMENT
&& $this->reader->nodeType == XMLReader::END_ELEMENT
) {
break;
} elseif ( $this->reader->namespaceURI == self::NS_SVG
&& $this->reader->nodeType == XmlReader::ELEMENT
&& $this->reader->nodeType == XMLReader::ELEMENT
) {
$sysLang = $this->reader->getAttribute( 'systemLanguage' );

View file

@ -50,7 +50,7 @@ class WikiPage implements Page, IDBAccessObject {
public $mLatest = false; // !< Integer (false means "not loaded")
/**@}}*/
/** @var stdclass Map of cache fields (text, parser output, ect) for a proposed/new edit */
/** @var stdClass Map of cache fields (text, parser output, ect) for a proposed/new edit */
public $mPreparedEdit = false;
/**
@ -2050,7 +2050,7 @@ class WikiPage implements Page, IDBAccessObject {
/**
* Prepare text which is about to be saved.
* Returns a stdclass with source, pst and output members
* Returns a stdClass with source, pst and output members
*
* @deprecated since 1.21: use prepareContentForEdit instead.
* @return object
@ -2063,7 +2063,7 @@ class WikiPage implements Page, IDBAccessObject {
/**
* Prepare content which is about to be saved.
* Returns a stdclass with source, pst and output members
* Returns a stdClass with source, pst and output members
*
* @param Content $content
* @param int|null $revid

View file

@ -81,7 +81,7 @@ abstract class QueryPage extends SpecialPage {
array( 'MostimagesPage', 'Mostimages' ),
array( 'MostinterwikisPage', 'Mostinterwikis' ),
array( 'MostlinkedCategoriesPage', 'Mostlinkedcategories' ),
array( 'MostlinkedtemplatesPage', 'Mostlinkedtemplates' ),
array( 'MostlinkedTemplatesPage', 'Mostlinkedtemplates' ),
array( 'MostlinkedPage', 'Mostlinked' ),
array( 'MostrevisionsPage', 'Mostrevisions' ),
array( 'FewestrevisionsPage', 'Fewestrevisions' ),
@ -96,7 +96,7 @@ abstract class QueryPage extends SpecialPage {
array( 'WantedFilesPage', 'Wantedfiles' ),
array( 'WantedPagesPage', 'Wantedpages' ),
array( 'WantedTemplatesPage', 'Wantedtemplates' ),
array( 'UnwatchedPagesPage', 'Unwatchedpages' ),
array( 'UnwatchedpagesPage', 'Unwatchedpages' ),
array( 'UnusedtemplatesPage', 'Unusedtemplates' ),
array( 'WithoutInterwikiPage', 'Withoutinterwiki' ),
);

View file

@ -15,7 +15,7 @@ class MWExceptionHandlerTest extends MediaWikiTestCase {
$refvar = 'value';
try {
$array = array( 'a', 'b' );
$object = new StdClass();
$object = new stdClass();
self::helperThrowAnException( $array, $object, $refvar );
} catch ( Exception $e ) {
}

View file

@ -27,10 +27,10 @@ class SpecialBooksourcesTest extends MediaWikiTestCase {
}
/**
* @covers SpecialBooksources::isValidISBN
* @covers SpecialBookSources::isValidISBN
* @dataProvider provideISBNs
*/
public function testIsValidISBN( $isbn, $isValid ) {
$this->assertSame( $isValid, SpecialBooksources::isValidISBN( $isbn ) );
$this->assertSame( $isValid, SpecialBookSources::isValidISBN( $isbn ) );
}
}

View file

@ -5,11 +5,11 @@
class SpecialMIMESearchTest extends MediaWikiTestCase {
/** @var MIMESearchPage */
/** @var MIMEsearchPage */
private $page;
function setUp() {
$this->page = new MIMESearchPage;
$this->page = new MIMEsearchPage;
$context = new RequestContext();
$context->setTitle( Title::makeTitle( NS_SPECIAL, 'MIMESearch' ) );
$context->setRequest( new FauxRequest() );

View file

@ -19,7 +19,7 @@ abstract class DumpTestCase extends MediaWikiLangTestCase {
protected $exceptionFromAddDBData = null;
/**
* Holds the xmlreader used for analyzing an xml dump
* Holds the XMLReader used for analyzing an XML dump
*
* @var XMLReader|null
*/