Use lowercase key words
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 23 Nov 2013 14:56:42 +0000 (15:56 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 23 Nov 2013 14:56:42 +0000 (15:56 +0100)
Change-Id: I57569b7082a0decc8128ecadd8ec5d1a5c327673

14 files changed:
includes/Export.php
includes/media/BitmapMetadataHandler.php
includes/media/Exif.php
includes/media/FormatMetadata.php
includes/media/IPTC.php
includes/media/MediaHandler.php
includes/media/SVGMetadataExtractor.php
includes/media/XMP.php
includes/media/XMPInfo.php
includes/rcfeed/JSONRCFeedFormatter.php
languages/classes/LanguageKk_cyrl.php
languages/classes/LanguageTyv.php
maintenance/locking/LockServerDaemon.php
tests/phpunit/includes/TitlePermissionTest.php

index 98de4c0..3d34763 100644 (file)
@@ -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";
                        }
                }
index 7c39c81..00b4298 100644 (file)
@@ -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 ) {
index 9a2794a..50dd266 100644 (file)
@@ -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 ) ) ) {
index 1b1841c..40c3161 100644 (file)
@@ -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
index 544dd21..dc163ac 100644 (file)
@@ -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 ) {
index ddb8efd..c53c829 100644 (file)
@@ -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 );
        }
 
index 2e33bb9..831e043 100644 (file)
@@ -45,7 +45,7 @@ class SVGReader {
 
        private $reader = null;
        private $mDebug = false;
-       private $metadata = Array();
+       private $metadata = array();
 
        /**
         * Constructor
index 7eb3d19..3b31053 100644 (file)
@@ -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'] )
index f0b2cb5..afc9ece 100644 (file)
@@ -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;
index f4cb992..144ec95 100644 (file)
@@ -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:
index 5a7bbf3..4e08613 100644 (file)
@@ -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;
index fc1e8a8..f362329 100644 (file)
@@ -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;
index 01fbac7..d98654e 100644 (file)
@@ -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...
index 4a0a755..c7cbc7b 100644 (file)
@@ -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() ) {