From db24b10ca88a7b1b1d39e3a1952c34dae1da7bbd Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 23 Nov 2013 15:56:42 +0100 Subject: [PATCH] Use lowercase key words Change-Id: I57569b7082a0decc8128ecadd8ec5d1a5c327673 --- includes/Export.php | 2 +- includes/media/BitmapMetadataHandler.php | 4 ++-- includes/media/Exif.php | 2 +- includes/media/FormatMetadata.php | 2 +- includes/media/IPTC.php | 10 +++++----- includes/media/MediaHandler.php | 4 ++-- includes/media/SVGMetadataExtractor.php | 2 +- includes/media/XMP.php | 2 +- includes/media/XMPInfo.php | 2 +- includes/rcfeed/JSONRCFeedFormatter.php | 4 ++-- languages/classes/LanguageKk_cyrl.php | 4 ++-- languages/classes/LanguageTyv.php | 4 ++-- maintenance/locking/LockServerDaemon.php | 2 +- tests/phpunit/includes/TitlePermissionTest.php | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/includes/Export.php b/includes/Export.php index 98de4c001b..3d347633e4 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -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"; } } diff --git a/includes/media/BitmapMetadataHandler.php b/includes/media/BitmapMetadataHandler.php index 7c39c81445..00b4298bd9 100644 --- a/includes/media/BitmapMetadataHandler.php +++ b/includes/media/BitmapMetadataHandler.php @@ -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 ) { diff --git a/includes/media/Exif.php b/includes/media/Exif.php index 9a2794a5c0..50dd26684b 100644 --- a/includes/media/Exif.php +++ b/includes/media/Exif.php @@ -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 ) ) ) { diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index 1b1841c3a3..40c31619ae 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -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 diff --git a/includes/media/IPTC.php b/includes/media/IPTC.php index 544dd21152..dc163ac6c5 100644 --- a/includes/media/IPTC.php +++ b/includes/media/IPTC.php @@ -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 ) { diff --git a/includes/media/MediaHandler.php b/includes/media/MediaHandler.php index ddb8efd7d1..c53c8295cb 100644 --- a/includes/media/MediaHandler.php +++ b/includes/media/MediaHandler.php @@ -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 ); } diff --git a/includes/media/SVGMetadataExtractor.php b/includes/media/SVGMetadataExtractor.php index 2e33bb9826..831e043057 100644 --- a/includes/media/SVGMetadataExtractor.php +++ b/includes/media/SVGMetadataExtractor.php @@ -45,7 +45,7 @@ class SVGReader { private $reader = null; private $mDebug = false; - private $metadata = Array(); + private $metadata = array(); /** * Constructor diff --git a/includes/media/XMP.php b/includes/media/XMP.php index 7eb3d19e19..3b3105341f 100644 --- a/includes/media/XMP.php +++ b/includes/media/XMP.php @@ -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'] ) diff --git a/includes/media/XMPInfo.php b/includes/media/XMPInfo.php index f0b2cb5e85..afc9ece030 100644 --- a/includes/media/XMPInfo.php +++ b/includes/media/XMPInfo.php @@ -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; diff --git a/includes/rcfeed/JSONRCFeedFormatter.php b/includes/rcfeed/JSONRCFeedFormatter.php index f4cb992152..144ec95bbc 100644 --- a/includes/rcfeed/JSONRCFeedFormatter.php +++ b/includes/rcfeed/JSONRCFeedFormatter.php @@ -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: diff --git a/languages/classes/LanguageKk_cyrl.php b/languages/classes/LanguageKk_cyrl.php index 5a7bbf36f2..4e086139e3 100644 --- a/languages/classes/LanguageKk_cyrl.php +++ b/languages/classes/LanguageKk_cyrl.php @@ -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; diff --git a/languages/classes/LanguageTyv.php b/languages/classes/LanguageTyv.php index fc1e8a8123..f3623299db 100644 --- a/languages/classes/LanguageTyv.php +++ b/languages/classes/LanguageTyv.php @@ -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; diff --git a/maintenance/locking/LockServerDaemon.php b/maintenance/locking/LockServerDaemon.php index 01fbac72d6..d98654ebd7 100644 --- a/maintenance/locking/LockServerDaemon.php +++ b/maintenance/locking/LockServerDaemon.php @@ -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... diff --git a/tests/phpunit/includes/TitlePermissionTest.php b/tests/phpunit/includes/TitlePermissionTest.php index 4a0a755e90..c7cbc7bdf4 100644 --- a/tests/phpunit/includes/TitlePermissionTest.php +++ b/tests/phpunit/includes/TitlePermissionTest.php @@ -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() ) { -- 2.20.1