Add missing null type hints to Content::isCountable and implementations
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Thu, 25 Feb 2016 13:13:22 +0000 (14:13 +0100)
committerThiemo Mättig <thiemo.maettig@wikimedia.de>
Thu, 25 Feb 2016 13:13:22 +0000 (14:13 +0100)
Change-Id: I6e3128dddd296f6d33da23332b8ff8393837b61b

includes/content/Content.php
includes/content/MessageContent.php
includes/content/TextContent.php
includes/content/WikitextContent.php
tests/phpunit/mocks/content/DummyContentForTesting.php
tests/phpunit/mocks/content/DummyNonTextContent.php

index 76881bc..931128f 100644 (file)
@@ -243,7 +243,7 @@ interface Content {
         *
         * @since 1.21
         *
-        * @param bool $hasLinks If it is known whether this content contains
+        * @param bool|null $hasLinks If it is known whether this content contains
         *    links, provide this information here, to avoid redundant parsing to
         *    find out.
         *
index e3f9375..4b58989 100644 (file)
@@ -136,7 +136,7 @@ class MessageContent extends AbstractContent {
        }
 
        /**
-        * @param bool $hasLinks
+        * @param bool|null $hasLinks
         *
         * @return bool Always false.
         *
index baea812..225522e 100644 (file)
@@ -92,7 +92,7 @@ class TextContent extends AbstractContent {
         * Returns true if this content is not a redirect, and $wgArticleCountMethod
         * is "any".
         *
-        * @param bool $hasLinks If it is known whether this content contains links,
+        * @param bool|null $hasLinks If it is known whether this content contains links,
         * provide this information here, to avoid redundant parsing to find out.
         *
         * @return bool
index c1fef7c..a63819d 100644 (file)
@@ -258,10 +258,10 @@ class WikitextContent extends TextContent {
         * Returns true if this content is not a redirect, and this content's text
         * is countable according to the criteria defined by $wgArticleCountMethod.
         *
-        * @param bool $hasLinks If it is known whether this content contains
+        * @param bool|null $hasLinks If it is known whether this content contains
         *    links, provide this information here, to avoid redundant parsing to
         *    find out (default: null).
-        * @param Title $title Optional title, defaults to the title from the current main request.
+        * @param Title|null $title Optional title, defaults to the title from the current main request.
         *
         * @return bool
         */
index 0c69027..cdb3f78 100644 (file)
@@ -82,7 +82,7 @@ class DummyContentForTesting extends AbstractContent {
         * Returns true if this content is countable as a "real" wiki page, provided
         * that it's also in a countable location (e.g. a current revision in the main namespace).
         *
-        * @param bool $hasLinks If it is known whether this content contains links,
+        * @param bool|null $hasLinks If it is known whether this content contains links,
         * provide this information here, to avoid redundant parsing to find out.
         * @return bool
         */
index 889efb7..afc1a4a 100644 (file)
@@ -82,7 +82,7 @@ class DummyNonTextContent extends AbstractContent {
         * Returns true if this content is countable as a "real" wiki page, provided
         * that it's also in a countable location (e.g. a current revision in the main namespace).
         *
-        * @param bool $hasLinks If it is known whether this content contains links,
+        * @param bool|null $hasLinks If it is known whether this content contains links,
         * provide this information here, to avoid redundant parsing to find out.
         * @return bool
         */