From 674c24f807f956ea23ac62ae4d08031f58a03dec Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Thu, 17 Dec 2020 20:55:01 +0100 Subject: [PATCH] Add missing @var and improve documentation Change-Id: Iee58d1ac85939290c341568ebb10dc757e664425 --- .phpcs.xml | 5 +---- includes/LoginNotify.php | 2 +- maintenance/migratePreferences.php | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.phpcs.xml b/.phpcs.xml index eaa0e73..eddb6dc 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,9 +1,6 @@ - - - - + . diff --git a/includes/LoginNotify.php b/includes/LoginNotify.php index c00664d..4f26ebc 100644 --- a/includes/LoginNotify.php +++ b/includes/LoginNotify.php @@ -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; diff --git a/maintenance/migratePreferences.php b/maintenance/migratePreferences.php index 5ceac4a..fb0e7dc 100644 --- a/maintenance/migratePreferences.php +++ b/maintenance/migratePreferences.php @@ -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 */