Remove spaces in function signature
authorumherirrender <umherirrender_de.wp@web.de>
Mon, 18 Mar 2013 19:44:43 +0000 (20:44 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Mon, 18 Mar 2013 19:44:43 +0000 (20:44 +0100)
Change-Id: I45aea7a7af88cd913b2f485913620a8af0ab2fed

34 files changed:
includes/AjaxResponse.php
includes/Cookie.php
includes/api/ApiBase.php
includes/api/ApiFormatBase.php
includes/api/ApiQueryImageInfo.php
includes/db/DatabaseMssql.php
includes/db/DatabaseMysql.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/diff/DairikiDiff.php
includes/installer/WebInstallerPage.php
includes/media/BitmapMetadataHandler.php
includes/media/Exif.php
includes/media/IPTC.php
includes/media/Jpeg.php
includes/media/JpegMetadataExtractor.php
includes/media/MediaHandler.php
includes/media/XMP.php
includes/media/XMPInfo.php
includes/media/XMPValidate.php
includes/parser/ParserOutput.php
includes/specials/SpecialRandompage.php
includes/specials/SpecialUncategorizedcategories.php
includes/upload/UploadStash.php
languages/classes/LanguageAz.php
languages/classes/LanguageKaa.php
languages/classes/LanguageKk.php
languages/classes/LanguageTr.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/LinksUpdateTest.php
tests/phpunit/includes/RevisionStorageTest.php
tests/phpunit/includes/WikiPageTest.php
tests/phpunit/includes/jobqueue/JobQueueTest.php
tests/phpunit/includes/media/PNGMetadataExtractorTest.php

index 138f808..d553652 100644 (file)
@@ -210,7 +210,7 @@ class AjaxResponse {
         * @param $timestamp string
         * @return bool Returns true if the response code was set to 304 Not Modified.
         */
-       function checkLastModified ( $timestamp ) {
+       function checkLastModified( $timestamp ) {
                global $wgCachePages, $wgCacheEpoch, $wgUser;
                $fname = 'AjaxResponse::checkLastModified';
 
index 27a8507..1b22c0e 100644 (file)
@@ -197,7 +197,7 @@ class CookieJar {
         * Set a cookie in the cookie jar. Make sure only one cookie per-name exists.
         * @see Cookie::set()
         */
-       public function setCookie ( $name, $value, $attr ) {
+       public function setCookie( $name, $value, $attr ) {
                /* cookies: case insensitive, so this should work.
                 * We'll still send the cookies back in the same case we got them, though.
                 */
@@ -235,7 +235,7 @@ class CookieJar {
         * @param string $domain cookie's domain
         * @return null
         */
-       public function parseCookieResponseHeader ( $cookie, $domain ) {
+       public function parseCookieResponseHeader( $cookie, $domain ) {
                $len = strlen( 'Set-Cookie:' );
 
                if ( substr_compare( 'Set-Cookie:', $cookie, 0, $len, true ) === 0 ) {
index 9351a8d..d2d50ae 100644 (file)
@@ -822,7 +822,7 @@ abstract class ApiBase extends ContextSource {
         *      If not set will magically default to either watchdefault or watchcreations
         * @return bool
         */
-       protected function getWatchlistValue ( $watchlist, $titleObj, $userOption = null ) {
+       protected function getWatchlistValue( $watchlist, $titleObj, $userOption = null ) {
 
                $userWatching = $this->getUser()->isWatched( $titleObj );
 
index d8aa163..e8e6acf 100644 (file)
@@ -85,7 +85,7 @@ abstract class ApiFormatBase extends ApiBase {
         *
         * @param bool $b Whether or not ampersands should be escaped.
         */
-       public function setUnescapeAmps ( $b ) {
+       public function setUnescapeAmps( $b ) {
                $this->mUnescapeAmps = $b;
        }
 
index 95c2745..556f147 100644 (file)
@@ -228,7 +228,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
         * @param string $otherParams of otherParams (iiurlparam).
         * @return Array of parameters for transform.
         */
-       protected function mergeThumbParams ( $image, $thumbParams, $otherParams ) {
+       protected function mergeThumbParams( $image, $thumbParams, $otherParams ) {
                if ( !$otherParams ) {
                        return $thumbParams;
                }
index 6c45ffa..575f629 100644 (file)
@@ -661,7 +661,7 @@ class DatabaseMssql extends DatabaseBase {
                return $version;
        }
 
-       function tableExists ( $table, $fname = __METHOD__, $schema = false ) {
+       function tableExists( $table, $fname = __METHOD__, $schema = false ) {
                $res = sqlsrv_query( $this->mConn, "SELECT * FROM information_schema.tables
                        WHERE table_type='BASE TABLE' AND table_name = '$table'" );
                if ( $res === false ) {
@@ -952,7 +952,7 @@ class DatabaseMssql extends DatabaseBase {
  */
 class MssqlField implements Field {
        private $name, $tablename, $default, $max_length, $nullable, $type;
-       function __construct ( $info ) {
+       function __construct( $info ) {
                $this->name = $info['COLUMN_NAME'];
                $this->tablename = $info['TABLE_NAME'];
                $this->default = $info['COLUMN_DEFAULT'];
index 27aae18..0f7eb9e 100644 (file)
@@ -965,7 +965,7 @@ class MySQLField implements Field {
        private $name, $tablename, $default, $max_length, $nullable,
                $is_pk, $is_unique, $is_multiple, $is_key, $type;
 
-       function __construct ( $info ) {
+       function __construct( $info ) {
                $this->name = $info->name;
                $this->tablename = $info->table;
                $this->default = $info->def;
index 75b3550..7db032f 100644 (file)
@@ -493,7 +493,7 @@ class DatabaseOracle extends DatabaseBase {
                return $retVal;
        }
 
-       private function fieldBindStatement ( $table, $col, &$val, $includeCol = false ) {
+       private function fieldBindStatement( $table, $col, &$val, $includeCol = false ) {
                $col_info = $this->fieldInfoMulti( $table, $col );
                $col_type = $col_info != false ? $col_info->type() : 'CONSTANT';
 
@@ -1121,7 +1121,7 @@ class DatabaseOracle extends DatabaseBase {
                }
        }
 
-       private function wrapConditionsForWhere ( $table, $conds, $parentCol = null ) {
+       private function wrapConditionsForWhere( $table, $conds, $parentCol = null ) {
                $conds2 = array();
                foreach ( $conds as $col => $val ) {
                        if ( is_array( $val ) ) {
index f32d775..c6ac11a 100644 (file)
@@ -218,7 +218,7 @@ class SavepointPostgres {
        protected $id;
        protected $didbegin;
 
-       public function __construct ( $dbw, $id ) {
+       public function __construct( $dbw, $id ) {
                $this->dbw = $dbw;
                $this->id = $id;
                $this->didbegin = false;
@@ -450,7 +450,7 @@ class DatabasePostgres extends DatabaseBase {
                return $this->mLastResult;
        }
 
-       protected function dumpError () {
+       protected function dumpError() {
                $diags = array( PGSQL_DIAG_SEVERITY,
                                PGSQL_DIAG_SQLSTATE,
                                PGSQL_DIAG_MESSAGE_PRIMARY,
@@ -647,7 +647,7 @@ class DatabasePostgres extends DatabaseBase {
         * @since 1.19
         * @return Array
         */
-       function indexAttributes ( $index, $schema = false ) {
+       function indexAttributes( $index, $schema = false ) {
                if ( $schema === false )
                        $schema = $this->getCoreSchema();
                /*
index 94ffc06..1a26d0c 100644 (file)
@@ -183,7 +183,7 @@ class _DiffEngine {
         * @param $to_lines
         * @return array
         */
-       function diff ( $from_lines, $to_lines ) {
+       function diff( $from_lines, $to_lines ) {
                wfProfileIn( __METHOD__ );
 
                // Diff and store locally
@@ -241,7 +241,7 @@ class _DiffEngine {
         * @param $from_lines
         * @param $to_lines
         */
-       function diff_local ( $from_lines, $to_lines ) {
+       function diff_local( $from_lines, $to_lines ) {
                global $wgExternalDiffEngine;
                wfProfileIn( __METHOD__ );
 
@@ -469,7 +469,7 @@ class _DiffEngine {
         * @param $yoff
         * @param $ylim
         */
-       function _compareseq ( $xoff, $xlim, $yoff, $ylim ) {
+       function _compareseq( $xoff, $xlim, $yoff, $ylim ) {
                // Slide down the bottom initial diagonal.
                while ( $xoff < $xlim && $yoff < $ylim
                && $this->xv[$xoff] == $this->yv[$yoff] ) {
@@ -1204,7 +1204,7 @@ class _HWLDF_WordAccumulator {
         * @param $words
         * @param $tag string
         */
-       function addWords ( $words, $tag = '' ) {
+       function addWords( $words, $tag = '' ) {
                if ( $tag != $this->_tag ) {
                        $this->_flushGroup( $tag );
                }
@@ -1244,7 +1244,7 @@ class WordLevelDiff extends MappedDiff {
         * @param $orig_lines
         * @param $closing_lines
         */
-       function __construct ( $orig_lines, $closing_lines ) {
+       function __construct( $orig_lines, $closing_lines ) {
                wfProfileIn( __METHOD__ );
 
                list( $orig_words, $orig_stripped ) = $this->_split( $orig_lines );
index f352cf1..93092e3 100644 (file)
@@ -1261,7 +1261,7 @@ abstract class WebInstaller_Document extends WebInstallerPage {
 
        abstract protected function getFileName();
 
-       public  function execute() {
+       public function execute() {
                $text = $this->getFileContents();
                $text = InstallDocFormatter::format( $text );
                $this->parent->output->addWikiText( $text );
index 345e786..3876c52 100644 (file)
@@ -54,7 +54,7 @@ class BitmapMetadataHandler {
         *
         * @param string $app13 String containing app13 block from jpeg file
         */
-       private function doApp13 ( $app13 ) {
+       private function doApp13( $app13 ) {
                try {
                        $this->iptcType = JpegMetadataExtractor::doPSIR( $app13 );
                } catch ( MWException $e ) {
@@ -79,7 +79,7 @@ class BitmapMetadataHandler {
         * @param $filename string
         * @param $byteOrder string
         */
-       function getExif ( $filename, $byteOrder ) {
+       function getExif( $filename, $byteOrder ) {
                global $wgShowEXIF;
                if ( file_exists( $filename ) && $wgShowEXIF ) {
                        $exif = new Exif( $filename, $byteOrder );
@@ -95,7 +95,7 @@ class BitmapMetadataHandler {
         * @param array $metaArray array of metadata values
         * @param string $type type. defaults to other. if two things have the same type they're merged
         */
-       function addMetadata ( $metaArray, $type = 'other' ) {
+       function addMetadata( $metaArray, $type = 'other' ) {
                if ( isset( $this->metadata[$type] ) ) {
                        /* merge with old data */
                        $metaArray = $metaArray + $this->metadata[$type];
@@ -113,7 +113,7 @@ class BitmapMetadataHandler {
         *
         * @return Array metadata array
         */
-       function getMetadataArray () {
+       function getMetadataArray() {
                // this seems a bit ugly... This is all so its merged in right order
                // based on the MWG recomendation.
                $temp = Array();
@@ -147,7 +147,7 @@ class BitmapMetadataHandler {
         * @return array metadata result array.
         * @throws MWException on invalid file.
         */
-       static function Jpeg ( $filename ) {
+       static function Jpeg( $filename ) {
                $showXMP = function_exists( 'xml_parser_create_ns' );
                $meta = new self();
 
@@ -189,7 +189,7 @@ class BitmapMetadataHandler {
         * @param string $filename full path to file
         * @return Array Array for storage in img_metadata.
         */
-       public static function PNG ( $filename ) {
+       public static function PNG( $filename ) {
                $showXMP = function_exists( 'xml_parser_create_ns' );
 
                $meta = new self();
@@ -218,7 +218,7 @@ class BitmapMetadataHandler {
         * @param string $filename full path to file
         * @return Array metadata array
         */
-       public static function GIF ( $filename ) {
+       public static function GIF( $filename ) {
 
                $meta = new self();
                $baseArray = GIFMetadataExtractor::getMetadata( $filename );
@@ -259,7 +259,7 @@ class BitmapMetadataHandler {
         * @throws MWException
         * @return Array The metadata.
         */
-       public static function Tiff ( $filename ) {
+       public static function Tiff( $filename ) {
                if ( file_exists( $filename ) ) {
                        $byteOrder = self::getTiffByteOrder( $filename );
                        if ( !$byteOrder ) {
index 5664d59..52d3195 100644 (file)
@@ -439,7 +439,7 @@ class Exif {
         * This has not been tested on any shift-JIS strings.
         * @param string $prop prop name.
         */
-       private function charCodeString ( $prop ) {
+       private function charCodeString( $prop ) {
                if ( isset( $this->mFilteredExifData[$prop] ) ) {
 
                        if ( strlen( $this->mFilteredExifData[$prop] ) <= 8 ) {
@@ -500,7 +500,7 @@ class Exif {
         * the type of UNDEFINED field
         * @param string $prop name of property
         */
-       private function exifPropToOrd ( $prop ) {
+       private function exifPropToOrd( $prop ) {
                if ( isset( $this->mFilteredExifData[$prop] ) ) {
                        $this->mFilteredExifData[$prop] = ord( $this->mFilteredExifData[$prop] );
                }
@@ -510,7 +510,7 @@ class Exif {
         * for example 10 degress 20`40`` S -> -10.34444
         * @param string $prop a gps coordinate exif tag name (like GPSLongitude)
         */
-       private function exifGPStoNumber ( $prop ) {
+       private function exifGPStoNumber( $prop ) {
                $loc =& $this->mFilteredExifData[$prop];
                $dir =& $this->mFilteredExifData[$prop . 'Ref'];
                $res = false;
index 4191cde..a1b3fd8 100644 (file)
@@ -423,7 +423,7 @@ class IPTC {
         *
         * @return string|array
         */
-       private static function convIPTC ( $data, $charset ) {
+       private static function convIPTC( $data, $charset ) {
                if ( is_array( $data ) ) {
                        foreach ( $data as &$val ) {
                                $val = self::convIPTCHelper( $val, $charset );
@@ -441,7 +441,7 @@ class IPTC {
         *
         * @return string
         */
-       private static function convIPTCHelper ( $data, $charset ) {
+       private static function convIPTCHelper( $data, $charset ) {
                if ( $charset ) {
                        wfSuppressWarnings();
                        $data = iconv( $charset, "UTF-8//IGNORE", $data );
index 8b5d651..3551943 100644 (file)
@@ -32,7 +32,7 @@
  */
 class JpegHandler extends ExifBitmapHandler {
 
-       function getMetadata ( $image, $filename ) {
+       function getMetadata( $image, $filename ) {
                try {
                        $meta = BitmapMetadataHandler::Jpeg( $filename );
                        if ( !is_array( $meta ) ) {
index 6ff07ed..121652f 100644 (file)
@@ -47,7 +47,7 @@ class JpegMetadataExtractor {
         * @return Array of interesting segments.
         * @throws MWException if given invalid file.
         */
-       static function segmentSplitter ( $filename ) {
+       static function segmentSplitter( $filename ) {
                $showXMP = function_exists( 'xml_parser_create_ns' );
 
                $segmentCount = 0;
@@ -195,7 +195,7 @@ class JpegMetadataExtractor {
         * @throws MWException (It gets caught next level up though)
         * @return String if the iptc hash is good or not.
         */
-       public static function doPSIR ( $app13 ) {
+       public static function doPSIR( $app13 ) {
                if ( !$app13 ) {
                        throw new MWException( "No App13 segment given" );
                }
index 9a3f645..b36bfa9 100644 (file)
@@ -133,7 +133,7 @@ abstract class MediaHandler {
         *
         * @return string version string
         */
-       static function getMetadataVersion () {
+       static function getMetadataVersion() {
                $version = Array( '2' ); // core metadata version
                wfRunHooks( 'GetMetadataVersion', Array( &$version ) );
                return implode( ';', $version);
index 62738a0..d9cca3f 100644 (file)
@@ -414,7 +414,7 @@ class XMPReader {
         *
         * @param string $elm Namespace of element followed by a space and then tag name of element.
         */
-       private function endElementModeIgnore ( $elm ) {
+       private function endElementModeIgnore( $elm ) {
                if ( $this->curItem[0] === $elm ) {
                        array_shift( $this->curItem );
                        array_shift( $this->mode );
@@ -436,7 +436,7 @@ class XMPReader {
         *
         * @param string $elm namespace, space, and tag name.
         */
-       private function endElementModeSimple ( $elm ) {
+       private function endElementModeSimple( $elm ) {
                if ( $this->charContent !== false ) {
                        if ( $this->processingArray ) {
                                // if we're processing an array, use the original element
index 102547f..3b64fd3 100644 (file)
@@ -31,7 +31,7 @@ class XMPInfo {
        /** get the items array
         * @return Array XMP item configuration array.
         */
-       public static function getItems () {
+       public static function getItems() {
                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.
index f98f0b5..b7b35dc 100644 (file)
@@ -335,7 +335,7 @@ class XMPValidate {
         *           or DDD,MM.mmk form
         * @param $standalone Boolean if its a simple prop (should always be true)
         */
-       public static function validateGPS ( $info, &$val, $standalone ) {
+       public static function validateGPS( $info, &$val, $standalone ) {
                if ( !$standalone ) {
                        return;
                }
index db649f1..3af3b7a 100644 (file)
@@ -143,10 +143,10 @@ class ParserOutput extends CacheTime {
        function setNewSection( $value ) {
                $this->mNewSection = (bool)$value;
        }
-       function hideNewSection ( $value ) {
+       function hideNewSection( $value ) {
                $this->mHideNewSection = (bool)$value;
        }
-       function getHideNewSection () {
+       function getHideNewSection() {
                return (bool)$this->mHideNewSection;
        }
        function getNewSection() {
index b59f834..ba5a4ac 100644 (file)
@@ -41,7 +41,7 @@ class RandomPage extends SpecialPage {
                return $this->namespaces;
        }
 
-       public function setNamespace ( $ns ) {
+       public function setNamespace( $ns ) {
                if( !$ns || $ns < NS_MAIN ) {
                        $ns = NS_MAIN;
                }
index 54b20dd..ebc32cf 100644 (file)
@@ -38,7 +38,7 @@ class UncategorizedCategoriesPage extends UncategorizedPagesPage {
         * @param $result The query result
         * @return string The category link
         */
-       function formatResult ( $skin, $result ) {
+       function formatResult( $skin, $result ) {
                $title = Title::makeTitle( NS_CATEGORY, $result->title );
                $text = $title->getText();
 
index cfa3879..326d91d 100644 (file)
@@ -158,7 +158,7 @@ class UploadStash {
         * @param string $key key under which file information is stored
         * @return Array
         */
-       public function getMetadata ( $key ) {
+       public function getMetadata( $key ) {
                $this->getFile( $key );
                return $this->fileMetadata[$key];
        }
@@ -169,7 +169,7 @@ class UploadStash {
         * @param string $key key under which file information is stored
         * @return Array
         */
-       public function getFileProps ( $key ) {
+       public function getFileProps( $key ) {
                $this->getFile( $key );
                return $this->fileProps[$key];
        }
index 0956dc4..48f70e8 100644 (file)
@@ -32,7 +32,7 @@ class LanguageAz extends Language {
         * @param $string string
         * @return mixed|string
         */
-       function ucfirst ( $string ) {
+       function ucfirst( $string ) {
                if ( $string[0] == 'i' ) {
                        return 'İ' . substr( $string, 1 );
                } else {
index a397bc0..0318fb1 100644 (file)
@@ -54,7 +54,7 @@ class LanguageKaa extends Language {
         *
         * @return string
         */
-       function ucfirst ( $string ) {
+       function ucfirst( $string ) {
                if ( substr( $string, 0, 1 ) === 'i' ) {
                        return 'İ' . substr( $string, 1 );
                } else {
@@ -69,7 +69,7 @@ class LanguageKaa extends Language {
         *
         * @return mixed|string
         */
-       function lcfirst ( $string ) {
+       function lcfirst( $string ) {
                if ( substr( $string, 0, 1 ) === 'I' ) {
                        return 'ı' . substr( $string, 1 );
                } else {
index 6dd6959..f6bbae7 100644 (file)
@@ -435,7 +435,7 @@ class LanguageKk extends LanguageKk_cyrl {
         *
         * @return string
         */
-       function ucfirst ( $string ) {
+       function ucfirst( $string ) {
                $variant = $this->getPreferredVariant();
                if ( ( $variant == 'kk-latn' || $variant == 'kk-tr' ) && $string[0] == 'i' ) {
                        $string = 'İ' . substr( $string, 1 );
@@ -452,7 +452,7 @@ class LanguageKk extends LanguageKk_cyrl {
         *
         * @return string
         */
-       function lcfirst ( $string ) {
+       function lcfirst( $string ) {
                $variant = $this->getPreferredVariant();
                if ( ( $variant == 'kk-latn' || $variant == 'kk-tr' ) && $string[0] == 'I' ) {
                        $string = 'ı' . substr( $string, 1 );
index 6a01566..887f05c 100644 (file)
@@ -38,7 +38,7 @@ class LanguageTr extends Language {
         * @param $string string
         * @return string
         */
-       function ucfirst ( $string ) {
+       function ucfirst( $string ) {
                if ( strlen( $string ) && $string[0] == 'i' ) {
                        return 'İ' . substr( $string, 1 );
                } else {
@@ -50,7 +50,7 @@ class LanguageTr extends Language {
         * @param $string string
         * @return mixed|string
         */
-       function lcfirst ( $string ) {
+       function lcfirst( $string ) {
                if ( strlen( $string ) && $string[0] == 'I' ) {
                        return 'ı' . substr( $string, 1 );
                } else {
index 7e6e0ab..7d95b07 100644 (file)
@@ -64,7 +64,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                'oracle'
        );
 
-       function  __construct( $name = null, array $data = array(), $dataName = '' ) {
+       function __construct( $name = null, array $data = array(), $dataName = '' ) {
                parent::__construct( $name, $data, $dataName );
 
                $this->backupGlobals = false;
index a79b3a2..c83f7da 100644 (file)
@@ -7,7 +7,7 @@
  */
 class LinksUpdateTest extends MediaWikiTestCase {
 
-       function  __construct( $name = null, array $data = array(), $dataName = '' ) {
+       function __construct( $name = null, array $data = array(), $dataName = '' ) {
                parent::__construct( $name, $data, $dataName );
 
                $this->tablesUsed = array_merge( $this->tablesUsed,
index e8d8db0..3b8e5cf 100644 (file)
@@ -17,7 +17,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
         */
        var $the_page;
 
-       function  __construct( $name = null, array $data = array(), $dataName = '' ) {
+       function __construct( $name = null, array $data = array(), $dataName = '' ) {
                parent::__construct( $name, $data, $dataName );
 
                $this->tablesUsed = array_merge( $this->tablesUsed,
index 2501be3..4bb6daa 100644 (file)
@@ -10,7 +10,7 @@ class WikiPageTest extends MediaWikiLangTestCase {
 
        var $pages_to_delete;
 
-       function  __construct( $name = null, array $data = array(), $dataName = '' ) {
+       function __construct( $name = null, array $data = array(), $dataName = '' ) {
                parent::__construct( $name, $data, $dataName );
 
                $this->tablesUsed = array_merge(
index 453cec3..ad4c8df 100644 (file)
@@ -10,7 +10,7 @@ class JobQueueTest extends MediaWikiTestCase {
        protected $queueRand, $queueRandTTL, $queueFifo, $queueFifoTTL;
        protected $old = array();
 
-       function  __construct( $name = null, array $data = array(), $dataName = '' ) {
+       function __construct( $name = null, array $data = array(), $dataName = '' ) {
                parent::__construct( $name, $data, $dataName );
 
                $this->tablesUsed[] = 'job';
index 1e91201..3bbce2b 100644 (file)
@@ -66,7 +66,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
         * actual resolution of the image is (aka in dots per meter).
         */
        /*
-       function testPngPhysTag () {
+       function testPngPhysTag() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'Png-native-test.png' );