aboutsummaryrefslogtreecommitdiffstats
path: root/includes/parser
diff options
context:
space:
mode:
authorC. Scott Ananian <cscott@cscott.net>2020-03-31 12:11:00 -0400
committerJforrester <jforrester@wikimedia.org>2020-04-27 18:59:02 +0000
commitefb5afe7ebf6ac6ca6f8acb5cb68008b9e5a0080 (patch)
tree90db8be1cacecd5a8584d293e1ef7e7a285afcbd /includes/parser
parent819da314c6d54c6292241000c610ca8445b64c41 (diff)
downloadmediawikicore-efb5afe7ebf6ac6ca6f8acb5cb68008b9e5a0080.tar.gz
mediawikicore-efb5afe7ebf6ac6ca6f8acb5cb68008b9e5a0080.zip
Fix incorrect return type documentation for Parser::getRevisionUser()
Change-Id: I2ad51797d841e4cc2a433a27bbaa07b5a2f9a62c
Diffstat (limited to 'includes/parser')
-rw-r--r--includes/parser/Parser.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 19c91773207d..a3773794e131 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -5822,9 +5822,9 @@ class Parser {
/**
* Get the name of the user that edited the last revision
*
- * @return string User name
+ * @return string|null User name
*/
- public function getRevisionUser() {
+ public function getRevisionUser(): ?string {
if ( $this->mRevisionUser === null ) {
$revObject = $this->getRevisionObject();
@@ -5834,6 +5834,9 @@ class Parser {
$this->mRevisionUser = $revObject->getUserText();
} elseif ( $this->ot['wiki'] || $this->mOptions->getIsPreview() ) {
$this->mRevisionUser = $this->getUser()->getName();
+ } else {
+ # Note that we fall through here with
+ # $this->mRevisionUser still null
}
}
return $this->mRevisionUser;