Remove some User typehints that are just passthrough

Change-Id: I7183998df9e76c107d46efe17bde0491b500cc62
This commit is contained in:
Petr Pchelko 2021-06-02 18:33:49 -07:00
parent c4243afa47
commit 8f644e7b9b
3 changed files with 8 additions and 6 deletions

View file

@ -29,6 +29,7 @@ use MediaWiki\Permissions\PermissionStatus;
use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Revision\RevisionStore;
use MediaWiki\Revision\SlotRecord;
use MediaWiki\User\UserIdentity;
use MediaWiki\User\UserNameUtils;
use MediaWiki\Watchlist\WatchlistManager;
use Wikimedia\IPUtils;
@ -2290,10 +2291,10 @@ class Article implements Page {
* @since 1.16 (r52326) for LiquidThreads
*
* @param int|null $oldid Revision ID or null
* @param User|null $user The relevant user
* @param UserIdentity|null $user The relevant user
* @return ParserOutput|bool ParserOutput or false if the given revision ID is not found
*/
public function getParserOutput( $oldid = null, User $user = null ) {
public function getParserOutput( $oldid = null, UserIdentity $user = null ) {
if ( $user === null ) {
$parserOptions = $this->getParserOptions();
} else {

View file

@ -21,6 +21,7 @@
*/
use MediaWiki\MediaWikiServices;
use MediaWiki\User\UserIdentity;
use Wikimedia\Rdbms\IResultWrapper;
/**
@ -1036,7 +1037,7 @@ EOT
/**
* Returns the corresponding $wgImageLimits entry for the selected user option
*
* @param User $user
* @param UserIdentity $user
* @param string $optionName Name of a option to check, typically imagesize or thumbsize
* @return int[]
* @since 1.21

View file

@ -2107,11 +2107,11 @@ class WikiPage implements Page, IDBAccessObject, PageRecord {
*
* @see ParserOptions::newCanonical
*
* @param IContextSource|User|string $context One of the following:
* @param IContextSource|UserIdentity|string $context One of the following:
* - IContextSource: Use the User and the Language of the provided
* context
* - User: Use the provided User object and $wgLang for the language,
* so use an IContextSource object if possible.
* - UserIdentity: Use the provided UserIdentity object and $wgLang
* for the language, so use an IContextSource object if possible.
* - 'canonical': Canonical options (anonymous user with default
* preferences and content language).
* @return ParserOptions