Add missing empty lines between methods
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Tue, 15 Jan 2019 15:04:58 +0000 (16:04 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Tue, 15 Jan 2019 19:14:35 +0000 (19:14 +0000)
This might hint at an edge-case in the PHP CodeSniffer sniff that should
detect if methods are separated by a single empty line. Feel free to
investigate. I, personally, can't invest more time in this than
suggesting this quick fix.

Change-Id: Ib3c60eac76f255b4fe929f7933de256222716576

13 files changed:
includes/Revision.php
includes/diff/TextSlotDiffRenderer.php
includes/exception/MWUnknownContentModelException.php
includes/libs/mime/XmlTypeCheck.php
includes/parser/ParserOptions.php
includes/widget/search/InterwikiSearchResultSetWidget.php
tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php
tests/phpunit/includes/media/WebPTest.php
tests/phpunit/includes/poolcounter/PoolWorkArticleViewTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderLessVarFileModuleTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
tests/phpunit/includes/upload/UploadStashTest.php

index b0a3ba3..c99f88a 100644 (file)
@@ -846,6 +846,7 @@ class Revision implements IDBAccessObject {
                $user = $this->mRecord->getUser( $audience, $user );
                return $user ? $user->getName() : '';
        }
+
        /**
         * Fetch revision comment if it's available to the specified audience.
         * If the specified audience does not have access to the comment, an
index 1cc6646..e2cdd82 100644 (file)
@@ -85,6 +85,7 @@ class TextSlotDiffRenderer extends SlotDiffRenderer {
        public function setLanguage( Language $language ) {
                $this->language = $language;
        }
+
        /**
         * @param int $cutoff
         * @see $wgWikiDiff2MovedParagraphDetectionCutoff
index df7111a..9f22815 100644 (file)
@@ -18,6 +18,7 @@ class MWUnknownContentModelException extends MWException {
                        'handle this content model.' );
                $this->modelId = $modelId;
        }
+
        /** @return string */
        public function getModelId() {
                return $this->modelId;
index a270105..993eea9 100644 (file)
@@ -364,6 +364,7 @@ class XmlTypeCheck {
                        $this->filterMatchType = $callbackReturn;
                }
        }
+
        /**
         * Handle coming across a <!DOCTYPE declaration.
         *
index 8407992..a69e805 100644 (file)
@@ -733,6 +733,7 @@ class ParserOptions {
        public function getMagicPMIDLinks() {
                return $this->getOption( 'magicPMIDLinks' );
        }
+
        /**
         * Are magic RFC links enabled?
         * @since 1.28
index 853601e..c0efd24 100644 (file)
@@ -45,6 +45,7 @@ class InterwikiSearchResultSetWidget implements SearchResultSetWidget {
                $this->output = $specialSearch->getOutput();
                $this->showMultimedia = $showMultimedia;
        }
+
        /**
         * @param string $term User provided search term
         * @param SearchResultSet|SearchResultSet[] $resultSets List of interwiki
index cf5e808..68632f3 100644 (file)
@@ -102,6 +102,7 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
                $this->testPageTitle = Title::newFromText( 'UTPage-' . __CLASS__ );
                return $this->testPageTitle;
        }
+
        /**
         * @return WikiPage
         */
index a0a99cc..ac0ad98 100644 (file)
@@ -9,10 +9,12 @@ class WebPHandlerTest extends MediaWikiTestCase {
                // Allocated file for testing
                $this->tempFileName = tempnam( wfTempDir(), 'WEBP' );
        }
+
        public function tearDown() {
                parent::tearDown();
                unlink( $this->tempFileName );
        }
+
        /**
         * @dataProvider provideTestExtractMetaData
         */
@@ -22,6 +24,7 @@ class WebPHandlerTest extends MediaWikiTestCase {
 
                $this->assertEquals( $expectedResult, WebPHandler::extractMetadata( $this->tempFileName ) );
        }
+
        public function provideTestExtractMetaData() {
                // phpcs:disable Generic.Files.LineLength
                return [
@@ -80,6 +83,7 @@ class WebPHandlerTest extends MediaWikiTestCase {
        public function testWithFileExtractMetaData( $filename, $expectedResult ) {
                $this->assertEquals( $expectedResult, WebPHandler::extractMetadata( $filename ) );
        }
+
        public function provideTestWithFileExtractMetaData() {
                return [
                        [ __DIR__ . '/../../data/media/2_webp_ll.webp',
@@ -108,6 +112,7 @@ class WebPHandlerTest extends MediaWikiTestCase {
                $handler = new WebPHandler();
                $this->assertEquals( $expectedResult, $handler->getImageSize( null, $path ) );
        }
+
        public function provideTestGetImageSize() {
                return [
                        // Public domain files from https://developers.google.com/speed/webp/gallery2
@@ -130,6 +135,7 @@ class WebPHandlerTest extends MediaWikiTestCase {
                $mime = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer();
                $this->assertEquals( 'image/webp', $mime->guessMimeType( $path, false ) );
        }
+
        public function provideTestGetMimeType() {
                return [
                                // Public domain files from https://developers.google.com/speed/webp/gallery2
index 19774f0..016a9a0 100644 (file)
@@ -118,6 +118,7 @@ class PoolWorkArticleViewTest extends MediaWikiTestCase {
                        }
                ];
        }
+
        /**
         * @dataProvider provideMagicWords
         */
index bb51de0..318dce8 100644 (file)
@@ -31,6 +31,7 @@ class ResourceLoaderLessVarFileModuleTest extends ResourceLoaderTestCase {
                        ]
                ];
        }
+
        /**
         * @dataProvider providerWrapAndEscapeMessage
         * @covers ResourceLoaderLessVarFileModule::wrapAndEscapeMessage
index aa3f820..2ee85b5 100644 (file)
@@ -499,6 +499,7 @@ mw.loader.register( [
                        ] ]
                ];
        }
+
        /**
         * @covers ResourceLoaderStartUpModule::getModuleRegistrations
         * @dataProvider provideRegistrations
index 171f2a6..32afd75 100644 (file)
@@ -837,6 +837,7 @@ mw.example();
                        $response
                );
        }
+
        /**
         * Verify that when building the startup module response,
         * an exception from one module class will not break the entire
index e796065..26088a3 100644 (file)
@@ -84,6 +84,7 @@ class UploadStashTest extends MediaWikiTestCase {
                                ] ) ],
                ];
        }
+
        /**
         * @dataProvider provideValidRequests
         */