Jeroen De Dauw has submitted this change and it was merged.

Change subject: Enable PHPCS sniff Squiz.WhiteSpace.FunctionSpacing
......................................................................


Enable PHPCS sniff Squiz.WhiteSpace.FunctionSpacing

Change-Id: I7bceed3e8e7020202fb82b885db53938c12173a0
---
M 
client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php
M 
client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
M client/tests/phpunit/includes/Usage/EntityUsageTest.php
M client/tests/phpunit/includes/recentchanges/RecentChangesFilterOptionsTest.php
M lib/includes/store/EntityTermLookupBase.php
M phpcs.xml
M repo/tests/phpunit/includes/ChangeOp/ChangeOpAliasesTest.php
M repo/tests/phpunit/includes/Diff/ClaimDifferenceVisualizerTest.php
M repo/tests/phpunit/includes/Diff/EntityDiffVisualizerTest.php
M repo/tests/phpunit/includes/Hooks/OutputPageEntityIdReaderTest.php
M repo/tests/phpunit/includes/api/SetReferenceTest.php
11 files changed, 21 insertions(+), 10 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved



diff --git 
a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php
 
b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php
index 5c33ac6..425603a 100644
--- 
a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php
+++ 
b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php
@@ -185,7 +185,7 @@
                return $lookup;
        }
 
-       /***
+       /**
         * @return SnakFormatter
         */
        private function getSnakFormatter() {
diff --git 
a/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
 
b/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
index bbdf580..61c90c2 100644
--- 
a/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
+++ 
b/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
@@ -172,7 +172,7 @@
                return $lookup;
        }
 
-       /***
+       /**
         * @return SnakFormatter
         */
        private function getSnakFormatter() {
diff --git a/client/tests/phpunit/includes/Usage/EntityUsageTest.php 
b/client/tests/phpunit/includes/Usage/EntityUsageTest.php
index fc90d0d..1a20b61 100644
--- a/client/tests/phpunit/includes/Usage/EntityUsageTest.php
+++ b/client/tests/phpunit/includes/Usage/EntityUsageTest.php
@@ -18,7 +18,6 @@
  */
 class EntityUsageTest extends PHPUnit_Framework_TestCase {
 
-
        public function testGetEntityId() {
                $id = new ItemId( 'Q7' );
                $aspect = EntityUsage::ALL_USAGE;
diff --git 
a/client/tests/phpunit/includes/recentchanges/RecentChangesFilterOptionsTest.php
 
b/client/tests/phpunit/includes/recentchanges/RecentChangesFilterOptionsTest.php
index b6193f7..e67765e 100644
--- 
a/client/tests/phpunit/includes/recentchanges/RecentChangesFilterOptionsTest.php
+++ 
b/client/tests/phpunit/includes/recentchanges/RecentChangesFilterOptionsTest.php
@@ -19,6 +19,7 @@
  * @author Marius Hoch < h...@online.de >
  */
 class RecentChangesFilterOptionsTest extends \MediaWikiTestCase {
+
        protected function setUp() {
                parent::setUp();
 
diff --git a/lib/includes/store/EntityTermLookupBase.php 
b/lib/includes/store/EntityTermLookupBase.php
index c648cc4..c5f3740 100644
--- a/lib/includes/store/EntityTermLookupBase.php
+++ b/lib/includes/store/EntityTermLookupBase.php
@@ -15,7 +15,6 @@
  */
 abstract class EntityTermLookupBase implements TermLookup {
 
-
        /**
         * @see TermLookup::getLabel
         *
diff --git a/phpcs.xml b/phpcs.xml
index 16bb93e..70a10e8 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -46,6 +46,15 @@
        <rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
                <severity>0</severity>
        </rule>
+       <rule ref="Squiz.WhiteSpace.FunctionSpacing">
+               <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="Zend.Files.ClosingTag" />
 </ruleset>
diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpAliasesTest.php 
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpAliasesTest.php
index 110fc5f..8f7ecef 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpAliasesTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpAliasesTest.php
@@ -21,7 +21,6 @@
  */
 class ChangeOpAliasesTest extends \PHPUnit_Framework_TestCase {
 
-
        private function getTermValidatorFactory() {
                $mockProvider = new ChangeOpTestMockProvider( $this );
                return $mockProvider->getMockTermValidatorFactory();
diff --git a/repo/tests/phpunit/includes/Diff/ClaimDifferenceVisualizerTest.php 
b/repo/tests/phpunit/includes/Diff/ClaimDifferenceVisualizerTest.php
index 8f3dc10..0776d8f 100644
--- a/repo/tests/phpunit/includes/Diff/ClaimDifferenceVisualizerTest.php
+++ b/repo/tests/phpunit/includes/Diff/ClaimDifferenceVisualizerTest.php
@@ -79,7 +79,9 @@
                $this->assertInstanceOf( 
'Wikibase\Repo\Diff\ClaimDifferenceVisualizer', $instance );
        }
 
-       //TODO come up with a better way of testing this.... EWW at all the 
html...
+       /**
+        * @todo Come up with a better way of testing this.... EWW at all the 
html...
+        */
        public function provideDifferenceAndClaim() {
                return array(
                        'no change' => array(
diff --git a/repo/tests/phpunit/includes/Diff/EntityDiffVisualizerTest.php 
b/repo/tests/phpunit/includes/Diff/EntityDiffVisualizerTest.php
index 2a67130..8f51188 100644
--- a/repo/tests/phpunit/includes/Diff/EntityDiffVisualizerTest.php
+++ b/repo/tests/phpunit/includes/Diff/EntityDiffVisualizerTest.php
@@ -26,7 +26,6 @@
  */
 class EntityDiffVisualizerTest extends MediaWikiTestCase {
 
-
        public function diffProvider() {
                $emptyDiff = new EntityContentDiff( new EntityDiff(), new 
Diff() );
 
diff --git a/repo/tests/phpunit/includes/Hooks/OutputPageEntityIdReaderTest.php 
b/repo/tests/phpunit/includes/Hooks/OutputPageEntityIdReaderTest.php
index 9eb5b98..2a72fb4 100644
--- a/repo/tests/phpunit/includes/Hooks/OutputPageEntityIdReaderTest.php
+++ b/repo/tests/phpunit/includes/Hooks/OutputPageEntityIdReaderTest.php
@@ -20,6 +20,7 @@
  * @author Marius Hoch < h...@online.de >
  */
 class OutputPageEntityIdReaderTest extends PHPUnit_Framework_TestCase {
+
        /**
         * @dataProvider getEntityIdFromOutputPageProvider
         */
diff --git a/repo/tests/phpunit/includes/api/SetReferenceTest.php 
b/repo/tests/phpunit/includes/api/SetReferenceTest.php
index 4214229..989fe9e 100644
--- a/repo/tests/phpunit/includes/api/SetReferenceTest.php
+++ b/repo/tests/phpunit/includes/api/SetReferenceTest.php
@@ -61,9 +61,11 @@
                }
        }
 
-       // TODO: clean this up so more of the input space can easily be tested
-       // semi-blocked by cleanup of GUID handling in claims
-       // can perhaps tseal from RemoveReferencesTest
+       /**
+        * @todo Clean this up so more of the input space can easily be tested
+        * semi-blocked by cleanup of GUID handling in claims
+        * can perhaps steal from RemoveReferencesTest
+        */
        public function testRequests() {
                $store = WikibaseRepo::getDefaultInstance()->getEntityStore();
 

-- 
To view, visit https://gerrit.wikimedia.org/r/217498
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7bceed3e8e7020202fb82b885db53938c12173a0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: JanZerebecki <jan.wikime...@zerebecki.de>
Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to