Use lowercase key words
Change-Id: I57569b7082a0decc8128ecadd8ec5d1a5c327673
This commit is contained in:
parent
164876e005
commit
db24b10ca8
14 changed files with 23 additions and 23 deletions
|
|
@ -604,7 +604,7 @@ class XmlDumpWriter {
|
|||
if ( $row->page_is_redirect ) {
|
||||
$page = WikiPage::factory( $title );
|
||||
$redirect = $page->getRedirectTarget();
|
||||
if ( $redirect instanceOf Title && $redirect->isValidRedirectTarget() ) {
|
||||
if ( $redirect instanceof Title && $redirect->isValidRedirectTarget() ) {
|
||||
$out .= ' ' . Xml::element( 'redirect', array( 'title' => self::canonicalTitle( $redirect ) ) ) . "\n";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class BitmapMetadataHandler {
|
|||
function getMetadataArray() {
|
||||
// this seems a bit ugly... This is all so its merged in right order
|
||||
// based on the MWG recomendation.
|
||||
$temp = Array();
|
||||
$temp = array();
|
||||
krsort( $this->metaPriority );
|
||||
foreach ( $this->metaPriority as $pri ) {
|
||||
foreach ( $pri as $type ) {
|
||||
|
|
@ -153,7 +153,7 @@ class BitmapMetadataHandler {
|
|||
|
||||
$seg = JpegMetadataExtractor::segmentSplitter( $filename );
|
||||
if ( isset( $seg['COM'] ) && isset( $seg['COM'][0] ) ) {
|
||||
$meta->addMetadata( Array( 'JPEGFileComment' => $seg['COM'] ), 'native' );
|
||||
$meta->addMetadata( array( 'JPEGFileComment' => $seg['COM'] ), 'native' );
|
||||
}
|
||||
if ( isset( $seg['PSIR'] ) && count( $seg['PSIR'] ) > 0 ) {
|
||||
foreach ( $seg['PSIR'] as $curPSIRValue ) {
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ class Exif {
|
|||
* Make $this->mFilteredExifData
|
||||
*/
|
||||
function makeFilteredData() {
|
||||
$this->mFilteredExifData = Array();
|
||||
$this->mFilteredExifData = array();
|
||||
|
||||
foreach ( array_keys( $this->mRawExifData ) as $section ) {
|
||||
if ( !in_array( $section, array_keys( $this->mExifTags ) ) ) {
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class FormatMetadata extends ContextSource {
|
|||
// This seems ugly to wrap non-array's in an array just to unwrap again,
|
||||
// especially when most of the time it is not an array
|
||||
if ( !is_array( $tags[$tag] ) ) {
|
||||
$vals = Array( $vals );
|
||||
$vals = array( $vals );
|
||||
}
|
||||
|
||||
// _type is a special value to say what array type
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class IPTC {
|
|||
*/
|
||||
static function parse( $rawData ) {
|
||||
$parsed = iptcparse( $rawData );
|
||||
$data = Array();
|
||||
$data = array();
|
||||
if ( !is_array( $parsed ) ) {
|
||||
return $data;
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@ class IPTC {
|
|||
if ( isset( $parsed['2#060'] ) ) {
|
||||
$time = $parsed['2#060'];
|
||||
} else {
|
||||
$time = Array();
|
||||
$time = array();
|
||||
}
|
||||
$timestamp = self::timeHelper( $val, $time, $c );
|
||||
if ( $timestamp ) {
|
||||
|
|
@ -239,7 +239,7 @@ class IPTC {
|
|||
if ( isset( $parsed['2#063'] ) ) {
|
||||
$time = $parsed['2#063'];
|
||||
} else {
|
||||
$time = Array();
|
||||
$time = array();
|
||||
}
|
||||
$timestamp = self::timeHelper( $val, $time, $c );
|
||||
if ( $timestamp ) {
|
||||
|
|
@ -252,7 +252,7 @@ class IPTC {
|
|||
if ( isset( $parsed['2#035'] ) ) {
|
||||
$time = $parsed['2#035'];
|
||||
} else {
|
||||
$time = Array();
|
||||
$time = array();
|
||||
}
|
||||
$timestamp = self::timeHelper( $val, $time, $c );
|
||||
if ( $timestamp ) {
|
||||
|
|
@ -265,7 +265,7 @@ class IPTC {
|
|||
if ( isset( $parsed['2#038'] ) ) {
|
||||
$time = $parsed['2#038'];
|
||||
} else {
|
||||
$time = Array();
|
||||
$time = array();
|
||||
}
|
||||
$timestamp = self::timeHelper( $val, $time, $c );
|
||||
if ( $timestamp ) {
|
||||
|
|
|
|||
|
|
@ -138,8 +138,8 @@ abstract class MediaHandler {
|
|||
* @return string version string
|
||||
*/
|
||||
static function getMetadataVersion() {
|
||||
$version = Array( '2' ); // core metadata version
|
||||
wfRunHooks( 'GetMetadataVersion', Array( &$version ) );
|
||||
$version = array( '2' ); // core metadata version
|
||||
wfRunHooks( 'GetMetadataVersion', array( &$version ) );
|
||||
return implode( ';', $version );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class SVGReader {
|
|||
|
||||
private $reader = null;
|
||||
private $mDebug = false;
|
||||
private $metadata = Array();
|
||||
private $metadata = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ class XMPReader {
|
|||
|
||||
$data = $this->results;
|
||||
|
||||
wfRunHooks( 'XMPGetResults', Array( &$data ) );
|
||||
wfRunHooks( 'XMPGetResults', array( &$data ) );
|
||||
|
||||
if ( isset( $data['xmp-special']['AuthorsPosition'] )
|
||||
&& is_string( $data['xmp-special']['AuthorsPosition'] )
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class XMPInfo {
|
|||
if ( !self::$ranHooks ) {
|
||||
// This is for if someone makes a custom metadata extension.
|
||||
// For example, a medical wiki might want to decode DICOM xmp properties.
|
||||
wfRunHooks( 'XMPGetInfo', Array( &self::$items ) );
|
||||
wfRunHooks( 'XMPGetInfo', array( &self::$items ) );
|
||||
self::$ranHooks = true; // Only want to do this once.
|
||||
}
|
||||
return self::$items;
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ class JSONRCFeedFormatter implements RCFeedFormatter {
|
|||
break;
|
||||
|
||||
case RC_NEW:
|
||||
$packet['length'] = array( 'old' => NULL, 'new' => $attrib['rc_new_len'] );
|
||||
$packet['revision'] = array( 'old' => NULL, 'new' => $attrib['rc_this_oldid'] );
|
||||
$packet['length'] = array( 'old' => null, 'new' => $attrib['rc_new_len'] );
|
||||
$packet['revision'] = array( 'old' => null, 'new' => $attrib['rc_this_oldid'] );
|
||||
break;
|
||||
|
||||
case RC_LOG:
|
||||
|
|
|
|||
|
|
@ -727,7 +727,7 @@ class LanguageKk_cyrl extends Language {
|
|||
$lastLetter[0] = $ar[count( $ar ) - 1];
|
||||
|
||||
// Find the last vowel in the word
|
||||
$lastLetter[1] = NULL;
|
||||
$lastLetter[1] = null;
|
||||
foreach ( $wordReversed as $xvalue ) {
|
||||
foreach ( $allVowels as $yvalue ) {
|
||||
if ( strcmp( $xvalue, $yvalue ) == 0 ) {
|
||||
|
|
@ -737,7 +737,7 @@ class LanguageKk_cyrl extends Language {
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if ( $lastLetter[1] !== NULL ) {
|
||||
if ( $lastLetter[1] !== null ) {
|
||||
break;
|
||||
} else {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class LanguageTyv extends Language {
|
|||
$wordReversed = array_reverse( $ar[0] ); // Here's an array with the order of the letters in the word reversed so we can find a match quicker *shrug*
|
||||
|
||||
// Find the last vowel in the word
|
||||
$wordLastVowel = NULL;
|
||||
$wordLastVowel = null;
|
||||
foreach ( $wordReversed as $xvalue ) {
|
||||
foreach ( $allVowels as $yvalue ) {
|
||||
if ( strcmp( $xvalue, $yvalue ) == 0 ) {
|
||||
|
|
@ -76,7 +76,7 @@ class LanguageTyv extends Language {
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if ( $wordLastVowel !== NULL ) {
|
||||
if ( $wordLastVowel !== null ) {
|
||||
break;
|
||||
} else {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class LockServerDaemon {
|
|||
$socketArray->addSocket( $this->sock ); // add listening socket
|
||||
do {
|
||||
list( $read, $write ) = $socketArray->socketsForSelect();
|
||||
if ( socket_select( $read, $write, $except = NULL, NULL ) < 1 ) {
|
||||
if ( socket_select( $read, $write, $except = null, null ) < 1 ) {
|
||||
continue; // wait
|
||||
}
|
||||
// Check if there is a client trying to connect...
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
|
|||
date_default_timezone_set( $localZone );
|
||||
|
||||
$this->title = Title::makeTitle( NS_MAIN, "Main Page" );
|
||||
if ( !isset( $this->userUser ) || !( $this->userUser instanceOf User ) ) {
|
||||
if ( !isset( $this->userUser ) || !( $this->userUser instanceof User ) ) {
|
||||
$this->userUser = User::newFromName( $this->userName );
|
||||
|
||||
if ( !$this->userUser->getID() ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue