From da39005596ef1d52afcc83f95c764006e5b753e6 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 26 Apr 2013 14:18:06 +0200 Subject: [PATCH] Removed space after isset While at it, added/removed some other spaces in the same files Change-Id: Iabb23a448f6f53eb6020155f9c744f74f8b11786 --- includes/Collation.php | 8 ++++---- includes/EditPage.php | 2 +- includes/api/ApiBase.php | 6 +++--- includes/api/ApiMain.php | 2 +- includes/api/ApiQueryBlocks.php | 8 ++++---- includes/api/ApiQueryDeletedrevs.php | 2 +- includes/api/ApiQueryLogEvents.php | 4 ++-- includes/api/ApiQueryRevisions.php | 18 +++++++++--------- includes/api/ApiQueryUserContributions.php | 2 +- includes/api/ApiQueryWatchlist.php | 13 ++++++------- includes/media/Exif.php | 6 +++--- includes/parser/DateFormatter.php | 6 +++--- includes/specials/SpecialVersion.php | 6 +++--- tests/RunSeleniumTests.php | 2 +- tests/testHelpers.inc | 2 +- 15 files changed, 43 insertions(+), 44 deletions(-) diff --git a/includes/Collation.php b/includes/Collation.php index 215659e9e9..ed8a031dd1 100644 --- a/includes/Collation.php +++ b/includes/Collation.php @@ -40,7 +40,7 @@ abstract class Collation { * @return Collation */ static function factory( $collationName ) { - switch( $collationName ) { + switch ( $collationName ) { case 'uppercase': return new UppercaseCollation; case 'identity': @@ -349,15 +349,15 @@ class IcuCollation extends Collation { $cacheEntry = $cache->get( $cacheKey ); if ( $cacheEntry && isset( $cacheEntry['version'] ) - && $cacheEntry['version'] == self::FIRST_LETTER_VERSION ) - { + && $cacheEntry['version'] == self::FIRST_LETTER_VERSION + ) { $this->firstLetterData = $cacheEntry; return $this->firstLetterData; } // Generate data from serialized data file - if ( isset ( self::$tailoringFirstLetters[$this->locale] ) ) { + if ( isset( self::$tailoringFirstLetters[$this->locale] ) ) { $letters = wfGetPrecompiledData( "first-letters-root.ser" ); // Append additional characters $letters = array_merge( $letters, self::$tailoringFirstLetters[$this->locale] ); diff --git a/includes/EditPage.php b/includes/EditPage.php index ae35f3e7e1..c97431a0d8 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1220,7 +1220,7 @@ class EditPage { case self::AS_SUCCESS_NEW_ARTICLE: $query = $resultDetails['redirect'] ? 'redirect=no' : ''; - $anchor = isset ( $resultDetails['sectionanchor'] ) ? $resultDetails['sectionanchor'] : ''; + $anchor = isset( $resultDetails['sectionanchor'] ) ? $resultDetails['sectionanchor'] : ''; $wgOut->redirect( $this->mTitle->getFullURL( $query ) . $anchor ); return false; diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index ee5aa97208..c50037016e 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -966,9 +966,9 @@ abstract class ApiBase extends ContextSource { } break; case 'integer': // Force everything using intval() and optionally validate limits - $min = isset ( $paramSettings[self::PARAM_MIN] ) ? $paramSettings[self::PARAM_MIN] : null; - $max = isset ( $paramSettings[self::PARAM_MAX] ) ? $paramSettings[self::PARAM_MAX] : null; - $enforceLimits = isset ( $paramSettings[self::PARAM_RANGE_ENFORCE] ) + $min = isset( $paramSettings[self::PARAM_MIN] ) ? $paramSettings[self::PARAM_MIN] : null; + $max = isset( $paramSettings[self::PARAM_MAX] ) ? $paramSettings[self::PARAM_MAX] : null; + $enforceLimits = isset( $paramSettings[self::PARAM_RANGE_ENFORCE] ) ? $paramSettings[self::PARAM_RANGE_ENFORCE] : false; if ( is_array( $value ) ) { diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 99847cf1d9..dd75d3fc5d 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -609,7 +609,7 @@ class ApiMain extends ApiBase { $result = $this->getResult(); // Printer may not be initialized if the extractRequestParams() fails for the main module - if ( !isset ( $this->mPrinter ) ) { + if ( !isset( $this->mPrinter ) ) { // The printer has not been created yet. Try to manually get formatter value. $value = $this->getRequest()->getVal( 'format', self::API_DEFAULT_FORMAT ); if ( !$this->mModuleMgr->isDefined( $value, 'format' ) ) { diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index fa2a7c455b..881269fe02 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -121,10 +121,10 @@ class ApiQueryBlocks extends ApiQueryBase { $show = array_flip( $params['show'] ); /* Check for conflicting parameters. */ - if ( ( isset ( $show['account'] ) && isset ( $show['!account'] ) ) - || ( isset ( $show['ip'] ) && isset ( $show['!ip'] ) ) - || ( isset ( $show['range'] ) && isset ( $show['!range'] ) ) - || ( isset ( $show['temp'] ) && isset ( $show['!temp'] ) ) + if ( ( isset( $show['account'] ) && isset( $show['!account'] ) ) + || ( isset( $show['ip'] ) && isset( $show['!ip'] ) ) + || ( isset( $show['range'] ) && isset( $show['!range'] ) ) + || ( isset( $show['temp'] ) && isset( $show['!temp'] ) ) ) { $this->dieUsageMsg( 'show' ); } diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index 4a53409fb7..690d0e6406 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -50,7 +50,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase { $fld_user = isset( $prop['user'] ); $fld_userid = isset( $prop['userid'] ); $fld_comment = isset( $prop['comment'] ); - $fld_parsedcomment = isset ( $prop['parsedcomment'] ); + $fld_parsedcomment = isset( $prop['parsedcomment'] ); $fld_minor = isset( $prop['minor'] ); $fld_len = isset( $prop['len'] ); $fld_sha1 = isset( $prop['sha1'] ); diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 33b70a43ed..eaa2b47550 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -49,12 +49,12 @@ class ApiQueryLogEvents extends ApiQueryBase { $this->fld_ids = isset( $prop['ids'] ); $this->fld_title = isset( $prop['title'] ); $this->fld_type = isset( $prop['type'] ); - $this->fld_action = isset ( $prop['action'] ); + $this->fld_action = isset( $prop['action'] ); $this->fld_user = isset( $prop['user'] ); $this->fld_userid = isset( $prop['userid'] ); $this->fld_timestamp = isset( $prop['timestamp'] ); $this->fld_comment = isset( $prop['comment'] ); - $this->fld_parsedcomment = isset ( $prop['parsedcomment'] ); + $this->fld_parsedcomment = isset( $prop['parsedcomment'] ); $this->fld_details = isset( $prop['details'] ); $this->fld_tags = isset( $prop['tags'] ); diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 317b7ba57c..1d86c97eab 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -146,17 +146,17 @@ class ApiQueryRevisions extends ApiQueryBase { $prop = array_flip( $params['prop'] ); // Optional fields - $this->fld_ids = isset ( $prop['ids'] ); + $this->fld_ids = isset( $prop['ids'] ); // $this->addFieldsIf('rev_text_id', $this->fld_ids); // should this be exposed? - $this->fld_flags = isset ( $prop['flags'] ); - $this->fld_timestamp = isset ( $prop['timestamp'] ); - $this->fld_comment = isset ( $prop['comment'] ); - $this->fld_parsedcomment = isset ( $prop['parsedcomment'] ); - $this->fld_size = isset ( $prop['size'] ); - $this->fld_sha1 = isset ( $prop['sha1'] ); - $this->fld_contentmodel = isset ( $prop['contentmodel'] ); + $this->fld_flags = isset( $prop['flags'] ); + $this->fld_timestamp = isset( $prop['timestamp'] ); + $this->fld_comment = isset( $prop['comment'] ); + $this->fld_parsedcomment = isset( $prop['parsedcomment'] ); + $this->fld_size = isset( $prop['size'] ); + $this->fld_sha1 = isset( $prop['sha1'] ); + $this->fld_contentmodel = isset( $prop['contentmodel'] ); $this->fld_userid = isset( $prop['userid'] ); - $this->fld_user = isset ( $prop['user'] ); + $this->fld_user = isset( $prop['user'] ); $this->token = $params['token']; if ( !empty( $params['contentformat'] ) ) { diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index df278c2d77..1e013eb3bd 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -48,7 +48,7 @@ class ApiQueryContributions extends ApiQueryBase { $this->fld_ids = isset( $prop['ids'] ); $this->fld_title = isset( $prop['title'] ); $this->fld_comment = isset( $prop['comment'] ); - $this->fld_parsedcomment = isset ( $prop['parsedcomment'] ); + $this->fld_parsedcomment = isset( $prop['parsedcomment'] ); $this->fld_size = isset( $prop['size'] ); $this->fld_sizediff = isset( $prop['sizediff'] ); $this->fld_flags = isset( $prop['flags'] ); diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index 491d20f2ba..3ee15f638a 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -68,7 +68,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { $this->fld_user = isset( $prop['user'] ); $this->fld_userid = isset( $prop['userid'] ); $this->fld_comment = isset( $prop['comment'] ); - $this->fld_parsedcomment = isset ( $prop['parsedcomment'] ); + $this->fld_parsedcomment = isset( $prop['parsedcomment'] ); $this->fld_timestamp = isset( $prop['timestamp'] ); $this->fld_sizes = isset( $prop['sizes'] ); $this->fld_patrol = isset( $prop['patrol'] ); @@ -143,12 +143,11 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { $show = array_flip( $params['show'] ); /* Check for conflicting parameters. */ - if ( ( isset ( $show['minor'] ) && isset ( $show['!minor'] ) ) - || ( isset ( $show['bot'] ) && isset ( $show['!bot'] ) ) - || ( isset ( $show['anon'] ) && isset ( $show['!anon'] ) ) - || ( isset ( $show['patrolled'] ) && isset ( $show['!patrolled'] ) ) - ) - { + if ( ( isset( $show['minor'] ) && isset( $show['!minor'] ) ) + || ( isset( $show['bot'] ) && isset( $show['!bot'] ) ) + || ( isset( $show['anon'] ) && isset( $show['!anon'] ) ) + || ( isset( $show['patrolled'] ) && isset( $show['!patrolled'] ) ) + ) { $this->dieUsageMsg( 'show' ); } diff --git a/includes/media/Exif.php b/includes/media/Exif.php index 6058f45699..d7c45d3871 100644 --- a/includes/media/Exif.php +++ b/includes/media/Exif.php @@ -394,7 +394,7 @@ class Exif { //ComponentsConfiguration should really be an array instead of a string... //This turns a string of binary numbers into an array of numbers. - if ( isset ( $this->mFilteredExifData['ComponentsConfiguration'] ) ) { + if ( isset( $this->mFilteredExifData['ComponentsConfiguration'] ) ) { $val = $this->mFilteredExifData['ComponentsConfiguration']; $ccVals = array(); for ( $i = 0; $i < strlen( $val ); $i++ ) { @@ -411,7 +411,7 @@ class Exif { //Also change exif tag name from GPSVersion (what php exif thinks it is) //to GPSVersionID (what the exif standard thinks it is). - if ( isset ( $this->mFilteredExifData['GPSVersion'] ) ) { + if ( isset( $this->mFilteredExifData['GPSVersion'] ) ) { $val = $this->mFilteredExifData['GPSVersion']; $newVal = ''; for ( $i = 0; $i < strlen( $val ); $i++ ) { @@ -758,7 +758,7 @@ class Exif { return true; } // Does not work if not typecast - switch( (string)$etype ) { + switch ( (string)$etype ) { case (string)Exif::BYTE: $this->debug( $val, __FUNCTION__, $debug ); return $this->isByte( $val ); diff --git a/includes/parser/DateFormatter.php b/includes/parser/DateFormatter.php index c5dd09b7d7..0a69b04518 100644 --- a/includes/parser/DateFormatter.php +++ b/includes/parser/DateFormatter.php @@ -156,10 +156,10 @@ class DateFormatter { } for ( $i = 1; $i <= self::LAST; $i++ ) { $this->mSource = $i; - if ( isset ( $this->rules[$preference][$i] ) ) { + if ( isset( $this->rules[$preference][$i] ) ) { # Specific rules $this->mTarget = $this->rules[$preference][$i]; - } elseif ( isset ( $this->rules[self::ALL][$i] ) ) { + } elseif ( isset( $this->rules[self::ALL][$i] ) ) { # General rules $this->mTarget = $this->rules[self::ALL][$i]; } elseif ( $preference ) { @@ -357,7 +357,7 @@ class DateFormatter { */ function makeNormalYear( $iso ) { if ( $iso[0] == '-' ) { - $text = (intval( substr( $iso, 1 ) ) + 1) . ' BC'; + $text = ( intval( substr( $iso, 1 ) ) + 1 ) . ' BC'; } else { $text = intval( $iso ); } diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index b01058ac7c..c257dd4a4f 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -515,9 +515,9 @@ class SpecialVersion extends SpecialPage { } # Make description text. - $description = isset ( $extension['description'] ) ? $extension['description'] : ''; + $description = isset( $extension['description'] ) ? $extension['description'] : ''; - if ( isset ( $extension['descriptionmsg'] ) ) { + if ( isset( $extension['descriptionmsg'] ) ) { # Look for a localized description. $descriptionMsg = $extension['descriptionmsg']; @@ -540,7 +540,7 @@ class SpecialVersion extends SpecialPage { $mainLink $versionText"; } - $author = isset ( $extension['author'] ) ? $extension['author'] : array(); + $author = isset( $extension['author'] ) ? $extension['author'] : array(); $extDescAuthor = "$description " . $this->listAuthors( $author, false ) . " \n"; diff --git a/tests/RunSeleniumTests.php b/tests/RunSeleniumTests.php index b7320cb120..964b7d67ed 100644 --- a/tests/RunSeleniumTests.php +++ b/tests/RunSeleniumTests.php @@ -108,7 +108,7 @@ class SeleniumTester extends Maintenance { } protected function stopServer() { - if ( !isset ( $this->serverManager ) ) { + if ( !isset( $this->serverManager ) ) { echo ( "Warning: Request to stop Selenium Server, but it was " . "not stared by RunSeleniumTests\n" . "RunSeleniumTests cannot stop a Selenium Server it " . diff --git a/tests/testHelpers.inc b/tests/testHelpers.inc index 4c778f6ebc..88e5885b45 100644 --- a/tests/testHelpers.inc +++ b/tests/testHelpers.inc @@ -510,7 +510,7 @@ class TestFileIterator implements Iterator { return true; } - if ( isset ( $this->sectionData[$this->section] ) ) { + if ( isset( $this->sectionData[$this->section] ) ) { throw new MWException( "duplicate section '$this->section' at line {$this->lineNum} of $this->file\n" ); } -- 2.20.1