[MediaWiki-commits] [Gerrit] Enable PHPCS' Squiz.ControlStructures.ControlSignature.Space... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Enable PHPCS' Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace .. Enable PHPCS' Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace Not much left for this sniff. Change-Id: Icb7464e1c3b7cd237c54c5f01356b983172379ef --- M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php M lib/includes/LanguageNameLookup.php M lib/includes/serializers/AliasSerializer.php M lib/includes/serializers/ByPropertyListSerializer.php M lib/includes/serializers/ClaimSerializer.php M lib/includes/serializers/SiteLinkSerializer.php M lib/includes/serializers/SnakSerializer.php M lib/includes/store/EntityContentDataCodec.php M phpcs.xml M repo/Wikibase.hooks.php M repo/includes/BabelUserLanguageLookup.php M repo/includes/EntityParserOutputGenerator.php M repo/includes/SummaryFormatter.php M repo/includes/actions/HistoryEntityAction.php M repo/includes/api/EditEntity.php M repo/includes/api/LinkTitles.php M repo/includes/api/ParseValue.php M repo/includes/specials/SpecialItemDisambiguation.php M repo/includes/specials/SpecialModifyEntity.php M repo/includes/specials/SpecialSetSiteLink.php M repo/tests/phpunit/includes/SummaryFormatterTest.php M repo/tests/phpunit/includes/api/CreateClaimTest.php M repo/tests/phpunit/includes/api/RemoveQualifiersTest.php M repo/tests/phpunit/includes/api/RemoveReferencesTest.php M repo/tests/phpunit/includes/api/SetReferenceTest.php 25 files changed, 47 insertions(+), 80 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php index 75bddd4..394d2a3 100644 --- a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php +++ b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php @@ -253,14 +253,13 @@ */ public function getEntity( $prefixedEntityId ) { $this->checkType( 'getEntity', 1, $prefixedEntityId, 'string' ); + try { $entityArr = $this->getEntityAccessor()->getEntity( $prefixedEntityId ); return array( $entityArr ); - } - catch ( EntityIdParsingException $e ) { + } catch ( EntityIdParsingException $ex ) { throw new ScribuntoException( 'wikibase-error-invalid-entity-id' ); - } - catch ( \Exception $e ) { + } catch ( Exception $ex ) { throw new ScribuntoException( 'wikibase-error-serialize-error' ); } } @@ -407,4 +406,5 @@ public function getUserLang() { return array( $this->getLuaBindings()->getUserLang() ); } + } diff --git a/lib/includes/LanguageNameLookup.php b/lib/includes/LanguageNameLookup.php index 26341fc..f758f8e 100644 --- a/lib/includes/LanguageNameLookup.php +++ b/lib/includes/LanguageNameLookup.php @@ -33,8 +33,7 @@ if ( isset( $inLanguage ) ) { $inLanguage = str_replace( '_', '-', $inLanguage ); $languageName = Language::fetchLanguageName( $languageCode, $inLanguage ); - } - else { + } else { $languageName = Language::fetchLanguageName( $languageCode ); } diff --git a/lib/includes/serializers/AliasSerializer.php b/lib/includes/serializers/AliasSerializer.php index 8fef354..e4969ae 100644 --- a/lib/includes/serializers/AliasSerializer.php +++ b/lib/includes/serializers/AliasSerializer.php @@ -50,8 +50,7 @@ } $value[$languageCode] = $arr; } - } - else { + } else { foreach ( $aliases as $languageCode => $alarr ) { foreach ( $alarr as $alias ) { if ( $alias === '' ) { diff --git a/lib/includes/serializers/ByPropertyListSerializer.php b/lib/includes/serializers/ByPropertyListSerializer.php index 2ae0aab..1b585d3 100644 --- a/lib/includes/serializers/ByPropertyListSerializer.php +++ b/lib/includes/serializers/ByPropertyListSerializer.php @@ -80,8 +80,7 @@ if ( $this->options->shouldIndexTags() ) { $serializedObjects['id'] = $propertyId->getSerialization(); $serialization[] = $serializedObjects; - } - else { + } else { $key = $propertyId->getSerialization(); if ( $this->getOptions()->shouldUseUpperCaseIdsAsKey
[MediaWiki-commits] [Gerrit] Enable PHPCS' Squiz.ControlStructures.ControlSignature.Space... - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/224951 Change subject: Enable PHPCS' Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace .. Enable PHPCS' Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace Not much left for this sniff. Change-Id: Icb7464e1c3b7cd237c54c5f01356b983172379ef --- M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php M lib/includes/LanguageNameLookup.php M lib/includes/serializers/AliasSerializer.php M lib/includes/serializers/ByPropertyListSerializer.php M lib/includes/serializers/ClaimSerializer.php M lib/includes/serializers/SiteLinkSerializer.php M lib/includes/serializers/SnakSerializer.php M lib/includes/store/EntityContentDataCodec.php M phpcs.xml M repo/Wikibase.hooks.php M repo/includes/BabelUserLanguageLookup.php M repo/includes/EntityParserOutputGenerator.php M repo/includes/SummaryFormatter.php M repo/includes/actions/HistoryEntityAction.php M repo/includes/api/EditEntity.php M repo/includes/api/LinkTitles.php M repo/includes/api/ParseValue.php M repo/includes/specials/SpecialItemDisambiguation.php M repo/includes/specials/SpecialModifyEntity.php M repo/includes/specials/SpecialSetSiteLink.php M repo/tests/phpunit/includes/SummaryFormatterTest.php M repo/tests/phpunit/includes/api/CreateClaimTest.php M repo/tests/phpunit/includes/api/RemoveQualifiersTest.php M repo/tests/phpunit/includes/api/RemoveReferencesTest.php M repo/tests/phpunit/includes/api/SetReferenceTest.php 25 files changed, 47 insertions(+), 80 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/51/224951/1 diff --git a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php index 75bddd4..394d2a3 100644 --- a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php +++ b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php @@ -253,14 +253,13 @@ */ public function getEntity( $prefixedEntityId ) { $this->checkType( 'getEntity', 1, $prefixedEntityId, 'string' ); + try { $entityArr = $this->getEntityAccessor()->getEntity( $prefixedEntityId ); return array( $entityArr ); - } - catch ( EntityIdParsingException $e ) { + } catch ( EntityIdParsingException $ex ) { throw new ScribuntoException( 'wikibase-error-invalid-entity-id' ); - } - catch ( \Exception $e ) { + } catch ( Exception $ex ) { throw new ScribuntoException( 'wikibase-error-serialize-error' ); } } @@ -407,4 +406,5 @@ public function getUserLang() { return array( $this->getLuaBindings()->getUserLang() ); } + } diff --git a/lib/includes/LanguageNameLookup.php b/lib/includes/LanguageNameLookup.php index 26341fc..f758f8e 100644 --- a/lib/includes/LanguageNameLookup.php +++ b/lib/includes/LanguageNameLookup.php @@ -33,8 +33,7 @@ if ( isset( $inLanguage ) ) { $inLanguage = str_replace( '_', '-', $inLanguage ); $languageName = Language::fetchLanguageName( $languageCode, $inLanguage ); - } - else { + } else { $languageName = Language::fetchLanguageName( $languageCode ); } diff --git a/lib/includes/serializers/AliasSerializer.php b/lib/includes/serializers/AliasSerializer.php index 8fef354..e4969ae 100644 --- a/lib/includes/serializers/AliasSerializer.php +++ b/lib/includes/serializers/AliasSerializer.php @@ -50,8 +50,7 @@ } $value[$languageCode] = $arr; } - } - else { + } else { foreach ( $aliases as $languageCode => $alarr ) { foreach ( $alarr as $alias ) { if ( $alias === '' ) { diff --git a/lib/includes/serializers/ByPropertyListSerializer.php b/lib/includes/serializers/ByPropertyListSerializer.php index 2ae0aab..1b585d3 100644 --- a/lib/includes/serializers/ByPropertyListSerializer.php +++ b/lib/includes/serializers/ByPropertyListSerializer.php @@ -80,8 +80,7 @@ if ( $this->options->shouldIndexTags() ) { $serializedObjects['id'] = $propertyId->getSerialization(); $serialization[] = $serializedObjects; - } - else { + } else { $key = $propertyId->getSerialization();