From: Thiemo Mättig Date: Thu, 8 Dec 2016 16:23:46 +0000 (+0100) Subject: Remove empty lines from PHP and JavaScript comment blocks X-Git-Tag: 1.31.0-rc.0~4631^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=00c3f09566dd02863a888e496ae32c08f91443b0;p=lhc%2Fweb%2Fwiklou.git Remove empty lines from PHP and JavaScript comment blocks This is a pure documentation change. It mostly removes empty lines from comments (and entirely empty comments), as well as adds a few missing documentation blocks and fixes a minor mistake. I hope it's ok to have this in one patch. I can split it, please tell me. Change-Id: I9668338602ac77b903ab6b02ff56bd52743c37c4 --- diff --git a/includes/CategoryFinder.php b/includes/CategoryFinder.php index 4efa2ff84c..504b35f885 100644 --- a/includes/CategoryFinder.php +++ b/includes/CategoryFinder.php @@ -40,7 +40,6 @@ * $a = $cf->run(); * print implode( ',' , $a ); * @endcode - * */ class CategoryFinder { /** @var int[] The original article IDs passed to the seed function */ diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 5557dca875..6514c125d9 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2031,7 +2031,6 @@ $wgDBmysql5 = false; * is in this case an unwanted overhead that just slows things down. * * @warning EXPERIMENTAL! - * */ $wgDBOracleDRCP = false; diff --git a/includes/MWNamespace.php b/includes/MWNamespace.php index 61e34ee9b2..4c5561fba8 100644 --- a/includes/MWNamespace.php +++ b/includes/MWNamespace.php @@ -28,7 +28,6 @@ * * These are synonyms for the names given in the language file * Users and translators should not change them - * */ class MWNamespace { diff --git a/includes/PageProps.php b/includes/PageProps.php index d09e1fbf9d..382d089c5b 100644 --- a/includes/PageProps.php +++ b/includes/PageProps.php @@ -25,7 +25,6 @@ use Wikimedia\ScopedCallback; * Gives access to properties of a page. * * @since 1.27 - * */ class PageProps { diff --git a/includes/Revision.php b/includes/Revision.php index b812191398..81bba55392 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -1131,7 +1131,7 @@ class Revision implements IDBAccessObject { * * @return string The content model id associated with this revision, * see the CONTENT_MODEL_XXX constants. - **/ + */ public function getContentModel() { if ( !$this->mContentModel ) { $title = $this->getTitle(); @@ -1155,7 +1155,7 @@ class Revision implements IDBAccessObject { * * @return string The content format id associated with this revision, * see the CONTENT_FORMAT_XXX constants. - **/ + */ public function getContentFormat() { if ( !$this->mContentFormat ) { $handler = $this->getContentHandler(); diff --git a/includes/deferred/LinksDeletionUpdate.php b/includes/deferred/LinksDeletionUpdate.php index 6aa3831fb3..7215696c14 100644 --- a/includes/deferred/LinksDeletionUpdate.php +++ b/includes/deferred/LinksDeletionUpdate.php @@ -24,7 +24,7 @@ use Wikimedia\ScopedCallback; /** * Update object handling the cleanup of links tables after a page was deleted. - **/ + */ class LinksDeletionUpdate extends DataUpdate implements EnqueueableDataUpdate { /** @var WikiPage */ protected $page; diff --git a/includes/http/CurlHttpRequest.php b/includes/http/CurlHttpRequest.php index 7fd3e835c4..f958ff657d 100644 --- a/includes/http/CurlHttpRequest.php +++ b/includes/http/CurlHttpRequest.php @@ -37,6 +37,12 @@ class CurlHttpRequest extends MWHttpRequest { return strlen( $content ); } + /** + * @see MWHttpRequest::execute + * + * @throws MWException + * @return Status + */ public function execute() { $this->prepare(); diff --git a/includes/http/PhpHttpRequest.php b/includes/http/PhpHttpRequest.php index d8a9949d2f..3f3803b41c 100644 --- a/includes/http/PhpHttpRequest.php +++ b/includes/http/PhpHttpRequest.php @@ -94,6 +94,11 @@ class PhpHttpRequest extends MWHttpRequest { $this->fopenErrors += [ "errno$n" => $errno, "errstr$n" => $errstr ]; } + /** + * @see MWHttpRequest::execute + * + * @return Status + */ public function execute() { $this->prepare(); diff --git a/includes/libs/IEUrlExtension.php b/includes/libs/IEUrlExtension.php index 16163fb304..4a6e3fb168 100644 --- a/includes/libs/IEUrlExtension.php +++ b/includes/libs/IEUrlExtension.php @@ -253,7 +253,6 @@ class IEUrlExtension { * * @param $serverSoftware * @return bool - * */ public static function haveUndecodedRequestUri( $serverSoftware ) { static $whitelist = [ diff --git a/includes/libs/mime/XmlTypeCheck.php b/includes/libs/mime/XmlTypeCheck.php index 3958f8c00b..7f2bf5e81b 100644 --- a/includes/libs/mime/XmlTypeCheck.php +++ b/includes/libs/mime/XmlTypeCheck.php @@ -291,8 +291,6 @@ class XmlTypeCheck { $this->stackDepth++; } - /** - */ private function elementClose() { list( $name, $attribs ) = array_pop( $this->elementDataContext ); $data = array_pop( $this->elementData ); diff --git a/includes/libs/stats/NullStatsdDataFactory.php b/includes/libs/stats/NullStatsdDataFactory.php index 3b272e216e..fee792fdd1 100644 --- a/includes/libs/stats/NullStatsdDataFactory.php +++ b/includes/libs/stats/NullStatsdDataFactory.php @@ -15,7 +15,7 @@ class NullStatsdDataFactory implements StatsdDataFactoryInterface { * * @param string|array $key The metric(s) to set. * @param float $time The elapsed time (ms) to log - **/ + */ public function timing( $key, $time ) { } @@ -24,7 +24,7 @@ class NullStatsdDataFactory implements StatsdDataFactoryInterface { * * @param string|array $key The metric(s) to set. * @param float $value The value for the stats. - **/ + */ public function gauge( $key, $value ) { } @@ -44,7 +44,7 @@ class NullStatsdDataFactory implements StatsdDataFactoryInterface { * @param float $value The value for the stats. * * @return array - **/ + */ public function set( $key, $value ) { return []; } @@ -56,7 +56,7 @@ class NullStatsdDataFactory implements StatsdDataFactoryInterface { * @param float|1 $sampleRate The rate (0-1) for sampling. * * @return array - **/ + */ public function increment( $key ) { return []; } @@ -69,7 +69,7 @@ class NullStatsdDataFactory implements StatsdDataFactoryInterface { * @param float|1 $sampleRate The rate (0-1) for sampling. * * @return mixed - **/ + */ public function decrement( $key ) { return []; } @@ -81,7 +81,7 @@ class NullStatsdDataFactory implements StatsdDataFactoryInterface { * @param integer $delta The delta to add to the each metric * * @return mixed - **/ + */ public function updateCount( $key, $delta ) { return []; } @@ -95,7 +95,7 @@ class NullStatsdDataFactory implements StatsdDataFactoryInterface { * ("c" for count, "ms" for timing, "g" for gauge, "s" for set) * * @return StatsdDataInterface - **/ + */ public function produceStatsdData( $key, $value = 1, diff --git a/includes/libs/xmp/XMP.php b/includes/libs/xmp/XMP.php index 29bbf4055b..d12af7a43c 100644 --- a/includes/libs/xmp/XMP.php +++ b/includes/libs/xmp/XMP.php @@ -49,7 +49,6 @@ use Wikimedia\ScopedCallback; * Note XMP kind of looks like rdf. They are not the same thing - XMP is * encoded as a specific subset of rdf. This class can read XMP. It cannot * read rdf. - * */ class XMPReader implements LoggerAwareInterface { /** @var array XMP item configuration array */ @@ -980,7 +979,6 @@ class XMPReader implements LoggerAwareInterface { * Called when processing the or . * * @param string $elm Namespace and tag name separated by a space. - * */ private function startElementModeQDesc( $elm ) { if ( $elm === self::NS_RDF . ' value' ) { diff --git a/includes/logging/LogPage.php b/includes/logging/LogPage.php index daaff07a1e..64102b7ec9 100644 --- a/includes/logging/LogPage.php +++ b/includes/logging/LogPage.php @@ -27,7 +27,6 @@ * Class to simplify the use of log pages. * The logs are now kept in a table which is easier to manage and trim * than ever-growing wiki pages. - * */ class LogPage { const DELETED_ACTION = 1; diff --git a/includes/page/Article.php b/includes/page/Article.php index cc3ef26b6b..a051663ed9 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -724,7 +724,6 @@ class Article implements Page { /** * Show a diff page according to current request variables. For use within * Article::view() only, other callers should use the DifferenceEngine class. - * */ protected function showDiffPage() { $request = $this->getContext()->getRequest(); diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 10dfd2660c..13dae8fb5b 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -224,7 +224,7 @@ class Parser { /** * @var string Deprecated accessor for the strip marker prefix. * @deprecated since 1.26; use Parser::MARKER_PREFIX instead. - **/ + */ public $mUniqPrefix = Parser::MARKER_PREFIX; /** diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index d2ef5e3039..b0768b6146 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -823,7 +823,6 @@ class ParserOutput extends CacheTime { * @code * $parser->getOutput()->my_ext_foo = '...'; * @endcode - * */ public function setProperty( $name, $value ) { $this->mProperties[$name] = $value; diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index d624c7c129..f9b4b3ddce 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -391,8 +391,6 @@ class ResourceLoader implements LoggerAwareInterface { } } - /** - */ public function registerTestModules() { global $IP; diff --git a/includes/search/ResultAugmentor.php b/includes/search/ResultAugmentor.php index 350b780953..df58e71a57 100644 --- a/includes/search/ResultAugmentor.php +++ b/includes/search/ResultAugmentor.php @@ -2,7 +2,6 @@ /** * Augment search results. - * */ interface ResultAugmentor { /** diff --git a/includes/search/ResultSetAugmentor.php b/includes/search/ResultSetAugmentor.php index 94710a85f8..e2d79a9c4e 100644 --- a/includes/search/ResultSetAugmentor.php +++ b/includes/search/ResultSetAugmentor.php @@ -2,7 +2,6 @@ /** * Augment search results. - * */ interface ResultSetAugmentor { /** diff --git a/includes/search/SearchSuggestion.php b/includes/search/SearchSuggestion.php index 80a437b6c9..4e7c782e84 100644 --- a/includes/search/SearchSuggestion.php +++ b/includes/search/SearchSuggestion.php @@ -17,12 +17,10 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html - * */ /** * A search suggestion - * */ class SearchSuggestion { /** diff --git a/includes/search/SearchSuggestionSet.php b/includes/search/SearchSuggestionSet.php index 5a24fd6d75..caad38852e 100644 --- a/includes/search/SearchSuggestionSet.php +++ b/includes/search/SearchSuggestionSet.php @@ -17,7 +17,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html - * */ /** diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index 0defcd1baf..347f0c0667 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -149,7 +149,6 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { /** * Executes an edit mode for the watchlist view, from which you can manage your watchlist - * */ protected function executeViewEditWatchlist() { $out = $this->getOutput(); diff --git a/includes/user/User.php b/includes/user/User.php index 2ee8ed246c..f1742b321d 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -2791,7 +2791,7 @@ class User implements IDBAccessObject { * @param string $oname The option to check * @param string $defaultOverride A default value returned if the option does not exist * @param bool $ignoreHidden Whether to ignore the effects of $wgHiddenPrefs - * @return string User's current value for the option + * @return string|null User's current value for the option * @see getBoolOption() * @see getIntOption() */ diff --git a/includes/utils/ZipDirectoryReader.php b/includes/utils/ZipDirectoryReader.php index 516e9aec4a..212f325cad 100644 --- a/includes/utils/ZipDirectoryReader.php +++ b/includes/utils/ZipDirectoryReader.php @@ -26,7 +26,6 @@ * * Only a functional interface is provided: ZipFileReader::read(). No access is * given to object instances. - * */ class ZipDirectoryReader { /** diff --git a/maintenance/cdb.php b/maintenance/cdb.php index 453464a685..bff2c13faf 100644 --- a/maintenance/cdb.php +++ b/maintenance/cdb.php @@ -24,7 +24,6 @@ use \Cdb\Exception as CdbException; use \Cdb\Reader as CdbReader; -/** */ require_once __DIR__ . '/commandLine.inc'; function cdbShowHelp( $command ) { diff --git a/maintenance/eval.php b/maintenance/eval.php index 499644676a..d98e5cd01c 100644 --- a/maintenance/eval.php +++ b/maintenance/eval.php @@ -32,7 +32,6 @@ $optionsWithArgs = [ 'd' ]; -/** */ require_once __DIR__ . "/commandLine.inc"; if ( isset( $options['d'] ) ) { diff --git a/maintenance/storage/compressOld.php b/maintenance/storage/compressOld.php index 28be6a3311..c17ce99ca7 100644 --- a/maintenance/storage/compressOld.php +++ b/maintenance/storage/compressOld.php @@ -51,13 +51,11 @@ require_once __DIR__ . '/../Maintenance.php'; class CompressOld extends Maintenance { /** * Option to load each revision individually. - * */ const LS_INDIVIDUAL = 0; /** * Option to load revisions in chunks. - * */ const LS_CHUNKED = 1; diff --git a/resources/src/jquery/jquery.expandableField.js b/resources/src/jquery/jquery.expandableField.js index 0bfa8f3075..c3d39dafaf 100644 --- a/resources/src/jquery/jquery.expandableField.js +++ b/resources/src/jquery/jquery.expandableField.js @@ -12,7 +12,6 @@ * $('#textbox').expandableField(); * * Options: - * */ ( function ( $ ) { diff --git a/resources/src/mediawiki.messagePoster/mediawiki.messagePoster.factory.js b/resources/src/mediawiki.messagePoster/mediawiki.messagePoster.factory.js index 558fd4ca8b..b069d4ab4d 100644 --- a/resources/src/mediawiki.messagePoster/mediawiki.messagePoster.factory.js +++ b/resources/src/mediawiki.messagePoster/mediawiki.messagePoster.factory.js @@ -99,7 +99,6 @@ * @param {mw.Title} title Title being posted to * @param {mw.Api} api mw.Api instance that the instance should use * @return {mw.messagePoster.MessagePoster} - * */ MessagePosterFactory.prototype.createForContentModel = function ( contentModel, title, api ) { return new this.contentModelToClass[ contentModel ]( title, api ); diff --git a/resources/src/mediawiki.special/mediawiki.special.recentchanges.js b/resources/src/mediawiki.special/mediawiki.special.recentchanges.js index bdd45bc824..29c0feaf17 100644 --- a/resources/src/mediawiki.special/mediawiki.special.recentchanges.js +++ b/resources/src/mediawiki.special/mediawiki.special.recentchanges.js @@ -21,7 +21,6 @@ $checkboxes.prop( 'disabled', isAllNS ); }, - /** */ init: function () { $select = $( '#namespace' ); $checkboxes = $( '#nsassociated, #nsinvert' ); diff --git a/tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php b/tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php index cbe2e2f533..09c1040b2f 100644 --- a/tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php +++ b/tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php @@ -28,7 +28,6 @@ class WfUrlencodeTest extends MediaWikiTestCase { /** * Internal helper that actually run the test. * Called by the public methods testEncodingUrlWith...() - * */ private function verifyEncodingFor( $server, $input, $expectations ) { $expected = $this->extractExpect( $server, $expectations ); diff --git a/tests/phpunit/includes/MWNamespaceTest.php b/tests/phpunit/includes/MWNamespaceTest.php index 24db44581e..f8de1ad964 100644 --- a/tests/phpunit/includes/MWNamespaceTest.php +++ b/tests/phpunit/includes/MWNamespaceTest.php @@ -10,7 +10,6 @@ * Generated by PHPUnit on 2011-02-20 at 21:01:55. * @todo covers tags * @todo FIXME: this test file is a mess - * */ class MWNamespaceTest extends MediaWikiTestCase { protected function setUp() { diff --git a/tests/phpunit/includes/OutputPageTest.php b/tests/phpunit/includes/OutputPageTest.php index 626987209d..c3faf0d0ba 100644 --- a/tests/phpunit/includes/OutputPageTest.php +++ b/tests/phpunit/includes/OutputPageTest.php @@ -7,7 +7,6 @@ * @group Output * * @todo factor tests in this class into providers and test methods - * */ class OutputPageTest extends MediaWikiTestCase { const SCREEN_MEDIA_QUERY = 'screen and (min-width: 982px)'; diff --git a/tests/phpunit/includes/api/ApiWatchTest.php b/tests/phpunit/includes/api/ApiWatchTest.php index 0cd2707640..7b91094b6c 100644 --- a/tests/phpunit/includes/api/ApiWatchTest.php +++ b/tests/phpunit/includes/api/ApiWatchTest.php @@ -16,8 +16,6 @@ class ApiWatchTest extends ApiTestCase { return $this->getTokenList( self::$users['sysop'] ); } - /** - */ public function testWatchEdit() { $tokens = $this->getTokens(); @@ -74,8 +72,6 @@ class ApiWatchTest extends ApiTestCase { return $data; } - /** - */ public function testWatchProtect() { $tokens = $this->getTokens(); @@ -92,8 +88,6 @@ class ApiWatchTest extends ApiTestCase { $this->assertArrayHasKey( 'edit', $data[0]['protect']['protections'][0] ); } - /** - */ public function testGetRollbackToken() { $this->getTokens(); diff --git a/tests/phpunit/includes/page/WikiPageTest.php b/tests/phpunit/includes/page/WikiPageTest.php index 49d9fd2ae5..a1aa47cea0 100644 --- a/tests/phpunit/includes/page/WikiPageTest.php +++ b/tests/phpunit/includes/page/WikiPageTest.php @@ -5,7 +5,7 @@ * @group Database * ^--- important, causes temporary tables to be used instead of the real database * @group medium - **/ + */ class WikiPageTest extends MediaWikiLangTestCase { protected $pages_to_delete; diff --git a/tests/phpunit/maintenance/MaintenanceTest.php b/tests/phpunit/maintenance/MaintenanceTest.php index cbf94d65d6..cb3d227203 100644 --- a/tests/phpunit/maintenance/MaintenanceTest.php +++ b/tests/phpunit/maintenance/MaintenanceTest.php @@ -24,7 +24,6 @@ use MediaWiki\MediaWikiServices; * Due to a hack in Maintenance.php using register_shutdown_function, be sure to * finally call simulateShutdown on MaintenanceFixup instance before a test * ends. - * */ class MaintenanceFixup extends Maintenance { diff --git a/tests/phpunit/mocks/content/DummyContentHandlerForTesting.php b/tests/phpunit/mocks/content/DummyContentHandlerForTesting.php index 6ed4495dc2..d712254c22 100644 --- a/tests/phpunit/mocks/content/DummyContentHandlerForTesting.php +++ b/tests/phpunit/mocks/content/DummyContentHandlerForTesting.php @@ -34,7 +34,6 @@ class DummyContentHandlerForTesting extends ContentHandler { /** * Creates an empty Content object of the type supported by this ContentHandler. - * */ public function makeEmptyContent() { return new DummyContentForTesting( '' ); diff --git a/tests/phpunit/structure/ResourcesTest.php b/tests/phpunit/structure/ResourcesTest.php index 2e6bf37db8..2fba76b688 100644 --- a/tests/phpunit/structure/ResourcesTest.php +++ b/tests/phpunit/structure/ResourcesTest.php @@ -11,7 +11,6 @@ * @copyright © 2012, Niklas Laxström * @copyright © 2012, Santhosh Thottingal * @copyright © 2012, Timo Tijhof - * */ class ResourcesTest extends MediaWikiTestCase {