From 926d2ee14352b046a5c118e9eefe576ae5c2d375 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 17 Mar 2013 16:13:22 +0100 Subject: [PATCH] Remove spaces between parentheses in function calls Change-Id: If8ec665a01b566fa5189dfcc810b2d9a17f371e1 --- includes/DataUpdate.php | 2 +- includes/GlobalFunctions.php | 2 +- includes/SqlDataUpdate.php | 2 +- includes/WikiFilePage.php | 2 +- includes/WikiPage.php | 4 ++-- includes/api/ApiUpload.php | 6 +++--- includes/content/Content.php | 2 +- includes/content/CssContent.php | 4 ++-- includes/content/JavaScriptContent.php | 4 ++-- includes/content/TextContent.php | 14 +++++++------- includes/content/WikitextContent.php | 2 +- includes/installer/CliInstaller.php | 2 +- includes/installer/DatabaseUpdater.php | 2 +- includes/installer/WebInstaller.php | 2 +- includes/installer/WebInstallerOutput.php | 2 +- includes/media/Exif.php | 4 ++-- includes/media/SVGMetadataExtractor.php | 2 +- includes/media/XMPInfo.php | 2 +- includes/specials/SpecialListusers.php | 2 +- languages/Language.php | 2 +- maintenance/benchmarks/Benchmarker.php | 2 +- maintenance/findHooks.php | 4 ++-- maintenance/fuzz-tester.php | 2 +- maintenance/parse.php | 2 +- maintenance/userOptions.inc | 8 ++++---- 25 files changed, 41 insertions(+), 41 deletions(-) diff --git a/includes/DataUpdate.php b/includes/DataUpdate.php index 114ae14495..c1076b238d 100644 --- a/includes/DataUpdate.php +++ b/includes/DataUpdate.php @@ -34,7 +34,7 @@ abstract class DataUpdate implements DeferrableUpdate { /** * Constructor */ - public function __construct( ) { + public function __construct() { # noop } diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 0feddd2ca3..016736f404 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2710,7 +2710,7 @@ function wfDl( $extension, $fileName = null ) { * @param varargs * @return String */ -function wfEscapeShellArg( ) { +function wfEscapeShellArg() { wfInitShellLocale(); $args = func_get_args(); diff --git a/includes/SqlDataUpdate.php b/includes/SqlDataUpdate.php index c01cdd02cb..79dcdc5918 100644 --- a/includes/SqlDataUpdate.php +++ b/includes/SqlDataUpdate.php @@ -48,7 +48,7 @@ abstract class SqlDataUpdate extends DataUpdate { public function __construct( $withTransaction = true ) { global $wgAntiLockFlags; - parent::__construct( ); + parent::__construct(); if ( $wgAntiLockFlags & ALF_NO_LINK_LOCK ) { $this->mOptions = array(); diff --git a/includes/WikiFilePage.php b/includes/WikiFilePage.php index fa23072282..5e603d37af 100644 --- a/includes/WikiFilePage.php +++ b/includes/WikiFilePage.php @@ -107,7 +107,7 @@ class WikiFilePage extends WikiPage { /** * @return bool */ - public function isRedirect( ) { + public function isRedirect() { $this->loadFile(); if ( $this->mFile->isLocal() ) { return parent::isRedirect(); diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 6e24527328..8d9d7407c8 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -460,7 +460,7 @@ class WikiPage implements Page, IDBAccessObject { * * @return bool */ - public function isRedirect( ) { + public function isRedirect() { $content = $this->getContent(); if ( !$content ) return false; @@ -821,7 +821,7 @@ class WikiPage implements Page, IDBAccessObject { $content = $this->getContent(); } - if ( !$content || $content->isRedirect( ) ) { + if ( !$content || $content->isRedirect() ) { return false; } diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index deeb1c1849..2dcf39204d 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -81,7 +81,7 @@ class ApiUpload extends ApiBase { // Check if the uploaded file is sane if ( $this->mParams['chunk'] ) { - $maxSize = $this->mUpload->getMaxUploadSize( ); + $maxSize = $this->mUpload->getMaxUploadSize(); if( $this->mParams['filesize'] > $maxSize ) { $this->dieUsage( 'The file you submitted was too large', 'file-too-large' ); } @@ -440,8 +440,8 @@ class ApiUpload extends ApiBase { /** * Performs file verification, dies on error. */ - protected function verifyUpload( ) { - $verification = $this->mUpload->verifyUpload( ); + protected function verifyUpload() { + $verification = $this->mUpload->verifyUpload(); if ( $verification['status'] === UploadBase::OK ) { return; } else { diff --git a/includes/content/Content.php b/includes/content/Content.php index 9b59a276da..72729b09b8 100644 --- a/includes/content/Content.php +++ b/includes/content/Content.php @@ -231,7 +231,7 @@ interface Content { * * @return Content. A copy of this object */ - public function copy( ); + public function copy(); /** * Returns true if this content is countable as a "real" wiki page, provided diff --git a/includes/content/CssContent.php b/includes/content/CssContent.php index 75f1aa0cd0..569d122dc7 100644 --- a/includes/content/CssContent.php +++ b/includes/content/CssContent.php @@ -54,10 +54,10 @@ class CssContent extends TextContent { return new CssContent( $pst ); } - protected function getHtml( ) { + protected function getHtml() { $html = ""; $html .= "
\n";
-		$html .= $this->getHighlightHtml( );
+		$html .= $this->getHighlightHtml();
 		$html .= "\n
\n"; return $html; diff --git a/includes/content/JavaScriptContent.php b/includes/content/JavaScriptContent.php index 52211683db..9cd947f9f4 100644 --- a/includes/content/JavaScriptContent.php +++ b/includes/content/JavaScriptContent.php @@ -55,10 +55,10 @@ class JavaScriptContent extends TextContent { return new JavaScriptContent( $pst ); } - protected function getHtml( ) { + protected function getHtml() { $html = ""; $html .= "
\n";
-		$html .= $this->getHighlightHtml( );
+		$html .= $this->getHighlightHtml();
 		$html .= "\n
\n"; return $html; diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index 91ba6efa2f..8fafcb63b6 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -72,8 +72,8 @@ class TextContent extends AbstractContent { * * @return int The size */ - public function getSize( ) { - $text = $this->getNativeData( ); + public function getSize() { + $text = $this->getNativeData(); return strlen( $text ); } @@ -89,7 +89,7 @@ class TextContent extends AbstractContent { public function isCountable( $hasLinks = null ) { global $wgArticleCountMethod; - if ( $this->isRedirect( ) ) { + if ( $this->isRedirect() ) { return false; } @@ -105,7 +105,7 @@ class TextContent extends AbstractContent { * * @return string: the raw text */ - public function getNativeData( ) { + public function getNativeData() { $text = $this->mText; return $text; } @@ -115,7 +115,7 @@ class TextContent extends AbstractContent { * * @return string: the raw text */ - public function getTextForSearchIndex( ) { + public function getTextForSearchIndex() { return $this->getNativeData(); } @@ -127,7 +127,7 @@ class TextContent extends AbstractContent { * * @return string|false: the raw text, or null if the conversion failed */ - public function getWikitextForTransclusion( ) { + public function getWikitextForTransclusion() { $wikitext = $this->convert( CONTENT_MODEL_WIKITEXT, 'lossy' ); if ( $wikitext ) { @@ -248,7 +248,7 @@ class TextContent extends AbstractContent { * * @return string an HTML representation of the content's markup */ - protected function getHighlightHtml( ) { + protected function getHighlightHtml() { # TODO: make Highlighter interface, use highlighter here, if available return htmlspecialchars( $this->getNativeData() ); } diff --git a/includes/content/WikitextContent.php b/includes/content/WikitextContent.php index 7d3cd37343..8be4ebabaf 100644 --- a/includes/content/WikitextContent.php +++ b/includes/content/WikitextContent.php @@ -231,7 +231,7 @@ class WikitextContent extends TextContent { public function isCountable( $hasLinks = null, Title $title = null ) { global $wgArticleCountMethod; - if ( $this->isRedirect( ) ) { + if ( $this->isRedirect() ) { return false; } diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 997255de97..bb7e8776f3 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -191,7 +191,7 @@ class CliInstaller extends Installer { } } - public function envCheckPath( ) { + public function envCheckPath() { if ( !$this->specifiedScriptPath ) { $this->showMessage( 'config-no-cli-uri', $this->getVar( "wgScriptPath" ) ); } diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 4b4bc2365b..b88ae614af 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -402,7 +402,7 @@ abstract class DatabaseUpdater { if( $this->fileHandle ) { $this->skipSchema = false; - $this->writeSchemaUpdateFile( ); + $this->writeSchemaUpdateFile(); $this->setAppliedUpdates( "$wgVersion-schema", $this->updatesSkipped ); } diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index a32550739f..35d649b2fd 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -1086,7 +1086,7 @@ class WebInstaller extends Installer { /** * @return bool */ - public function envCheckPath( ) { + public function envCheckPath() { // PHP_SELF isn't available sometimes, such as when PHP is CGI but // cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME // to get the path to the current script... hopefully it's reliable. SIGH diff --git a/includes/installer/WebInstallerOutput.php b/includes/installer/WebInstallerOutput.php index afbb9abf2b..d61d843f74 100644 --- a/includes/installer/WebInstallerOutput.php +++ b/includes/installer/WebInstallerOutput.php @@ -157,7 +157,7 @@ class WebInstallerOutput { * "" to index.php?css=foobar for the "" * @return String */ - private function getCssUrl( ) { + private function getCssUrl() { return Html::linkedStyle( $_SERVER['PHP_SELF'] . '?css=' . $this->getDir() ); } diff --git a/includes/media/Exif.php b/includes/media/Exif.php index c50b2f05f3..20b84d5515 100644 --- a/includes/media/Exif.php +++ b/includes/media/Exif.php @@ -363,7 +363,7 @@ class Exif { * As an alternative approach, some of this could be done in the validate phase * if we make up our own types like Exif::DATE. */ - function collapseData( ) { + function collapseData() { $this->exifGPStoNumber( 'GPSLatitude' ); $this->exifGPStoNumber( 'GPSDestLatitude' ); @@ -545,7 +545,7 @@ class Exif { * * @deprecated since 1.18 */ - function makeFormattedData( ) { + function makeFormattedData() { wfDeprecated( __METHOD__, '1.18' ); $this->mFormattedExifData = FormatMetadata::getFormattedData( $this->mFilteredExifData ); diff --git a/includes/media/SVGMetadataExtractor.php b/includes/media/SVGMetadataExtractor.php index f8cd6dfe4f..e07fd86973 100644 --- a/includes/media/SVGMetadataExtractor.php +++ b/includes/media/SVGMetadataExtractor.php @@ -278,7 +278,7 @@ class SVGReader { * * The parser has to be in the start element of "" */ - private function handleSVGAttribs( ) { + private function handleSVGAttribs() { $defaultWidth = self::DEFAULT_WIDTH; $defaultHeight = self::DEFAULT_HEIGHT; $aspect = 1.0; diff --git a/includes/media/XMPInfo.php b/includes/media/XMPInfo.php index 01b07db42f..102547ff40 100644 --- a/includes/media/XMPInfo.php +++ b/includes/media/XMPInfo.php @@ -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. diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index ed21396de5..d253a4d3b5 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -206,7 +206,7 @@ class UsersPager extends AlphabeticPager { /** * @return string */ - function getPageHeader( ) { + function getPageHeader() { global $wgScript; list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() ); diff --git a/languages/Language.php b/languages/Language.php index 01751db7ed..1c52da5350 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -531,7 +531,7 @@ class Language { /** * Resets all of the namespace caches. Mainly used for testing */ - public function resetNamespaces( ) { + public function resetNamespaces() { $this->namespaceNames = null; $this->mNamespaceIds = null; $this->namespaceAliases = null; diff --git a/maintenance/benchmarks/Benchmarker.php b/maintenance/benchmarks/Benchmarker.php index c198e0ff3e..98b35b53f9 100644 --- a/maintenance/benchmarks/Benchmarker.php +++ b/maintenance/benchmarks/Benchmarker.php @@ -75,7 +75,7 @@ abstract class Benchmarker extends Maintenance { } } - public function getFormattedResults( ) { + public function getFormattedResults() { $ret = ''; foreach( $this->results as $res ) { // show function with args diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php index 9ad4df4bf6..778da5a180 100644 --- a/maintenance/findHooks.php +++ b/maintenance/findHooks.php @@ -115,7 +115,7 @@ class FindHooks extends Maintenance { */ private function getHooksFromDoc( $doc ) { if ( $this->hasOption( 'online' ) ) { - return $this->getHooksFromOnlineDoc( ); + return $this->getHooksFromOnlineDoc(); } else { return $this->getHooksFromLocalDoc( $doc ); } @@ -137,7 +137,7 @@ class FindHooks extends Maintenance { * Get hooks from www.mediawiki.org using the API * @return array of documented hooks */ - private function getHooksFromOnlineDoc( ) { + private function getHooksFromOnlineDoc() { // All hooks $allhookdata = Http::get( 'http://www.mediawiki.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:MediaWiki_hooks&cmlimit=500&format=php' ); $allhookdata = unserialize( $allhookdata ); diff --git a/maintenance/fuzz-tester.php b/maintenance/fuzz-tester.php index 6bb44a17a1..4c0398079e 100644 --- a/maintenance/fuzz-tester.php +++ b/maintenance/fuzz-tester.php @@ -1490,7 +1490,7 @@ class specialBlockmeTest extends pageTest { function __construct() { $this->pagePath = "index.php?title=Special:Blockme"; - $this->params = array ( ); + $this->params = array (); // sometimes we specify "ip", and sometimes we don't. if ( wikiFuzz::randnum( 1 ) == 0 ) { diff --git a/maintenance/parse.php b/maintenance/parse.php index b0ab62443b..58e76b0a43 100644 --- a/maintenance/parse.php +++ b/maintenance/parse.php @@ -109,7 +109,7 @@ class CLIParser extends Maintenance { * * @return Title object */ - protected function getTitle( ) { + protected function getTitle() { $title = $this->getOption( 'title' ) ? $this->getOption( 'title' ) diff --git a/maintenance/userOptions.inc b/maintenance/userOptions.inc index 2a0665793e..cbe6b057b4 100644 --- a/maintenance/userOptions.inc +++ b/maintenance/userOptions.inc @@ -108,7 +108,7 @@ class userOptions { return false; } - $this->{ $this->mMode } ( ); + $this->{ $this->mMode } (); return true; } @@ -117,7 +117,7 @@ class userOptions { # /** List default options and their value */ - private function LISTER( ) { + private function LISTER() { $def = User::getDefaultOptions(); ksort( $def ); $maxOpt = 0; @@ -130,7 +130,7 @@ class userOptions { } /** List options usage */ - private function USAGER( ) { + private function USAGER() { $ret = array(); $defaultOptions = User::getDefaultOptions(); @@ -181,7 +181,7 @@ class userOptions { /** Change our users options */ - private function CHANGER( ) { + private function CHANGER() { $this->warn(); // We list user by user_id from one of the slave database -- 2.20.1