From: Thiemo Mättig Date: Thu, 25 Feb 2016 13:13:22 +0000 (+0100) Subject: Add missing null type hints to Content::isCountable and implementations X-Git-Tag: 1.31.0-rc.0~7839^2 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=0965bf5991ecbb41ace85299834237f649cda77a;p=lhc%2Fweb%2Fwiklou.git Add missing null type hints to Content::isCountable and implementations Change-Id: I6e3128dddd296f6d33da23332b8ff8393837b61b --- diff --git a/includes/content/Content.php b/includes/content/Content.php index 76881bc55f..931128faed 100644 --- a/includes/content/Content.php +++ b/includes/content/Content.php @@ -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. * diff --git a/includes/content/MessageContent.php b/includes/content/MessageContent.php index e3f93759c3..4b58989371 100644 --- a/includes/content/MessageContent.php +++ b/includes/content/MessageContent.php @@ -136,7 +136,7 @@ class MessageContent extends AbstractContent { } /** - * @param bool $hasLinks + * @param bool|null $hasLinks * * @return bool Always false. * diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index baea812576..225522e92d 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -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 diff --git a/includes/content/WikitextContent.php b/includes/content/WikitextContent.php index c1fef7cbb5..a63819dd42 100644 --- a/includes/content/WikitextContent.php +++ b/includes/content/WikitextContent.php @@ -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 */ diff --git a/tests/phpunit/mocks/content/DummyContentForTesting.php b/tests/phpunit/mocks/content/DummyContentForTesting.php index 0c69027d41..cdb3f78ab8 100644 --- a/tests/phpunit/mocks/content/DummyContentForTesting.php +++ b/tests/phpunit/mocks/content/DummyContentForTesting.php @@ -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 */ diff --git a/tests/phpunit/mocks/content/DummyNonTextContent.php b/tests/phpunit/mocks/content/DummyNonTextContent.php index 889efb716c..afc1a4ae94 100644 --- a/tests/phpunit/mocks/content/DummyNonTextContent.php +++ b/tests/phpunit/mocks/content/DummyNonTextContent.php @@ -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 */