Remove empty lines from PHP and JavaScript comment blocks
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Thu, 8 Dec 2016 16:23:46 +0000 (17:23 +0100)
committerThiemo Mättig (WMDE) <thiemo.maettig@wikimedia.de>
Fri, 9 Dec 2016 09:01:06 +0000 (09:01 +0000)
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

38 files changed:
includes/CategoryFinder.php
includes/DefaultSettings.php
includes/MWNamespace.php
includes/PageProps.php
includes/Revision.php
includes/deferred/LinksDeletionUpdate.php
includes/http/CurlHttpRequest.php
includes/http/PhpHttpRequest.php
includes/libs/IEUrlExtension.php
includes/libs/mime/XmlTypeCheck.php
includes/libs/stats/NullStatsdDataFactory.php
includes/libs/xmp/XMP.php
includes/logging/LogPage.php
includes/page/Article.php
includes/parser/Parser.php
includes/parser/ParserOutput.php
includes/resourceloader/ResourceLoader.php
includes/search/ResultAugmentor.php
includes/search/ResultSetAugmentor.php
includes/search/SearchSuggestion.php
includes/search/SearchSuggestionSet.php
includes/specials/SpecialEditWatchlist.php
includes/user/User.php
includes/utils/ZipDirectoryReader.php
maintenance/cdb.php
maintenance/eval.php
maintenance/storage/compressOld.php
resources/src/jquery/jquery.expandableField.js
resources/src/mediawiki.messagePoster/mediawiki.messagePoster.factory.js
resources/src/mediawiki.special/mediawiki.special.recentchanges.js
tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php
tests/phpunit/includes/MWNamespaceTest.php
tests/phpunit/includes/OutputPageTest.php
tests/phpunit/includes/api/ApiWatchTest.php
tests/phpunit/includes/page/WikiPageTest.php
tests/phpunit/maintenance/MaintenanceTest.php
tests/phpunit/mocks/content/DummyContentHandlerForTesting.php
tests/phpunit/structure/ResourcesTest.php

index 4efa2ff..504b35f 100644 (file)
@@ -40,7 +40,6 @@
  *     $a = $cf->run();
  *     print implode( ',' , $a );
  * @endcode
- *
  */
 class CategoryFinder {
        /** @var int[] The original article IDs passed to the seed function */
index 5557dca..6514c12 100644 (file)
@@ -2031,7 +2031,6 @@ $wgDBmysql5 = false;
  * is in this case an unwanted overhead that just slows things down.
  *
  * @warning EXPERIMENTAL!
- *
  */
 $wgDBOracleDRCP = false;
 
index 61e34ee..4c5561f 100644 (file)
@@ -28,7 +28,6 @@
  *
  * These are synonyms for the names given in the language file
  * Users and translators should not change them
- *
  */
 class MWNamespace {
 
index d09e1fb..382d089 100644 (file)
@@ -25,7 +25,6 @@ use Wikimedia\ScopedCallback;
  * Gives access to properties of a page.
  *
  * @since 1.27
- *
  */
 class PageProps {
 
index b812191..81bba55 100644 (file)
@@ -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();
index 6aa3831..7215696 100644 (file)
@@ -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;
index 7fd3e83..f958ff6 100644 (file)
@@ -37,6 +37,12 @@ class CurlHttpRequest extends MWHttpRequest {
                return strlen( $content );
        }
 
+       /**
+        * @see MWHttpRequest::execute
+        *
+        * @throws MWException
+        * @return Status
+        */
        public function execute() {
                $this->prepare();
 
index d8a9949..3f3803b 100644 (file)
@@ -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();
 
index 16163fb..4a6e3fb 100644 (file)
@@ -253,7 +253,6 @@ class IEUrlExtension {
         *
         * @param $serverSoftware
         * @return bool
-        *
         */
        public static function haveUndecodedRequestUri( $serverSoftware ) {
                static $whitelist = [
index 3958f8c..7f2bf5e 100644 (file)
@@ -291,8 +291,6 @@ class XmlTypeCheck {
                $this->stackDepth++;
        }
 
-       /**
-        */
        private function elementClose() {
                list( $name, $attribs ) = array_pop( $this->elementDataContext );
                $data = array_pop( $this->elementData );
index 3b272e2..fee792f 100644 (file)
@@ -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,
index 29bbf40..d12af7a 100644 (file)
@@ -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 <rdf:value> or <foo:someQualifier>.
         *
         * @param string $elm Namespace and tag name separated by a space.
-        *
         */
        private function startElementModeQDesc( $elm ) {
                if ( $elm === self::NS_RDF . ' value' ) {
index daaff07..64102b7 100644 (file)
@@ -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;
index cc3ef26..a051663 100644 (file)
@@ -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();
index 10dfd26..13dae8f 100644 (file)
@@ -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;
 
        /**
index d2ef5e3..b0768b6 100644 (file)
@@ -823,7 +823,6 @@ class ParserOutput extends CacheTime {
         * @code
         *    $parser->getOutput()->my_ext_foo = '...';
         * @endcode
-        *
         */
        public function setProperty( $name, $value ) {
                $this->mProperties[$name] = $value;
index d624c7c..f9b4b3d 100644 (file)
@@ -391,8 +391,6 @@ class ResourceLoader implements LoggerAwareInterface {
                }
        }
 
-       /**
-        */
        public function registerTestModules() {
                global $IP;
 
index 350b780..df58e71 100644 (file)
@@ -2,7 +2,6 @@
 
 /**
  * Augment search results.
- *
  */
 interface ResultAugmentor {
        /**
index 94710a8..e2d79a9 100644 (file)
@@ -2,7 +2,6 @@
 
 /**
  * Augment search results.
- *
  */
 interface ResultSetAugmentor {
        /**
index 80a437b..4e7c782 100644 (file)
  * 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 {
        /**
index 5a24fd6..caad388 100644 (file)
@@ -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
- *
  */
 
 /**
index 0defcd1..347f0c0 100644 (file)
@@ -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();
index 2ee8ed2..f1742b3 100644 (file)
@@ -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()
         */
index 516e9ae..212f325 100644 (file)
@@ -26,7 +26,6 @@
  *
  * Only a functional interface is provided: ZipFileReader::read(). No access is
  * given to object instances.
- *
  */
 class ZipDirectoryReader {
        /**
index 453464a..bff2c13 100644 (file)
@@ -24,7 +24,6 @@
 use \Cdb\Exception as CdbException;
 use \Cdb\Reader as CdbReader;
 
-/** */
 require_once __DIR__ . '/commandLine.inc';
 
 function cdbShowHelp( $command ) {
index 4996446..d98e5cd 100644 (file)
@@ -32,7 +32,6 @@
 
 $optionsWithArgs = [ 'd' ];
 
-/** */
 require_once __DIR__ . "/commandLine.inc";
 
 if ( isset( $options['d'] ) ) {
index 28be6a3..c17ce99 100644 (file)
@@ -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;
 
index 0bfa8f3..c3d39da 100644 (file)
@@ -12,7 +12,6 @@
  *             $('#textbox').expandableField();
  *
  * Options:
- *
  */
 ( function ( $ ) {
 
index 558fd4c..b069d4a 100644 (file)
@@ -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 );
index bdd45bc..29c0fea 100644 (file)
@@ -21,7 +21,6 @@
                        $checkboxes.prop( 'disabled', isAllNS );
                },
 
-               /** */
                init: function () {
                        $select = $( '#namespace' );
                        $checkboxes = $( '#nsassociated, #nsinvert' );
index cbe2e2f..09c1040 100644 (file)
@@ -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 );
index 24db445..f8de1ad 100644 (file)
@@ -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() {
index 6269872..c3faf0d 100644 (file)
@@ -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)';
index 0cd2707..7b91094 100644 (file)
@@ -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();
 
index 49d9fd2..a1aa47c 100644 (file)
@@ -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;
index cbf94d6..cb3d227 100644 (file)
@@ -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 {
 
index 6ed4495..d712254 100644 (file)
@@ -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( '' );
index 2e6bf37..2fba76b 100644 (file)
@@ -11,7 +11,6 @@
  * @copyright © 2012, Niklas Laxström
  * @copyright © 2012, Santhosh Thottingal
  * @copyright © 2012, Timo Tijhof
- *
  */
 class ResourcesTest extends MediaWikiTestCase {