From: Thiemo Kreuz Date: Tue, 15 Jan 2019 15:04:58 +0000 (+0100) Subject: Add missing empty lines between methods X-Git-Tag: 1.34.0-rc.0~3079 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=c3dfa889664c522bf4d9c64ff516642a5da09fb3;p=lhc%2Fweb%2Fwiklou.git Add missing empty lines between methods 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 --- diff --git a/includes/Revision.php b/includes/Revision.php index b0a3ba35f2..c99f88afb7 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -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 diff --git a/includes/diff/TextSlotDiffRenderer.php b/includes/diff/TextSlotDiffRenderer.php index 1cc6646297..e2cdd82b86 100644 --- a/includes/diff/TextSlotDiffRenderer.php +++ b/includes/diff/TextSlotDiffRenderer.php @@ -85,6 +85,7 @@ class TextSlotDiffRenderer extends SlotDiffRenderer { public function setLanguage( Language $language ) { $this->language = $language; } + /** * @param int $cutoff * @see $wgWikiDiff2MovedParagraphDetectionCutoff diff --git a/includes/exception/MWUnknownContentModelException.php b/includes/exception/MWUnknownContentModelException.php index df7111acd7..9f22815a32 100644 --- a/includes/exception/MWUnknownContentModelException.php +++ b/includes/exception/MWUnknownContentModelException.php @@ -18,6 +18,7 @@ class MWUnknownContentModelException extends MWException { 'handle this content model.' ); $this->modelId = $modelId; } + /** @return string */ public function getModelId() { return $this->modelId; diff --git a/includes/libs/mime/XmlTypeCheck.php b/includes/libs/mime/XmlTypeCheck.php index a2701059f2..993eea97e4 100644 --- a/includes/libs/mime/XmlTypeCheck.php +++ b/includes/libs/mime/XmlTypeCheck.php @@ -364,6 +364,7 @@ class XmlTypeCheck { $this->filterMatchType = $callbackReturn; } } + /** * Handle coming across a getOption( 'magicPMIDLinks' ); } + /** * Are magic RFC links enabled? * @since 1.28 diff --git a/includes/widget/search/InterwikiSearchResultSetWidget.php b/includes/widget/search/InterwikiSearchResultSetWidget.php index 853601e4cf..c0efd24a75 100644 --- a/includes/widget/search/InterwikiSearchResultSetWidget.php +++ b/includes/widget/search/InterwikiSearchResultSetWidget.php @@ -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 diff --git a/tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php b/tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php index cf5e808348..68632f3e68 100644 --- a/tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php +++ b/tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php @@ -102,6 +102,7 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase { $this->testPageTitle = Title::newFromText( 'UTPage-' . __CLASS__ ); return $this->testPageTitle; } + /** * @return WikiPage */ diff --git a/tests/phpunit/includes/media/WebPTest.php b/tests/phpunit/includes/media/WebPTest.php index a0a99cc222..ac0ad98edd 100644 --- a/tests/phpunit/includes/media/WebPTest.php +++ b/tests/phpunit/includes/media/WebPTest.php @@ -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 diff --git a/tests/phpunit/includes/poolcounter/PoolWorkArticleViewTest.php b/tests/phpunit/includes/poolcounter/PoolWorkArticleViewTest.php index 19774f0cf0..016a9a0b5b 100644 --- a/tests/phpunit/includes/poolcounter/PoolWorkArticleViewTest.php +++ b/tests/phpunit/includes/poolcounter/PoolWorkArticleViewTest.php @@ -118,6 +118,7 @@ class PoolWorkArticleViewTest extends MediaWikiTestCase { } ]; } + /** * @dataProvider provideMagicWords */ diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderLessVarFileModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderLessVarFileModuleTest.php index bb51de07d7..318dce8863 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderLessVarFileModuleTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderLessVarFileModuleTest.php @@ -31,6 +31,7 @@ class ResourceLoaderLessVarFileModuleTest extends ResourceLoaderTestCase { ] ]; } + /** * @dataProvider providerWrapAndEscapeMessage * @covers ResourceLoaderLessVarFileModule::wrapAndEscapeMessage diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php index aa3f820338..2ee85b5ee5 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php @@ -499,6 +499,7 @@ mw.loader.register( [ ] ] ]; } + /** * @covers ResourceLoaderStartUpModule::getModuleRegistrations * @dataProvider provideRegistrations diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php index 171f2a69ff..32afd75033 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php @@ -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 diff --git a/tests/phpunit/includes/upload/UploadStashTest.php b/tests/phpunit/includes/upload/UploadStashTest.php index e7960651cd..26088a3657 100644 --- a/tests/phpunit/includes/upload/UploadStashTest.php +++ b/tests/phpunit/includes/upload/UploadStashTest.php @@ -84,6 +84,7 @@ class UploadStashTest extends MediaWikiTestCase { ] ) ], ]; } + /** * @dataProvider provideValidRequests */