From 8e72fa0475fe63459a4ea452b8758796ad45444e Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Wed, 5 Jun 2019 19:19:22 +0200 Subject: [PATCH] Improve @var on User class Add missing @var tags with types or add missing types to @var Change-Id: I34eb4c26d34da072465f1b162fb2d0291610f564 --- includes/user/User.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/includes/user/User.php b/includes/user/User.php index e8ca7ce95e..c41697f961 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -87,6 +87,7 @@ class User implements IDBAccessObject, UserIdentity { * shared cache (memcached). Any operation which changes the * corresponding database fields must call a cache-clearing function. * @showinitializer + * @var string[] */ protected static $mCacheVars = [ // user table @@ -114,6 +115,7 @@ class User implements IDBAccessObject, UserIdentity { * Each of these should have a corresponding message of the form * "right-$right". * @showinitializer + * @var string[] */ protected static $mCoreRights = [ 'apihighlimits', @@ -198,7 +200,7 @@ class User implements IDBAccessObject, UserIdentity { ]; /** - * String Cached results of getAllRights() + * @var string[] Cached results of getAllRights() */ protected static $mAllRights = false; @@ -237,20 +239,20 @@ class User implements IDBAccessObject, UserIdentity { protected $mOptionOverrides; // @} + // @{ /** - * Bool Whether the cache variables have been loaded. + * @var bool Whether the cache variables have been loaded. */ - // @{ public $mOptionsLoaded; /** - * Array with already loaded items or true if all items have been loaded. + * @var array|bool Array with already loaded items or true if all items have been loaded. */ protected $mLoadedItems = []; // @} /** - * String Initialization data source if mLoadedItems!==true. May be one of: + * @var string Initialization data source if mLoadedItems!==true. May be one of: * - 'defaults' anonymous user initialised from class defaults * - 'name' initialise from mName * - 'id' initialise from mId @@ -264,6 +266,7 @@ class User implements IDBAccessObject, UserIdentity { /** * Lazy-initialized variables, invalidated with clearInstanceCache */ + /** @var int|bool */ protected $mNewtalk; /** @var string */ protected $mDatePreference; @@ -299,12 +302,13 @@ class User implements IDBAccessObject, UserIdentity { /** @var bool */ protected $mAllowUsertalk; - /** @var AbstractBlock */ + /** @var AbstractBlock|bool */ private $mBlockedFromCreateAccount = false; /** @var int User::READ_* constant bitfield used to load data */ protected $queryFlagsUsed = self::READ_NORMAL; + /** @var int[] */ public static $idCacheByName = []; /** -- 2.20.1