Fix @param tags
authorFomafix <fomafix@googlemail.com>
Wed, 30 Jan 2019 20:24:06 +0000 (21:24 +0100)
committerFomafix <fomafix@googlemail.com>
Sun, 3 Feb 2019 15:49:10 +0000 (16:49 +0100)
* Use 'callable' instead of 'callback'.
* Remove '$' as part of a type name.
* Add missing type.

Change-Id: Ic1b39a7d8cbbee000d8fb2f3a1f71a621bd01993

12 files changed:
includes/http/GuzzleHttpRequest.php
includes/http/MWHttpRequest.php
tests/phpunit/includes/OutputPageTest.php
tests/phpunit/includes/Revision/MutableRevisionSlotsTest.php
tests/phpunit/includes/Revision/RenderedRevisionTest.php
tests/phpunit/includes/Revision/RevisionRendererTest.php
tests/phpunit/includes/Revision/RevisionSlotsTest.php
tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
tests/phpunit/includes/Storage/PageUpdaterTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
tests/phpunit/includes/media/SvgHandlerTest.php
tests/phpunit/maintenance/categoryChangesAsRdfTest.php

index ef70467..e6b2892 100644 (file)
@@ -95,7 +95,7 @@ class GuzzleHttpRequest extends MWHttpRequest {
         * If a sink is already specified, this does nothing.  This causes the 'sink' constructor
         * option to override the 'callback' constructor option.
         *
-        * @param $callback|null $callback
+        * @param callable|null $callback
         * @throws InvalidArgumentException
         */
        protected function doSetCallback( $callback ) {
index 3b56f21..065667d 100644 (file)
@@ -333,7 +333,7 @@ abstract class MWHttpRequest implements LoggerAwareInterface {
         * Worker function for setting callbacks.  Calls can originate both internally and externally
         * via setCallback).  Defaults to the internal read callback if $callback is null.
         *
-        * @param $callback|null $callback
+        * @param callable|null $callback
         * @throws InvalidArgumentException
         */
        protected function doSetCallback( $callback ) {
index 00a08a7..7d40d8c 100644 (file)
@@ -912,7 +912,7 @@ class OutputPageTest extends MediaWikiTestCase {
         * @param array $args Array of form [ category name => sort key ]
         * @param array $fakeResults Array of form [ category name => value to return from mocked
         *   LinkBatch ]
-        * @param callback $variantLinkCallback Callback to replace findVariantLink() call
+        * @param callable $variantLinkCallback Callback to replace findVariantLink() call
         * @param array $expectedNormal Expected return value of getCategoryLinks['normal']
         * @param array $expectedHidden Expected return value of getCategoryLinks['hidden']
         */
index 7279e64..0e565e5 100644 (file)
@@ -31,7 +31,7 @@ class MutableRevisionSlotsTest extends RevisionSlotsTest {
 
        /**
         * @dataProvider provideConstructorFailue
-        * @param $slots
+        * @param array $slots
         *
         * @covers \MediaWiki\Revision\RevisionSlots::__construct
         * @covers \MediaWiki\Revision\RevisionSlots::setSlotsInternal
index 43fccee..9665867 100644 (file)
@@ -78,8 +78,8 @@ class RenderedRevisionTest extends MediaWikiTestCase {
        }
 
        /**
-        * @param $articleId
-        * @param $revisionId
+        * @param int $articleId
+        * @param int $revisionId
         * @return Title
         */
        private function getMockTitle( $articleId, $revisionId ) {
index 59b5a2c..071ea68 100644 (file)
@@ -30,8 +30,8 @@ use WikitextContent;
 class RevisionRendererTest extends MediaWikiTestCase {
 
        /**
-        * @param $articleId
-        * @param $revisionId
+        * @param int $articleId
+        * @param int $revisionId
         * @return Title
         */
        private function getMockTitle( $articleId, $revisionId ) {
index d8e7d92..52593ec 100644 (file)
@@ -31,7 +31,7 @@ class RevisionSlotsTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideConstructorFailue
-        * @param $slots
+        * @param array $slots
         *
         * @covers \MediaWiki\Revision\RevisionSlots::__construct
         * @covers \MediaWiki\Revision\RevisionSlots::setSlotsInternal
index 3339749..92c6f62 100644 (file)
@@ -76,7 +76,7 @@ class DerivedPageDataUpdaterTest extends MediaWikiTestCase {
         * Creates a revision in the database.
         *
         * @param WikiPage $page
-        * @param $summary
+        * @param string|Message|CommentStoreComment $summary
         * @param null|string|Content $content
         *
         * @return RevisionRecord|null
index 89e1d4e..9d60605 100644 (file)
@@ -241,7 +241,7 @@ class PageUpdaterTest extends MediaWikiTestCase {
         * Creates a revision in the database.
         *
         * @param WikiPage $page
-        * @param $summary
+        * @param string|Message|CommentStoreComment $summary
         * @param null|string|Content $content
         *
         * @return RevisionRecord|null
index d1d1aa3..d739839 100644 (file)
@@ -311,8 +311,8 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
        /**
         * @covers Wikimedia\Rdbms\Subquery
         * @dataProvider provideSelectRowCount
-        * @param $sql
-        * @param $sqlText
+        * @param array $sql
+        * @param string $sqlText
         */
        public function testSelectRowCount( $sql, $sqlText ) {
                $this->database->selectRowCount(
index 9c98ada..bce7ac2 100644 (file)
@@ -182,7 +182,7 @@ class SvgHandlerTest extends MediaWikiMediaTestCase {
         * @covers SvgHandler::normaliseParamsInternal()
         * @dataProvider provideNormaliseParamsInternal
         *
-        * @param $message
+        * @param string $message
         * @param int $width
         * @param int $height
         * @param array $params
index 2280629..f5a47d5 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Wikimedia\Rdbms\IDatabase;
+
 /**
  * Tests for CategoryChangesAsRdf recent changes exporter.
  *  @covers CategoryChangesAsRdf
@@ -188,7 +190,7 @@ class CategoryChangesAsRdfTest extends MediaWikiLangTestCase {
 
        /**
         * Mock category links iterator.
-        * @param $dbr
+        * @param IDatabase $dbr
         * @param array $ids
         * @return array
         */