Add missing @var and improve documentation

Change-Id: Iee58d1ac85939290c341568ebb10dc757e664425
This commit is contained in:
Umherirrender 2020-12-17 20:55:01 +01:00
parent 14f35b2324
commit 674c24f807
3 changed files with 4 additions and 6 deletions

View file

@ -1,9 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.FunctionComment.ObjectTypeHintParam" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
</rule>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<file>.</file>
<arg name="extensions" value="php" />
<arg name="encoding" value="UTF-8" />

View file

@ -732,7 +732,7 @@ class LoginNotify implements LoggerAwareInterface {
* @param string $key cache key
* @param int $interval The interval of one to send notice
* @param int $expiry When to expire cache key.
* @return bool|int false to not send notice, or number of hits
* @return false|int false to not send notice, or number of hits
*/
private function checkAndIncKey( $key, $interval, $expiry ) {
$cache = $this->cache;

View file

@ -24,6 +24,7 @@ class MigratePreferences extends LoggedUpdateMaintenance {
private const OPTIONS_FAKE_TRUTH = 2;
private const OPTIONS_FAKE_FALSE = 'fake-false';
/** @var bool[] */
private static $mapping = [
self::OPTIONS_FAKE_FALSE => false,
self::OPTIONS_FAKE_TRUTH => true,
@ -100,7 +101,7 @@ class MigratePreferences extends LoggedUpdateMaintenance {
/**
* Update one user's preferences
*
* @param object $userRow Row from the user table
* @param \stdClass $userRow Row from the user table
* @param array &$options Associative array of preference => value
* @return int Number of options updated
*/