Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/225215
Change subject: Enable PHPCS sniff Squiz.WhiteSpace.FunctionSpacing.After ...................................................................... Enable PHPCS sniff Squiz.WhiteSpace.FunctionSpacing.After I did not touched anything in this patch except newlines. Some are added, some are removed. Change-Id: I33f88d31605be81c9990e0b1f1afe4e7fae13800 --- M client/includes/CachingOtherProjectsSitesProvider.php M client/includes/Changes/WikiPageUpdater.php M client/includes/DataAccess/PropertyIdResolver.php M client/includes/DataAccess/PropertyParserFunction/Runner.php M client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php M client/includes/DataAccess/SnaksFinder.php M client/includes/UpdateRepo/UpdateRepoOnDelete.php M client/includes/UpdateRepo/UpdateRepoOnMove.php M client/includes/Usage/PageEntityUsages.php M client/includes/modules/SiteModule.php M client/includes/specials/SpecialUnconnectedPages.php M client/includes/store/sql/DirectSqlStore.php M client/tests/phpunit/includes/CachingOtherProjectsSitesProviderTest.php M client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php M client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php M client/tests/phpunit/includes/Usage/UsageTrackingIntegrationTest.php M lib/includes/ReferencedEntitiesFinder.php M lib/includes/Reporting/MessageReporter.php M lib/includes/Reporting/ReportingExceptionHandler.php M lib/includes/Reporting/RethrowingExceptionHandler.php M lib/includes/changes/DiffChange.php M lib/includes/changes/ItemChange.php M lib/includes/formatters/EntityLabelUnitFormatter.php M lib/includes/formatters/PropertyValueSnakFormatter.php M lib/includes/formatters/WikibaseValueFormatterBuilders.php M lib/includes/serializers/DispatchingEntitySerializer.php M lib/includes/store/EntityInfoBuilder.php M lib/includes/store/EntityStore.php M lib/includes/store/LanguageLabelDescriptionLookup.php M lib/includes/store/sql/SiteLinkTable.php M lib/tests/phpunit/ClaimGuidValidatorTest.php M lib/tests/phpunit/LanguageFallbackChainFactoryTest.php M lib/tests/phpunit/MockRepository.php M lib/tests/phpunit/WikibaseContentLanguagesTest.php M lib/tests/phpunit/formatters/DispatchingSnakFormatterTest.php M lib/tests/phpunit/formatters/DispatchingValueFormatterTest.php M lib/tests/phpunit/formatters/GlobeCoordinateDetailsFormatterTest.php M lib/tests/phpunit/formatters/HtmlUrlFormatterTest.php M lib/tests/phpunit/formatters/QuantityDetailsFormatterTest.php M lib/tests/phpunit/serializers/AliasSerializerTest.php M lib/tests/phpunit/serializers/DescriptionSerializerTest.php M lib/tests/phpunit/serializers/LabelSerializerTest.php M lib/tests/phpunit/store/CachingSiteLinkLookupTest.php M lib/tests/phpunit/store/EntityRedirectResolvingDecoratorTest.php M lib/tests/phpunit/store/LanguageLabelDescriptionLookupTest.php M phpcs.xml M purtle/src/N3RdfWriterBase.php M purtle/src/NTriplesRdfWriter.php M purtle/src/RdfWriter.php M purtle/src/TurtleRdfWriter.php M purtle/src/XmlRdfWriter.php M purtle/tests/phpunit/NTriplesRdfWriterTest.php M purtle/tests/phpunit/RdfWriterFactoryTest.php M purtle/tests/phpunit/TurtleRdfWriterTest.php M purtle/tests/phpunit/XmlRdfWriterTest.php M repo/includes/ChangeOp/ChangeOpFactoryProvider.php M repo/includes/ChangeOp/ChangeOpStatementRank.php M repo/includes/ChangeOp/ChangeOpValidationException.php M repo/includes/Diff/EntityDiffVisualizer.php M repo/includes/EntityParserOutputGenerator.php M repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php M repo/includes/IO/EntityIdReader.php M repo/includes/Validators/UniquenessViolation.php M repo/includes/api/ItemByTitleHelper.php M repo/includes/rdf/RdfBuilder.php M repo/includes/specials/SpecialEntitiesWithoutPage.php M repo/maintenance/dumpJson.php M repo/maintenance/rebuildItemsPerSite.php M repo/tests/phpunit/includes/ChangeOp/StatementChangeOpFactoryTest.php M repo/tests/phpunit/includes/Diff/DiffOpValueFormatterTest.php M repo/tests/phpunit/includes/Diff/DifferencesSnakVisualizerTest.php M repo/tests/phpunit/includes/EditEntityTest.php M repo/tests/phpunit/includes/Hooks/OutputPageBeforeHTMLHookHandlerTest.php M repo/tests/phpunit/includes/Hooks/OutputPageEntityIdReaderTest.php M repo/tests/phpunit/includes/IO/EntityIdReaderTest.php M repo/tests/phpunit/includes/LinkedData/EntityDataFormatProviderTest.php M repo/tests/phpunit/includes/LinkedData/EntityDataUriManagerTest.php M repo/tests/phpunit/includes/Validators/SnakValidatorTest.php M repo/tests/phpunit/includes/Validators/TestValidator.php M repo/tests/phpunit/includes/ValueParserFactoryTest.php M repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php M repo/tests/phpunit/includes/api/EntityTestHelper.php M repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php M repo/tests/phpunit/includes/api/SetQualifierTest.php M repo/tests/phpunit/includes/content/EntityContentTest.php M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php M view/src/EditSectionGenerator.php M view/tests/phpunit/Template/TemplateRegistryTest.php 88 files changed, 66 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/15/225215/1 diff --git a/client/includes/CachingOtherProjectsSitesProvider.php b/client/includes/CachingOtherProjectsSitesProvider.php index 9c1e00d..b610381 100644 --- a/client/includes/CachingOtherProjectsSitesProvider.php +++ b/client/includes/CachingOtherProjectsSitesProvider.php @@ -82,4 +82,5 @@ $settingsHash = sha1( implode( '|', $siteLinkGroups ) ); return wfMemcKey( 'OtherProjectsSites', $settingsHash ); } + } diff --git a/client/includes/Changes/WikiPageUpdater.php b/client/includes/Changes/WikiPageUpdater.php index 8c60b05..7c215ce 100644 --- a/client/includes/Changes/WikiPageUpdater.php +++ b/client/includes/Changes/WikiPageUpdater.php @@ -95,4 +95,5 @@ $rc->save(); } } + } diff --git a/client/includes/DataAccess/PropertyIdResolver.php b/client/includes/DataAccess/PropertyIdResolver.php index 2b93995..4478fc6 100644 --- a/client/includes/DataAccess/PropertyIdResolver.php +++ b/client/includes/DataAccess/PropertyIdResolver.php @@ -91,4 +91,5 @@ return $propertyId; } + } diff --git a/client/includes/DataAccess/PropertyParserFunction/Runner.php b/client/includes/DataAccess/PropertyParserFunction/Runner.php index bb61604..e553ccf 100644 --- a/client/includes/DataAccess/PropertyParserFunction/Runner.php +++ b/client/includes/DataAccess/PropertyParserFunction/Runner.php @@ -158,4 +158,5 @@ $runner = WikibaseClient::getDefaultInstance()->getPropertyParserFunctionRunner(); return $runner->runPropertyParserFunction( $parser, $frame, $args ); } + } diff --git a/client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php b/client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php index 3420434..7d97393 100644 --- a/client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php +++ b/client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php @@ -218,4 +218,5 @@ // already splits the cache (which also is an intended side effect here). return $this->parserOptions->getUserLang(); } + } diff --git a/client/includes/DataAccess/SnaksFinder.php b/client/includes/DataAccess/SnaksFinder.php index 8e44af8..851b2d7 100644 --- a/client/includes/DataAccess/SnaksFinder.php +++ b/client/includes/DataAccess/SnaksFinder.php @@ -44,4 +44,5 @@ ->getStatements() ->getByPropertyId( $propertyId ); } + } diff --git a/client/includes/UpdateRepo/UpdateRepoOnDelete.php b/client/includes/UpdateRepo/UpdateRepoOnDelete.php index 84ae7b5..5d75347 100644 --- a/client/includes/UpdateRepo/UpdateRepoOnDelete.php +++ b/client/includes/UpdateRepo/UpdateRepoOnDelete.php @@ -34,4 +34,5 @@ 'user' => $this->user->getName() ); } + } diff --git a/client/includes/UpdateRepo/UpdateRepoOnMove.php b/client/includes/UpdateRepo/UpdateRepoOnMove.php index 319f249..272ca41 100644 --- a/client/includes/UpdateRepo/UpdateRepoOnMove.php +++ b/client/includes/UpdateRepo/UpdateRepoOnMove.php @@ -63,4 +63,5 @@ 'user' => $this->user->getName() ); } + } diff --git a/client/includes/Usage/PageEntityUsages.php b/client/includes/Usage/PageEntityUsages.php index c1c8158..4f1b276 100644 --- a/client/includes/Usage/PageEntityUsages.php +++ b/client/includes/Usage/PageEntityUsages.php @@ -134,7 +134,6 @@ return true; } - /** * Returns all entities used on the page represented by this PageEntityUsages object. * diff --git a/client/includes/modules/SiteModule.php b/client/includes/modules/SiteModule.php index cefbe78..b099fd7 100644 --- a/client/includes/modules/SiteModule.php +++ b/client/includes/modules/SiteModule.php @@ -46,4 +46,5 @@ return 'mediaWiki.config.set( "wbCurrentSite", ' . \FormatJson::encode( $currentSite ) . ' );'; } + } diff --git a/client/includes/specials/SpecialUnconnectedPages.php b/client/includes/specials/SpecialUnconnectedPages.php index 29e1c6a..8dc4b85 100644 --- a/client/includes/specials/SpecialUnconnectedPages.php +++ b/client/includes/specials/SpecialUnconnectedPages.php @@ -60,7 +60,6 @@ return false; } - /** * @since 0.4 * diff --git a/client/includes/store/sql/DirectSqlStore.php b/client/includes/store/sql/DirectSqlStore.php index 010b1a7..dc4f311 100644 --- a/client/includes/store/sql/DirectSqlStore.php +++ b/client/includes/store/sql/DirectSqlStore.php @@ -463,4 +463,5 @@ return $this->entityPrefetcher; } + } diff --git a/client/tests/phpunit/includes/CachingOtherProjectsSitesProviderTest.php b/client/tests/phpunit/includes/CachingOtherProjectsSitesProviderTest.php index e874ccb..77a7bb8 100644 --- a/client/tests/phpunit/includes/CachingOtherProjectsSitesProviderTest.php +++ b/client/tests/phpunit/includes/CachingOtherProjectsSitesProviderTest.php @@ -52,4 +52,5 @@ $cachingOtherProjectsSitesProvider->getOtherProjectsSiteIds( array( 'wikivoyage', 'commons' ) ) ); } + } diff --git a/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php b/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php index f3ebdd9..0abe08f 100644 --- a/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php +++ b/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php @@ -234,4 +234,5 @@ return $item; } + } diff --git a/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php b/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php index 9714f65..e76a546 100644 --- a/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php +++ b/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php @@ -121,4 +121,5 @@ return $lookup; } + } diff --git a/client/tests/phpunit/includes/Usage/UsageTrackingIntegrationTest.php b/client/tests/phpunit/includes/Usage/UsageTrackingIntegrationTest.php index 11f38e3..02914f4 100644 --- a/client/tests/phpunit/includes/Usage/UsageTrackingIntegrationTest.php +++ b/client/tests/phpunit/includes/Usage/UsageTrackingIntegrationTest.php @@ -234,4 +234,5 @@ sort( $strings ); return $strings; } + } diff --git a/lib/includes/ReferencedEntitiesFinder.php b/lib/includes/ReferencedEntitiesFinder.php index f71a411..02b2bb2 100644 --- a/lib/includes/ReferencedEntitiesFinder.php +++ b/lib/includes/ReferencedEntitiesFinder.php @@ -94,5 +94,4 @@ } } - } diff --git a/lib/includes/Reporting/MessageReporter.php b/lib/includes/Reporting/MessageReporter.php index d739051..6eb5c26 100644 --- a/lib/includes/Reporting/MessageReporter.php +++ b/lib/includes/Reporting/MessageReporter.php @@ -18,4 +18,5 @@ * @param string $message */ public function reportMessage( $message ); + } diff --git a/lib/includes/Reporting/ReportingExceptionHandler.php b/lib/includes/Reporting/ReportingExceptionHandler.php index 2157121..1b3c5f8 100644 --- a/lib/includes/Reporting/ReportingExceptionHandler.php +++ b/lib/includes/Reporting/ReportingExceptionHandler.php @@ -36,4 +36,5 @@ $msg = '[' . $errorCode . ']: ' . $explanation . ' (' . $msg . ')'; $this->reporter->reportMessage( $msg ); } + } diff --git a/lib/includes/Reporting/RethrowingExceptionHandler.php b/lib/includes/Reporting/RethrowingExceptionHandler.php index 09827e8..93c5f7d 100644 --- a/lib/includes/Reporting/RethrowingExceptionHandler.php +++ b/lib/includes/Reporting/RethrowingExceptionHandler.php @@ -26,4 +26,5 @@ public function handleException( Exception $exception, $errorCode, $explanation ) { throw $exception; } + } diff --git a/lib/includes/changes/DiffChange.php b/lib/includes/changes/DiffChange.php index 08fb037..3c12445 100644 --- a/lib/includes/changes/DiffChange.php +++ b/lib/includes/changes/DiffChange.php @@ -173,4 +173,5 @@ public function objectifyArrays( array $data ) { return $data; // noop } + } diff --git a/lib/includes/changes/ItemChange.php b/lib/includes/changes/ItemChange.php index 303814a..a4683fa 100644 --- a/lib/includes/changes/ItemChange.php +++ b/lib/includes/changes/ItemChange.php @@ -37,4 +37,5 @@ return $diff->getSiteLinkDiff(); } } + } diff --git a/lib/includes/formatters/EntityLabelUnitFormatter.php b/lib/includes/formatters/EntityLabelUnitFormatter.php index d920cf3..53fcd4a 100644 --- a/lib/includes/formatters/EntityLabelUnitFormatter.php +++ b/lib/includes/formatters/EntityLabelUnitFormatter.php @@ -90,4 +90,5 @@ return "$numberText $unit"; } } + } diff --git a/lib/includes/formatters/PropertyValueSnakFormatter.php b/lib/includes/formatters/PropertyValueSnakFormatter.php index b0892cc..ba7021f 100644 --- a/lib/includes/formatters/PropertyValueSnakFormatter.php +++ b/lib/includes/formatters/PropertyValueSnakFormatter.php @@ -225,7 +225,6 @@ return $warning; } - /** * @param Message $warning * diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php b/lib/includes/formatters/WikibaseValueFormatterBuilders.php index a227450..84b2916 100644 --- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php +++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php @@ -439,7 +439,6 @@ return $widgetFormatters; } - /** * Returns a full set of formatters for generating HTML for use in diffs. * If there are formatters defined for HTML that are not defined for diffs, diff --git a/lib/includes/serializers/DispatchingEntitySerializer.php b/lib/includes/serializers/DispatchingEntitySerializer.php index 8aac946..028b087 100644 --- a/lib/includes/serializers/DispatchingEntitySerializer.php +++ b/lib/includes/serializers/DispatchingEntitySerializer.php @@ -102,4 +102,5 @@ return $this->unserializers[$entityType]; } + } diff --git a/lib/includes/store/EntityInfoBuilder.php b/lib/includes/store/EntityInfoBuilder.php index 990c81f..c4d063a 100644 --- a/lib/includes/store/EntityInfoBuilder.php +++ b/lib/includes/store/EntityInfoBuilder.php @@ -100,4 +100,5 @@ * @param EntityId[] $ids */ public function retainEntityInfo( array $ids ); + } diff --git a/lib/includes/store/EntityStore.php b/lib/includes/store/EntityStore.php index 00cd4e2..93b274e 100644 --- a/lib/includes/store/EntityStore.php +++ b/lib/includes/store/EntityStore.php @@ -136,4 +136,5 @@ * @return bool */ public function isWatching( User $user, EntityId $id ); + } diff --git a/lib/includes/store/LanguageLabelDescriptionLookup.php b/lib/includes/store/LanguageLabelDescriptionLookup.php index 77d95d1..5746b4b 100644 --- a/lib/includes/store/LanguageLabelDescriptionLookup.php +++ b/lib/includes/store/LanguageLabelDescriptionLookup.php @@ -55,4 +55,5 @@ $text = $this->termLookup->getDescription( $entityId, $this->languageCode ); return new Term( $this->languageCode, $text ); } + } diff --git a/lib/includes/store/sql/SiteLinkTable.php b/lib/includes/store/sql/SiteLinkTable.php index 3d89cf0..f34516f 100644 --- a/lib/includes/store/sql/SiteLinkTable.php +++ b/lib/includes/store/sql/SiteLinkTable.php @@ -162,7 +162,6 @@ return $success; } - /** * Internal callback for deleting a list of links. * @@ -200,7 +199,6 @@ return $success; } - /** * @see SiteLinkStore::deleteLinksOfItem diff --git a/lib/tests/phpunit/ClaimGuidValidatorTest.php b/lib/tests/phpunit/ClaimGuidValidatorTest.php index 3c950ce..98fb484 100644 --- a/lib/tests/phpunit/ClaimGuidValidatorTest.php +++ b/lib/tests/phpunit/ClaimGuidValidatorTest.php @@ -115,4 +115,5 @@ array( 'a060$5083E43C-228B-4E3E-B82A-4CB20A22A3FB' ) ); } + } diff --git a/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php b/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php index 4874e3d..bb348f7 100644 --- a/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php +++ b/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php @@ -406,4 +406,5 @@ array( true, false, 'experimental, not anon cached page view' ) ); } + } diff --git a/lib/tests/phpunit/MockRepository.php b/lib/tests/phpunit/MockRepository.php index 3ff06c3..18b83cf 100644 --- a/lib/tests/phpunit/MockRepository.php +++ b/lib/tests/phpunit/MockRepository.php @@ -876,4 +876,5 @@ return false; } + } diff --git a/lib/tests/phpunit/WikibaseContentLanguagesTest.php b/lib/tests/phpunit/WikibaseContentLanguagesTest.php index 1905f02..5c071a6 100644 --- a/lib/tests/phpunit/WikibaseContentLanguagesTest.php +++ b/lib/tests/phpunit/WikibaseContentLanguagesTest.php @@ -28,4 +28,5 @@ array_intersect( $knownLangCodes, $result ) ); } + } diff --git a/lib/tests/phpunit/formatters/DispatchingSnakFormatterTest.php b/lib/tests/phpunit/formatters/DispatchingSnakFormatterTest.php index 70b4fb8..73bd3bd 100644 --- a/lib/tests/phpunit/formatters/DispatchingSnakFormatterTest.php +++ b/lib/tests/phpunit/formatters/DispatchingSnakFormatterTest.php @@ -84,7 +84,6 @@ $this->assertEquals( $value->text(), $formatter->formatSnak( $valueSnak ) ); } - public function testGetSnakTypes() { $novalue = wfMessage( 'wikibase-snakview-snaktypeselector-novalue' ); $somevalue = wfMessage( 'wikibase-snakview-snaktypeselector-somevalue' ); diff --git a/lib/tests/phpunit/formatters/DispatchingValueFormatterTest.php b/lib/tests/phpunit/formatters/DispatchingValueFormatterTest.php index 1842381..286c6fb 100644 --- a/lib/tests/phpunit/formatters/DispatchingValueFormatterTest.php +++ b/lib/tests/phpunit/formatters/DispatchingValueFormatterTest.php @@ -138,4 +138,5 @@ ), ); } + } diff --git a/lib/tests/phpunit/formatters/GlobeCoordinateDetailsFormatterTest.php b/lib/tests/phpunit/formatters/GlobeCoordinateDetailsFormatterTest.php index a37bf07..ae908c5 100644 --- a/lib/tests/phpunit/formatters/GlobeCoordinateDetailsFormatterTest.php +++ b/lib/tests/phpunit/formatters/GlobeCoordinateDetailsFormatterTest.php @@ -60,4 +60,5 @@ $this->setExpectedException( 'InvalidArgumentException' ); $formatter->format( $value ); } + } diff --git a/lib/tests/phpunit/formatters/HtmlUrlFormatterTest.php b/lib/tests/phpunit/formatters/HtmlUrlFormatterTest.php index f0df6aa..62aa4d0 100644 --- a/lib/tests/phpunit/formatters/HtmlUrlFormatterTest.php +++ b/lib/tests/phpunit/formatters/HtmlUrlFormatterTest.php @@ -49,4 +49,5 @@ $this->setExpectedException( 'InvalidArgumentException' ); $formatter->format( $value ); } + } diff --git a/lib/tests/phpunit/formatters/QuantityDetailsFormatterTest.php b/lib/tests/phpunit/formatters/QuantityDetailsFormatterTest.php index 85d4222..93b6050 100644 --- a/lib/tests/phpunit/formatters/QuantityDetailsFormatterTest.php +++ b/lib/tests/phpunit/formatters/QuantityDetailsFormatterTest.php @@ -69,4 +69,5 @@ $this->setExpectedException( 'InvalidArgumentException' ); $formatter->format( $value ); } + } diff --git a/lib/tests/phpunit/serializers/AliasSerializerTest.php b/lib/tests/phpunit/serializers/AliasSerializerTest.php index 71fe87c..430ca95 100644 --- a/lib/tests/phpunit/serializers/AliasSerializerTest.php +++ b/lib/tests/phpunit/serializers/AliasSerializerTest.php @@ -127,4 +127,5 @@ return $data; } + } diff --git a/lib/tests/phpunit/serializers/DescriptionSerializerTest.php b/lib/tests/phpunit/serializers/DescriptionSerializerTest.php index c8d443a..47474d9 100644 --- a/lib/tests/phpunit/serializers/DescriptionSerializerTest.php +++ b/lib/tests/phpunit/serializers/DescriptionSerializerTest.php @@ -290,4 +290,5 @@ array( $descriptions, $serialized2, 'serialization without index tags' ) ); } + } diff --git a/lib/tests/phpunit/serializers/LabelSerializerTest.php b/lib/tests/phpunit/serializers/LabelSerializerTest.php index 6f1b51b..5adb246 100644 --- a/lib/tests/phpunit/serializers/LabelSerializerTest.php +++ b/lib/tests/phpunit/serializers/LabelSerializerTest.php @@ -290,4 +290,5 @@ array( $labels, $serialized2, 'serialization without index tags' ) ); } + } diff --git a/lib/tests/phpunit/store/CachingSiteLinkLookupTest.php b/lib/tests/phpunit/store/CachingSiteLinkLookupTest.php index 9f63cf9..abf4179 100644 --- a/lib/tests/phpunit/store/CachingSiteLinkLookupTest.php +++ b/lib/tests/phpunit/store/CachingSiteLinkLookupTest.php @@ -156,4 +156,5 @@ $cachingSiteLinkLookup->getLinks( array( 1 ), array( 'a' ), array( 'b' ) ) ); } + } diff --git a/lib/tests/phpunit/store/EntityRedirectResolvingDecoratorTest.php b/lib/tests/phpunit/store/EntityRedirectResolvingDecoratorTest.php index 3739cf9..1de7c0f 100644 --- a/lib/tests/phpunit/store/EntityRedirectResolvingDecoratorTest.php +++ b/lib/tests/phpunit/store/EntityRedirectResolvingDecoratorTest.php @@ -91,7 +91,6 @@ $this->assertEquals( $expected, $revision->getEntity()->getId() ); } - public function redirectResolutionFailureProvider() { // Redirects as per $this->getEntityRevision: // Q1 -> Q5 -> Q10 diff --git a/lib/tests/phpunit/store/LanguageLabelDescriptionLookupTest.php b/lib/tests/phpunit/store/LanguageLabelDescriptionLookupTest.php index 960e99c..85daa11 100644 --- a/lib/tests/phpunit/store/LanguageLabelDescriptionLookupTest.php +++ b/lib/tests/phpunit/store/LanguageLabelDescriptionLookupTest.php @@ -120,4 +120,5 @@ return new MockTermIndex( $terms ); } + } diff --git a/phpcs.xml b/phpcs.xml index 8778abf..09478bc 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -52,8 +52,7 @@ <rule ref="PSR2.Methods.MethodDeclaration" /> <rule ref="Squiz.Classes.ValidClassName.NotCamelCaps"> - <!-- FIXME: This indicates an error in the Wikibase codebase that should be fixed. --> - <exclude-pattern>DataAccess*Scribunto*Scribunto_LuaWikibase*Library*\.php</exclude-pattern> + <exclude-pattern>DataAccess*Scribunto*Scribunto_LuaWikibase*Library</exclude-pattern> </rule> <rule ref="Squiz.ControlStructures.ControlSignature" /> <!-- FIXME: This indicates an error in the Wikibase codebase that should be fixed. --> @@ -64,10 +63,6 @@ <properties> <property name="spacing" value="1" /> </properties> - </rule> - <!-- FIXME: This indicates an error in the Wikibase codebase that should be fixed. --> - <rule ref="Squiz.WhiteSpace.FunctionSpacing.After"> - <severity>0</severity> </rule> <rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing" /> <rule ref="Squiz.WhiteSpace.ScopeClosingBrace" /> diff --git a/purtle/src/N3RdfWriterBase.php b/purtle/src/N3RdfWriterBase.php index fe6b97b..1a6527c 100644 --- a/purtle/src/N3RdfWriterBase.php +++ b/purtle/src/N3RdfWriterBase.php @@ -48,7 +48,6 @@ $this->write( "$base:$local" ); } - protected function writeText( $text, $language = null ) { $value = $this->quoter->escapeLiteral( $text ); $this->write( '"' . $value . '"' ); diff --git a/purtle/src/NTriplesRdfWriter.php b/purtle/src/NTriplesRdfWriter.php index df4d385..b02ccba 100644 --- a/purtle/src/NTriplesRdfWriter.php +++ b/purtle/src/NTriplesRdfWriter.php @@ -64,7 +64,6 @@ $this->writeRef( $base, $local ); } - protected function writeText( $text, $language = null ) { $this->writeSubjectAndObject(); $this->write( ' ' ); diff --git a/purtle/src/RdfWriter.php b/purtle/src/RdfWriter.php index a2dab51..5f07405 100644 --- a/purtle/src/RdfWriter.php +++ b/purtle/src/RdfWriter.php @@ -131,7 +131,6 @@ */ public function text( $text, $language = null ); - /** * Produce a typed or untyped literal as the object of a statement. * Can only follow a call to say() or a call to one of is(), text(), or value(). @@ -179,4 +178,5 @@ * @return string a MIME type */ public function getMimeType(); + } diff --git a/purtle/src/TurtleRdfWriter.php b/purtle/src/TurtleRdfWriter.php index 14d953b..c04f315 100644 --- a/purtle/src/TurtleRdfWriter.php +++ b/purtle/src/TurtleRdfWriter.php @@ -108,6 +108,4 @@ return 'text/turtle; charset=UTF-8'; } - - } diff --git a/purtle/src/XmlRdfWriter.php b/purtle/src/XmlRdfWriter.php index e18f33b..87413a2 100644 --- a/purtle/src/XmlRdfWriter.php +++ b/purtle/src/XmlRdfWriter.php @@ -213,5 +213,4 @@ return 'application/rdf+xml; charset=UTF-8'; } - } diff --git a/purtle/tests/phpunit/NTriplesRdfWriterTest.php b/purtle/tests/phpunit/NTriplesRdfWriterTest.php index b3d5f63..893d559 100644 --- a/purtle/tests/phpunit/NTriplesRdfWriterTest.php +++ b/purtle/tests/phpunit/NTriplesRdfWriterTest.php @@ -25,4 +25,5 @@ protected function newWriter() { return new NTriplesRdfWriter(); } + } diff --git a/purtle/tests/phpunit/RdfWriterFactoryTest.php b/purtle/tests/phpunit/RdfWriterFactoryTest.php index 88658a4..d5d1dd1 100644 --- a/purtle/tests/phpunit/RdfWriterFactoryTest.php +++ b/purtle/tests/phpunit/RdfWriterFactoryTest.php @@ -107,4 +107,5 @@ $this->assertInternalType( 'string', $extension ); } } + } diff --git a/purtle/tests/phpunit/TurtleRdfWriterTest.php b/purtle/tests/phpunit/TurtleRdfWriterTest.php index 404c1f1..82d9f78 100644 --- a/purtle/tests/phpunit/TurtleRdfWriterTest.php +++ b/purtle/tests/phpunit/TurtleRdfWriterTest.php @@ -26,4 +26,5 @@ protected function newWriter() { return new TurtleRdfWriter(); } + } diff --git a/purtle/tests/phpunit/XmlRdfWriterTest.php b/purtle/tests/phpunit/XmlRdfWriterTest.php index 02cd696..a701612 100644 --- a/purtle/tests/phpunit/XmlRdfWriterTest.php +++ b/purtle/tests/phpunit/XmlRdfWriterTest.php @@ -26,4 +26,5 @@ protected function newWriter() { return new XmlRdfWriter(); } + } diff --git a/repo/includes/ChangeOp/ChangeOpFactoryProvider.php b/repo/includes/ChangeOp/ChangeOpFactoryProvider.php index bcd505d..4086f82 100644 --- a/repo/includes/ChangeOp/ChangeOpFactoryProvider.php +++ b/repo/includes/ChangeOp/ChangeOpFactoryProvider.php @@ -125,4 +125,5 @@ $this->siteLookup ); } + } diff --git a/repo/includes/ChangeOp/ChangeOpStatementRank.php b/repo/includes/ChangeOp/ChangeOpStatementRank.php index be22e00..ce11a44 100644 --- a/repo/includes/ChangeOp/ChangeOpStatementRank.php +++ b/repo/includes/ChangeOp/ChangeOpStatementRank.php @@ -114,4 +114,5 @@ //TODO: move validation logic from apply() here. return parent::validate( $entity ); } + } diff --git a/repo/includes/ChangeOp/ChangeOpValidationException.php b/repo/includes/ChangeOp/ChangeOpValidationException.php index 9ee85cf..b7ee5f7 100644 --- a/repo/includes/ChangeOp/ChangeOpValidationException.php +++ b/repo/includes/ChangeOp/ChangeOpValidationException.php @@ -55,4 +55,5 @@ return $text; } + } diff --git a/repo/includes/Diff/EntityDiffVisualizer.php b/repo/includes/Diff/EntityDiffVisualizer.php index f8fdc4e..dfafb1f 100644 --- a/repo/includes/Diff/EntityDiffVisualizer.php +++ b/repo/includes/Diff/EntityDiffVisualizer.php @@ -148,7 +148,6 @@ return $html; } - /** * Generates and returns an HTML visualization of the provided redirect Diff. * diff --git a/repo/includes/EntityParserOutputGenerator.php b/repo/includes/EntityParserOutputGenerator.php index 03140e3..7f25247 100644 --- a/repo/includes/EntityParserOutputGenerator.php +++ b/repo/includes/EntityParserOutputGenerator.php @@ -440,4 +440,5 @@ $parserOutput->setExtensionData( 'wikibase-alternate-links', $links ); } + } diff --git a/repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php b/repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php index c0eae09..15fdae5 100644 --- a/repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php +++ b/repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php @@ -169,4 +169,5 @@ $this->languageNameLookup ); } + } diff --git a/repo/includes/IO/EntityIdReader.php b/repo/includes/IO/EntityIdReader.php index 75c0965..3d90109 100644 --- a/repo/includes/IO/EntityIdReader.php +++ b/repo/includes/IO/EntityIdReader.php @@ -150,4 +150,5 @@ return $ids; } + } diff --git a/repo/includes/Validators/UniquenessViolation.php b/repo/includes/Validators/UniquenessViolation.php index 00af18c..9f55d75 100644 --- a/repo/includes/Validators/UniquenessViolation.php +++ b/repo/includes/Validators/UniquenessViolation.php @@ -38,4 +38,5 @@ public function getConflictingEntity() { return $this->conflictingEntity; } + } diff --git a/repo/includes/api/ItemByTitleHelper.php b/repo/includes/api/ItemByTitleHelper.php index 69d7f18..dff51aa 100644 --- a/repo/includes/api/ItemByTitleHelper.php +++ b/repo/includes/api/ItemByTitleHelper.php @@ -163,4 +163,5 @@ Profiler::instance()->close(); throw new UsageException( $messgae, $code ); } + } diff --git a/repo/includes/rdf/RdfBuilder.php b/repo/includes/rdf/RdfBuilder.php index fb9200d..fbbba7a 100644 --- a/repo/includes/rdf/RdfBuilder.php +++ b/repo/includes/rdf/RdfBuilder.php @@ -156,6 +156,7 @@ return $statementBuilder; } + /** * @return EntityRdfBuilder */ diff --git a/repo/includes/specials/SpecialEntitiesWithoutPage.php b/repo/includes/specials/SpecialEntitiesWithoutPage.php index df527a9..6433b79 100644 --- a/repo/includes/specials/SpecialEntitiesWithoutPage.php +++ b/repo/includes/specials/SpecialEntitiesWithoutPage.php @@ -209,7 +209,6 @@ return $this->entityPerPage->getEntitiesWithoutTerm( $this->termType, $this->language, $this->type, $limit, $offset ); } - /** * @see SpecialWikibaseQueryPage::getTitleForNavigation * diff --git a/repo/maintenance/dumpJson.php b/repo/maintenance/dumpJson.php index 8e8935a..b211b66 100644 --- a/repo/maintenance/dumpJson.php +++ b/repo/maintenance/dumpJson.php @@ -45,6 +45,7 @@ $dumper->setUseSnippets( (bool)$this->getOption( 'snippet', false ) ); return $dumper; } + } $maintClass = 'Wikibase\DumpJson'; diff --git a/repo/maintenance/rebuildItemsPerSite.php b/repo/maintenance/rebuildItemsPerSite.php index adc4373..8773c71 100644 --- a/repo/maintenance/rebuildItemsPerSite.php +++ b/repo/maintenance/rebuildItemsPerSite.php @@ -77,6 +77,7 @@ public function report( $msg ) { $this->output( "$msg\n" ); } + } $maintClass = 'Wikibase\Repo\Maintenance\RebuildItemsPerSite'; diff --git a/repo/tests/phpunit/includes/ChangeOp/StatementChangeOpFactoryTest.php b/repo/tests/phpunit/includes/ChangeOp/StatementChangeOpFactoryTest.php index a54ba65..f2ae737 100644 --- a/repo/tests/phpunit/includes/ChangeOp/StatementChangeOpFactoryTest.php +++ b/repo/tests/phpunit/includes/ChangeOp/StatementChangeOpFactoryTest.php @@ -88,7 +88,6 @@ $this->assertInstanceOf( 'Wikibase\ChangeOp\ChangeOp', $op ); } - public function testNewSetStatementRankOp() { $op = $this->newChangeOpFactory()->newSetStatementRankOp( 'DEADBEEF', Statement::RANK_NORMAL ); $this->assertInstanceOf( 'Wikibase\ChangeOp\ChangeOp', $op ); diff --git a/repo/tests/phpunit/includes/Diff/DiffOpValueFormatterTest.php b/repo/tests/phpunit/includes/Diff/DiffOpValueFormatterTest.php index 487d6b7..021ffe8 100644 --- a/repo/tests/phpunit/includes/Diff/DiffOpValueFormatterTest.php +++ b/repo/tests/phpunit/includes/Diff/DiffOpValueFormatterTest.php @@ -54,4 +54,5 @@ '@<i>old 1</i>.*<i>old 2</i>.*<i>new 1</i>.*<i>new 2</i>@' ), ); } + } diff --git a/repo/tests/phpunit/includes/Diff/DifferencesSnakVisualizerTest.php b/repo/tests/phpunit/includes/Diff/DifferencesSnakVisualizerTest.php index 6396003..7f611d8 100644 --- a/repo/tests/phpunit/includes/Diff/DifferencesSnakVisualizerTest.php +++ b/repo/tests/phpunit/includes/Diff/DifferencesSnakVisualizerTest.php @@ -156,4 +156,5 @@ array( null, 'property' ), ); } + } diff --git a/repo/tests/phpunit/includes/EditEntityTest.php b/repo/tests/phpunit/includes/EditEntityTest.php index 9ad5e74..9663ec4 100644 --- a/repo/tests/phpunit/includes/EditEntityTest.php +++ b/repo/tests/phpunit/includes/EditEntityTest.php @@ -821,4 +821,5 @@ $this->assertEquals( $hookReturnStatus->isGood(), $saveStatus->isGood() ); } + } diff --git a/repo/tests/phpunit/includes/Hooks/OutputPageBeforeHTMLHookHandlerTest.php b/repo/tests/phpunit/includes/Hooks/OutputPageBeforeHTMLHookHandlerTest.php index 9558d53..147491c 100644 --- a/repo/tests/phpunit/includes/Hooks/OutputPageBeforeHTMLHookHandlerTest.php +++ b/repo/tests/phpunit/includes/Hooks/OutputPageBeforeHTMLHookHandlerTest.php @@ -76,4 +76,5 @@ $this->assertSame( array( 'es', 'ru' ), $wbUserSpecifiedLanguages ); } + } diff --git a/repo/tests/phpunit/includes/Hooks/OutputPageEntityIdReaderTest.php b/repo/tests/phpunit/includes/Hooks/OutputPageEntityIdReaderTest.php index 2a72fb4..8abdf1d 100644 --- a/repo/tests/phpunit/includes/Hooks/OutputPageEntityIdReaderTest.php +++ b/repo/tests/phpunit/includes/Hooks/OutputPageEntityIdReaderTest.php @@ -78,4 +78,5 @@ ), ); } + } diff --git a/repo/tests/phpunit/includes/IO/EntityIdReaderTest.php b/repo/tests/phpunit/includes/IO/EntityIdReaderTest.php index 5237903..fb88d5e 100644 --- a/repo/tests/phpunit/includes/IO/EntityIdReaderTest.php +++ b/repo/tests/phpunit/includes/IO/EntityIdReaderTest.php @@ -33,7 +33,6 @@ return new EntityIdReader( new LineReader( $handle ), new BasicEntityIdParser(), $type ); } - protected function getIdStrings( array $entityIds ) { $ids = array_map( function ( EntityId $entityId ) { return $entityId->getSerialization(); @@ -83,6 +82,7 @@ ), ); } + /** * @dataProvider listEntitiesProvider_paging */ diff --git a/repo/tests/phpunit/includes/LinkedData/EntityDataFormatProviderTest.php b/repo/tests/phpunit/includes/LinkedData/EntityDataFormatProviderTest.php index cd2b525..02e20ff 100644 --- a/repo/tests/phpunit/includes/LinkedData/EntityDataFormatProviderTest.php +++ b/repo/tests/phpunit/includes/LinkedData/EntityDataFormatProviderTest.php @@ -226,4 +226,5 @@ $this->assertNull( $actual, $format ); } } + } diff --git a/repo/tests/phpunit/includes/LinkedData/EntityDataUriManagerTest.php b/repo/tests/phpunit/includes/LinkedData/EntityDataUriManagerTest.php index 68c2220..b3e0774 100644 --- a/repo/tests/phpunit/includes/LinkedData/EntityDataUriManagerTest.php +++ b/repo/tests/phpunit/includes/LinkedData/EntityDataUriManagerTest.php @@ -203,4 +203,5 @@ $actual = $uriManager->getCacheableUrls( $id ); $this->assertEquals( $expected, $actual ); } + } diff --git a/repo/tests/phpunit/includes/Validators/SnakValidatorTest.php b/repo/tests/phpunit/includes/Validators/SnakValidatorTest.php index 256bd01..daaae20 100644 --- a/repo/tests/phpunit/includes/Validators/SnakValidatorTest.php +++ b/repo/tests/phpunit/includes/Validators/SnakValidatorTest.php @@ -183,7 +183,6 @@ $this->assertEquals( $expectedValid, $result->isValid(), $description ); } - public function provideValidateReference() { $p1 = new PropertyId( 'p1' ); // numeric $p2 = new PropertyId( 'p2' ); // alphabetic diff --git a/repo/tests/phpunit/includes/Validators/TestValidator.php b/repo/tests/phpunit/includes/Validators/TestValidator.php index 3623d77..2824030 100644 --- a/repo/tests/phpunit/includes/Validators/TestValidator.php +++ b/repo/tests/phpunit/includes/Validators/TestValidator.php @@ -50,4 +50,5 @@ public function setOptions( array $options ) { // noop } + } diff --git a/repo/tests/phpunit/includes/ValueParserFactoryTest.php b/repo/tests/phpunit/includes/ValueParserFactoryTest.php index 76a8c9f..261fc1f 100644 --- a/repo/tests/phpunit/includes/ValueParserFactoryTest.php +++ b/repo/tests/phpunit/includes/ValueParserFactoryTest.php @@ -35,4 +35,5 @@ ) ); } + } diff --git a/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php b/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php index f890c79..b0f9358 100644 --- a/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php +++ b/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php @@ -35,5 +35,4 @@ ); } - } diff --git a/repo/tests/phpunit/includes/api/EntityTestHelper.php b/repo/tests/phpunit/includes/api/EntityTestHelper.php index 07ea4fb..87765ae 100644 --- a/repo/tests/phpunit/includes/api/EntityTestHelper.php +++ b/repo/tests/phpunit/includes/api/EntityTestHelper.php @@ -402,7 +402,6 @@ return null; } - /** * Applies $idMap to all data in the given data structure, recursively. * diff --git a/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php b/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php index cf2c6b5..179b7c0 100644 --- a/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php +++ b/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php @@ -217,4 +217,5 @@ $itemByTitleHelper->getItemIds( $sites, $titles, $normalize ); } + } diff --git a/repo/tests/phpunit/includes/api/SetQualifierTest.php b/repo/tests/phpunit/includes/api/SetQualifierTest.php index 053da2a..9fb4456 100644 --- a/repo/tests/phpunit/includes/api/SetQualifierTest.php +++ b/repo/tests/phpunit/includes/api/SetQualifierTest.php @@ -84,7 +84,6 @@ return $property; } - protected function getTestItem() { static $item = null; diff --git a/repo/tests/phpunit/includes/content/EntityContentTest.php b/repo/tests/phpunit/includes/content/EntityContentTest.php index 27caf7b..13d576e 100644 --- a/repo/tests/phpunit/includes/content/EntityContentTest.php +++ b/repo/tests/phpunit/includes/content/EntityContentTest.php @@ -369,7 +369,6 @@ $this->assertEquals( $content->getNativeData(), $copy->getNativeData(), 'Copy must have the same data.' ); } - public function equalsProvider() { $empty = $this->newEmpty(); diff --git a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php index 91da150..f34d128 100644 --- a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php +++ b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php @@ -63,7 +63,6 @@ return $builder; } - /** * Load entity from JSON * diff --git a/view/src/EditSectionGenerator.php b/view/src/EditSectionGenerator.php index 00cdafb..83b2603 100644 --- a/view/src/EditSectionGenerator.php +++ b/view/src/EditSectionGenerator.php @@ -57,4 +57,5 @@ * @return string */ public function getAddStatementToGroupSection( PropertyId $propertyId, EntityId $entityId = null ); + } diff --git a/view/tests/phpunit/Template/TemplateRegistryTest.php b/view/tests/phpunit/Template/TemplateRegistryTest.php index 793d318..808a8cc 100644 --- a/view/tests/phpunit/Template/TemplateRegistryTest.php +++ b/view/tests/phpunit/Template/TemplateRegistryTest.php @@ -34,7 +34,6 @@ ); } - /** * @dataProvider providerAddTemplates */ -- To view, visit https://gerrit.wikimedia.org/r/225215 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33f88d31605be81c9990e0b1f1afe4e7fae13800 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits