jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370819 )

Change subject: Improve some parameter docs
......................................................................


Improve some parameter docs

Change-Id: Ie71fb080926781f2905e6264be060203c56185ea
---
M Hooks.php
M composer.json
M includes/AttributeManager.php
M includes/Bundleable.php
M includes/ContainmentSet.php
M includes/DiffParser.php
M includes/EmailBatch.php
M includes/NotifUser.php
M includes/Notifier.php
M includes/UserLocator.php
M includes/api/ApiEchoNotifications.php
M includes/cache/LocalCache.php
M includes/cache/RevisionLocalCache.php
M includes/cache/TitleLocalCache.php
M includes/controller/NotificationController.php
M includes/formatters/EchoHtmlDigestEmailFormatter.php
M includes/mapper/EventMapper.php
M includes/model/Event.php
M includes/model/Notification.php
M includes/schemaUpdate.php
M includes/special/SpecialNotificationsMarkRead.php
M phpcs.xml
22 files changed, 184 insertions(+), 167 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/Hooks.php b/Hooks.php
index b3bd910..8e3db35 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -77,7 +77,7 @@
         * ResourceLoaderTestModules hook handler
         * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
         *
-        * @param array $testModules
+        * @param array &$testModules
         * @param ResourceLoader $resourceLoader
         * @return bool
         */
@@ -127,6 +127,7 @@
 
        /**
         * Handler for ResourceLoaderRegisterModules hook
+        * @param ResourceLoader &$resourceLoader
         */
        public static function onResourceLoaderRegisterModules( ResourceLoader 
&$resourceLoader ) {
                global $wgEchoEventLoggingSchemas;
@@ -178,7 +179,7 @@
        }
 
        /**
-        * @param $updater DatabaseUpdater object
+        * @param DatabaseUpdater $updater
         */
        public static function onLoadExtensionSchemaUpdates( DatabaseUpdater 
$updater ) {
                global $wgEchoCluster;
@@ -234,8 +235,8 @@
        /**
         * Handler for EchoGetBundleRule hook, which defines the bundle rule 
for each notification
         *
-        * @param $event EchoEvent
-        * @param $bundleString string Determines how the notification should 
be bundled, for example,
+        * @param EchoEvent $event
+        * @param string &$bundleString Determines how the notification should 
be bundled, for example,
         * talk page notification is bundled based on namespace and title, the 
bundle string would be
         * 'edit-user-talk-' + namespace + title, email digest/email bundling 
would use this hash as
         * a key to identify bundle-able event.  For web bundling, we bundle 
further based on user's
@@ -272,8 +273,8 @@
         * Handler for the GetBetaFeaturePreferences hook.
         * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/GetBetaFeaturePreferences
         *
-        * @param $user User to get preferences for
-        * @param &$preferences Preferences array
+        * @param User $user User to get preferences for
+        * @param array &$preferences Preferences array
         *
         * @return bool true in all cases
         */
@@ -302,8 +303,8 @@
         * Handler for GetPreferences hook.
         * @see http://www.mediawiki.org/wiki/Manual:Hooks/GetPreferences
         *
-        * @param $user User to get preferences for
-        * @param &$preferences Preferences array
+        * @param User $user User to get preferences for
+        * @param array &$preferences Preferences array
         *
         * @throws MWException
         * @return bool true in all cases
@@ -501,7 +502,7 @@
 
        /**
         * Test whether email address change is supposed to be allowed
-        * @return boolean
+        * @return bool
         */
        private static function isEmailChangeAllowed() {
                global $wgAuth, $wgDisableAuthManager;
@@ -516,18 +517,18 @@
        /**
         * Handler for PageContentSaveComplete hook
         * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete
-        * @param $article Article edited
-        * @param $user User who edited
-        * @param $content Content New article text
-        * @param $summary string Edit summary
-        * @param $minoredit bool Minor edit or not
-        * @param $watchthis bool Watch this article?
-        * @param $sectionanchor string Section that was edited
-        * @param $flags int Edit flags
-        * @param $revision Revision that was created
-        * @param $status Status
-        * @param $baseRevId Int
-        * @param $undidRevId Int
+        * @param Article &$article Article edited
+        * @param User &$user User who edited
+        * @param Content $content New article text
+        * @param string $summary Edit summary
+        * @param bool $minoredit Minor edit or not
+        * @param bool $watchthis Watch this article?
+        * @param string $sectionanchor Section that was edited
+        * @param int &$flags Edit flags
+        * @param Revision $revision Revision that was created
+        * @param Status &$status
+        * @param int $baseRevId
+        * @param int $undidRevId
         * @return bool true in all cases
         */
        public static function onPageContentSaveComplete( &$article, &$user, 
$content, $summary, $minoredit,
@@ -618,8 +619,8 @@
 
        /**
         * Handler for EchoAbortEmailNotification hook
-        * @param $user User
-        * @param $event EchoEvent
+        * @param User $user
+        * @param EchoEvent $event
         * @return bool true - send email, false - do not send email
         */
        public static function onEchoAbortEmailNotification( $user, $event ) {
@@ -642,7 +643,7 @@
         * Get overrides for new users.  This allows changes that only apply 
going forward,
         * without affecting existing users.
         *
-        * @return Associative array mapping key to boolean for whether it 
should be enabled
+        * @return array Associative array mapping key to bool for whether it 
should be enabled
         */
        public static function getNewUserPreferenceOverrides() {
                return [
@@ -657,8 +658,8 @@
        /**
         * Handler for LocalUserCreated hook.
         * @see http://www.mediawiki.org/wiki/Manual:Hooks/LocalUserCreated
-        * @param $user User object that was created.
-        * @param $autocreated bool True when account was auto-created
+        * @param User $user User object that was created.
+        * @param bool $autocreated True when account was auto-created
         * @return bool
         */
        public static function onLocalUserCreated( $user, $autocreated ) {
@@ -695,6 +696,8 @@
         * @param string[] $remove strings corresponding to groups removed
         * @param User|bool $performer
         * @param string|bool $reason Reason given by the user changing the 
rights
+        * @param array $oldUGMs
+        * @param array $newUGMs
         *
         * @return bool
         */
@@ -764,9 +767,9 @@
        /**
         * Handler for LinksUpdateAfterInsert hook.
         * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/LinksUpdateAfterInsert
-        * @param $linksUpdate LinksUpdate
-        * @param $table string
-        * @param $insertions array
+        * @param LinksUpdate $linksUpdate
+        * @param string $table
+        * @param array $insertions
         * @return bool
         */
        public static function onLinksUpdateAfterInsert( $linksUpdate, $table, 
$insertions ) {
@@ -837,8 +840,8 @@
        /**
         * Handler for BeforePageDisplay hook.
         * @see http://www.mediawiki.org/wiki/Manual:Hooks/BeforePageDisplay
-        * @param $out OutputPage object
-        * @param $skin Skin being used.
+        * @param OutputPage $out OutputPage object
+        * @param Skin $skin Skin being used.
         * @return bool true in all cases
         */
        public static function beforePageDisplay( $out, $skin ) {
@@ -859,8 +862,8 @@
         * Handler for PersonalUrls hook.
         * Add a "Notifications" item to the user toolbar ('personal URLs').
         * @see http://www.mediawiki.org/wiki/Manual:Hooks/PersonalUrls
-        * @param &$personal_urls Array of URLs to append to.
-        * @param &$title Title of page being visited.
+        * @param array &$personal_urls Array of URLs to append to.
+        * @param Title &$title Title of page being visited.
         * @param SkinTemplate $sk
         * @return bool true in all cases
         */
@@ -1065,8 +1068,8 @@
        /**
         * Handler for AbortTalkPageEmailNotification hook.
         * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/AbortTalkPageEmailNotification
-        * @param $targetUser User
-        * @param $title Title
+        * @param User $targetUser
+        * @param Title $title
         * @return bool
         */
        public static function onAbortTalkPageEmailNotification( $targetUser, 
$title ) {
@@ -1087,9 +1090,9 @@
        /**
         * Handler for AbortWatchlistEmailNotification hook.
         * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/AbortWatchlistEmailNotification
-        * @param $targetUser User
-        * @param $title Title
-        * @param $emailNotification EmailNotification The email notification 
object that sends non-echo notifications
+        * @param User $targetUser
+        * @param Title $title
+        * @param EmailNotification $emailNotification The email notification 
object that sends non-echo notifications
         * @return bool
         */
        public static function onSendWatchlistEmailNotification( $targetUser, 
$title, $emailNotification ) {
@@ -1111,8 +1114,8 @@
        /**
         * Handler for MakeGlobalVariablesScript hook.
         * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/MakeGlobalVariablesScript
-        * @param &$vars array Variables to be added into the output
-        * @param $outputPage OutputPage instance calling the hook
+        * @param array &$vars Variables to be added into the output
+        * @param OutputPage $outputPage OutputPage instance calling the hook
         * @return bool true in all cases
         */
        public static function makeGlobalVariablesScript( &$vars, OutputPage 
$outputPage ) {
@@ -1158,12 +1161,12 @@
         * ArticleEditUpdateNewTalk hook since we still want the user_newtalk 
data
         * to be updated and availble to client-side tools and the API.
         * @see http://www.mediawiki.org/wiki/Manual:Hooks/GetNewMessagesAlert
-        * @param &$newMessagesAlert String An alert that the user has new 
messages
+        * @param string &$newMessagesAlert An alert that the user has new 
messages
         *     or an empty string if the user does not (empty by default)
-        * @param $newtalks Array This will be empty if the user has no new 
messages
+        * @param array $newtalks This will be empty if the user has no new 
messages
         *     or an Array containing links and revisions if there are new 
messages
-        * @param $user User The user who is loading the page
-        * @param $out Output object
+        * @param User $user The user who is loading the page
+        * @param OutputPage $out Output object
         * @return bool Should return false to prevent the new messages alert 
(OBOD)
         *     or true to allow the new messages alert
         */
@@ -1186,10 +1189,10 @@
        /**
         * Handler for ArticleRollbackComplete hook.
         * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/ArticleRollbackComplete
-        * @param $page WikiPage The article that was edited
-        * @param $agent User The user who did the rollback
-        * @param $newRevision Revision The revision the page was reverted back 
to
-        * @param $oldRevision Revision The revision of the top edit that was 
reverted
+        * @param WikiPage $page The article that was edited
+        * @param User $agent The user who did the rollback
+        * @param Revision $newRevision The revision the page was reverted back 
to
+        * @param Revision $oldRevision The revision of the top edit that was 
reverted
         * @return bool true in all cases
         */
        public static function onRollbackComplete( $page, $agent, $newRevision, 
$oldRevision ) {
@@ -1218,7 +1221,7 @@
        /**
         * Handler for UserSaveSettings hook.
         * @see http://www.mediawiki.org/wiki/Manual:Hooks/UserSaveSettings
-        * @param $user User whose settings were saved
+        * @param User $user whose settings were saved
         * @return bool true in all cases
         */
        public static function onUserSaveSettings( $user ) {
@@ -1239,8 +1242,8 @@
        /**
         * Handler for UserLoadOptions hook.
         * @see http://www.mediawiki.org/wiki/Manual:Hooks/UserLoadOptions
-        * @param $user User whose options were loaded
-        * @param $options Options can be modified
+        * @param User $user User whose options were loaded
+        * @param array &$options Options can be modified
         * @return bool true in all cases
         */
        public static function onUserLoadOptions( $user, &$options ) {
@@ -1255,8 +1258,8 @@
        /**
         * Handler for UserSaveOptions hook.
         * @see http://www.mediawiki.org/wiki/Manual:Hooks/UserSaveOptions
-        * @param $user User whose options are being saved
-        * @param $options Options can be modified
+        * @param User $user User whose options are being saved
+        * @param array &$options Options can be modified
         * @return bool true in all cases
         */
        public static function onUserSaveOptions( $user, &$options ) {
@@ -1273,7 +1276,7 @@
        /**
         * Handler for UserClearNewTalkNotification hook.
         * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/UserClearNewTalkNotification
-        * @param $user User whose talk page notification should be marked as 
read
+        * @param User $user User whose talk page notification should be marked 
as read
         * @return bool true in all cases
         */
        public static function onUserClearNewTalkNotification( User $user ) {
@@ -1289,7 +1292,7 @@
        /**
         * Handler for ParserTestTables hook, makes sure that Echo's tables are 
present during tests
         * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/UserClearNewTalkNotification
-        * @param array $tables List of DB tables to be used for parser tests
+        * @param array &$tables List of DB tables to be used for parser tests
         * @return bool true in all cases
         */
        public static function onParserTestTables( &$tables ) {
@@ -1303,10 +1306,10 @@
        /**
         * Handler for EmailUserComplete hook.
         * @see https://www.mediawiki.org/wiki/Manual:Hooks/EmailUserComplete
-        * @param $address MailAddress Adress of receiving user
-        * @param $from MailAddress Adress of sending user
-        * @param $subject string Subject of the mail
-        * @param $text string Text of the mail
+        * @param MailAddress $address Adress of receiving user
+        * @param MailAddress $from Adress of sending user
+        * @param string $subject Subject of the mail
+        * @param string $text Text of the mail
         * @return bool true in all cases
         */
        public static function onEmailUserComplete( $address, $from, $subject, 
$text ) {
@@ -1343,7 +1346,7 @@
        /**
         * For integration with the UserMerge extension.
         *
-        * @param array $updateFields
+        * @param array &$updateFields
         * @return bool
         */
        public static function onUserMergeAccountFields( &$updateFields ) {
@@ -1378,7 +1381,7 @@
        /**
         * Sets custom login message for redirect from notification page
         *
-        * @param array $messages
+        * @param array &$messages
         * @return bool
         */
        public static function onLoginFormValidErrorMessages( &$messages ) {
diff --git a/composer.json b/composer.json
index 55507be..91c6304 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
        },
        "scripts": {
                "test": [
-                       "parallel-lint . --exclude vendor",
+                       "parallel-lint . --exclude vendor --exclude 
node_modules",
                        "phpcs -p -s"
                ],
                "fix": [
diff --git a/includes/AttributeManager.php b/includes/AttributeManager.php
index 7c9fb4c..d918f19 100644
--- a/includes/AttributeManager.php
+++ b/includes/AttributeManager.php
@@ -215,7 +215,7 @@
        /**
         * Gets array of internal category names
         *
-        * @return All internal names
+        * @return array All internal names
         */
        public function getInternalCategoryNames() {
                return array_keys( $this->categories );
@@ -225,8 +225,8 @@
         * See if a user is eligible to receive a certain type of notification
         * (based on user groups, not user preferences)
         *
-        * @param User
-        * @param string A notification category defined in 
$wgEchoNotificationCategories
+        * @param User $user
+        * @param string $category A notification category defined in 
$wgEchoNotificationCategories
         * @return bool
         */
        public function getCategoryEligibility( $user, $category ) {
@@ -244,7 +244,7 @@
        /**
         * Get the priority for a specific notification type
         *
-        * @param string A notification type defined in $wgEchoNotifications
+        * @param string $notificationType A notification type defined in 
$wgEchoNotifications
         * @return int From 1 to 10 (10 is default)
         */
        public function getNotificationPriority( $notificationType ) {
@@ -256,7 +256,7 @@
        /**
         * Get the priority for a notification category
         *
-        * @param string A notification category defined in 
$wgEchoNotificationCategories
+        * @param string $category A notification category defined in 
$wgEchoNotificationCategories
         * @return int From 1 to 10 (10 is default)
         */
        public function getCategoryPriority( $category ) {
@@ -273,7 +273,7 @@
        /**
         * Get the notification category for a notification type
         *
-        * @param string A notification type defined in $wgEchoNotifications
+        * @param string $notificationType A notification type defined in 
$wgEchoNotifications
         * @return string The name of the notification category or 'other' if no
         *     category is explicitly assigned.
         */
@@ -322,6 +322,7 @@
         *
         * @param string $category Category name
         * @param string $notifyType notify type, e.g. email/web.
+        * @return bool
         */
        public function isNotifyTypeAvailableForCategory( $category, 
$notifyType ) {
                if ( isset( 
$this->notifyTypeAvailabilityByCategory[$category][$notifyType] ) ) {
@@ -335,6 +336,7 @@
         * Checks whether category is displayed in preferences
         *
         * @param string $category Category name
+        * @return bool
         */
        public function isCategoryDisplayedInPreferences( $category ) {
                return !(
@@ -352,6 +354,7 @@
         *
         * @param string $category Name of category
         * @param string $notifyType notify type, e.g. email/web.
+        * @return bool
         */
        public function isNotifyTypeDismissableForCategory( $category, 
$notifyType ) {
                return !(
diff --git a/includes/Bundleable.php b/includes/Bundleable.php
index 837aa13..2469027 100644
--- a/includes/Bundleable.php
+++ b/includes/Bundleable.php
@@ -8,7 +8,7 @@
 interface Bundleable {
 
        /**
-        * @return boolean Whether this object can be bundled.
+        * @return bool Whether this object can be bundled.
         */
        public function canBeBundled();
 
diff --git a/includes/ContainmentSet.php b/includes/ContainmentSet.php
index 70f2ef0..4b6ce1f 100644
--- a/includes/ContainmentSet.php
+++ b/includes/ContainmentSet.php
@@ -50,7 +50,7 @@
        /**
         * Add an EchoContainmentList to the set of lists checked by 
self::contains()
         *
-        * @param $list EchoContainmentList
+        * @param EchoContainmentList $list
         */
        public function add( EchoContainmentList $list ) {
                $this->lists[] = $list;
@@ -59,7 +59,7 @@
        /**
         * Add a php array to the set of lists checked by self::contains()
         *
-        * @param $list array
+        * @param array $list
         */
        public function addArray( array $list ) {
                $this->add( new EchoArrayList( $list ) );
@@ -68,7 +68,7 @@
        /**
         * Add a list from a user preference to the set of lists checked by 
self::contains().
         *
-        * @param $preferenceName string
+        * @param string $preferenceName
         */
        public function addFromUserOption( $preferenceName ) {
                $preference = $this->recipient->getOption( $preferenceName );
@@ -85,10 +85,10 @@
         * from wiki pages is cached via the BagOStuff.  Caching is disabled 
when passing a null
         * $cache object.
         *
-        * @param $namespace      integer   An NS_* constant representing the 
mediawiki namespace of the page containing the list.
-        * @param $title          string    The title of the page containing 
the list.
-        * @param $cache          BagOStuff An object to cache the page with or 
null for no cache.
-        * @param $cacheKeyPrefix string    A prefix to be combined with the 
pages latest revision id and used as a cache key.
+        * @param int $namespace An NS_* constant representing the mediawiki 
namespace of the page containing the list.
+        * @param string $title The title of the page containing the list.
+        * @param BagOStuff $cache An object to cache the page with or null for 
no cache.
+        * @param string $cacheKeyPrefix A prefix to be combined with the pages 
latest revision id and used as a cache key.
         *
         * @throws MWException
         */
@@ -106,7 +106,7 @@
        /**
         * Test the wrapped lists for existence of $value
         *
-        * @param $value mixed The value to look for
+        * @param mixed $value The value to look for
         * @return bool True when the set contains the provided value
         */
        public function contains( $value ) {
@@ -132,21 +132,21 @@
        protected $list;
 
        /**
-        * @param $list array
+        * @param array $list
         */
        public function __construct( array $list ) {
                $this->list = $list;
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function getValues() {
                return $this->list;
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function getCacheKey() {
                return '';
@@ -165,8 +165,8 @@
        protected $title;
 
        /**
-        * @param $titleNs     integer An NS_* constant representing the 
mediawiki namespace of the page
-        * @param $titleString string  String portion of the wiki page title
+        * @param int $titleNs An NS_* constant representing the mediawiki 
namespace of the page
+        * @param string $titleString String portion of the wiki page title
         */
        public function __construct( $titleNs, $titleString ) {
                $title = Title::newFromText( $titleString, $titleNs );
@@ -176,7 +176,7 @@
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function getValues() {
                if ( !$this->title ) {
@@ -195,7 +195,7 @@
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function getCacheKey() {
                if ( !$this->title ) {
@@ -221,11 +221,11 @@
        private $result;
 
        /**
-        * @param $cache           BagOStuff           Bag to stored cached 
data in.
-        * @param $partialCacheKey string              Partial cache key, 
$nestedList->getCacheKey() will be appended to this
-        *                                             to construct the cache 
key used.
-        * @param $nestedList      EchoContainmentList The nested 
EchoContainmentList to cache the result of.
-        * @param $timeout         integer             How long in seconds to 
cache the nested list, defaults to 1 week.
+        * @param BagOStuff $cache Bag to stored cached data in.
+        * @param string $partialCacheKey Partial cache key, 
$nestedList->getCacheKey() will be appended
+        *   to this to construct the cache key used.
+        * @param EchoContainmentList $nestedList The nested 
EchoContainmentList to cache the result of.
+        * @param int $timeout How long in seconds to cache the nested list, 
defaults to 1 week.
         */
        public function __construct( BagOStuff $cache, $partialCacheKey, 
EchoContainmentList $nestedList, $timeout = self::ONE_WEEK ) {
                $this->cache = $cache;
@@ -235,7 +235,7 @@
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function getValues() {
                if ( $this->result ) {
@@ -262,7 +262,7 @@
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function getCacheKey() {
                return $this->partialCacheKey . '_' . 
$this->nestedList->getCacheKey();
diff --git a/includes/DiffParser.php b/includes/DiffParser.php
index fc56608..7b70fae 100644
--- a/includes/DiffParser.php
+++ b/includes/DiffParser.php
@@ -32,7 +32,7 @@
 class EchoDiffParser {
 
        /**
-        * @var integer $prefixLength The number of characters the diff 
prefixes a line with
+        * @var int $prefixLength The number of characters the diff prefixes a 
line with
         */
        protected $prefixLength = 1;
 
@@ -42,7 +42,7 @@
        protected $left;
 
        /**
-        * @var integer $leftPos The current position within the left text
+        * @var int $leftPos The current position within the left text
         */
        protected $leftPos;
 
@@ -52,7 +52,7 @@
        protected $right;
 
        /**
-        * @var integer $rightPos The current position within the right text
+        * @var int $rightPos The current position within the right text
         */
        protected $rightPos;
 
@@ -122,6 +122,7 @@
         * if we are using internal or external diff utilities
         *
         * @deprecated since 1.29, the internal diff parser is always used
+        * @return bool
         */
        protected static function usingInternalDiff() {
                return true;
@@ -259,8 +260,8 @@
        protected $old = [];
 
        /**
-        * @param integer $leftPos The starting line number in the left text
-        * @param integer $rightPos The starting line number in the right text
+        * @param int $leftPos The starting line number in the left text
+        * @param int $rightPos The starting line number in the right text
         */
        public function __construct( $leftPos, $rightPos ) {
                // +1 due to the origional code use 1 indexing for this result
diff --git a/includes/EmailBatch.php b/includes/EmailBatch.php
index c50daaa..7550fed 100644
--- a/includes/EmailBatch.php
+++ b/includes/EmailBatch.php
@@ -37,7 +37,7 @@
        protected static $displaySize = 20;
 
        /**
-        * @param $user User
+        * @param User $user
         */
        public function __construct( User $user ) {
                $this->mUser = $user;
@@ -52,8 +52,8 @@
         *  0 - instant
         *  1 - once everyday
         *  7 - once every 7 days
-        * @param $userId int
-        * @param $enforceFrequency boolean Whether or not email sending 
frequency should
+        * @param int $userId
+        * @param bool $enforceFrequency Whether or not email sending frequency 
should
         *  be enforced.
         *
         *  When true, today's notifications won't be returned if they are
@@ -291,10 +291,10 @@
        /**
         * Insert notification event into email queue
         *
-        * @param $userId int
-        * @param $eventId int
-        * @param $priority int
-        * @param $hash string
+        * @param int $userId
+        * @param int $eventId
+        * @param int $priority
+        * @param string $hash
         *
         * @throws MWException
         */
@@ -329,8 +329,8 @@
        /**
         * Get a list of users to be notified for the batch
         *
-        * @param $startUserId int
-        * @param $batchSize int
+        * @param int $startUserId
+        * @param int $batchSize
         *
         * @throws MWException
         * @return ResultWrapper|bool
diff --git a/includes/NotifUser.php b/includes/NotifUser.php
index 72a13e5..526317f 100644
--- a/includes/NotifUser.php
+++ b/includes/NotifUser.php
@@ -85,7 +85,7 @@
 
        /**
         * Factory method
-        * @param $user User
+        * @param User $user
         * @throws MWException
         * @return MWEchoNotifUser
         */
@@ -146,6 +146,7 @@
 
        /**
         * Memcache key for talk notification
+        * @return string
         */
        public function getTalkNotificationCacheKey() {
                global $wgEchoCacheVersion;
@@ -167,7 +168,7 @@
        /**
         * Get message count for this user.
         *
-        * @param boolean $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
+        * @param bool $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
         * @param int $dbSource Use master or slave database to pull count 
(Optional. Defaults to DB_SLAVE)
         * @return int
         */
@@ -178,7 +179,7 @@
        /**
         * Get alert count for this user.
         *
-        * @param boolean $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
+        * @param bool $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
         * @param int $dbSource Use master or slave database to pull count 
(Optional. Defaults to DB_SLAVE)
         * @return int
         */
@@ -196,7 +197,7 @@
         *
         * If $wgEchoCrossWikiNotifications is disabled, the $global parameter 
is ignored.
         *
-        * @param boolean $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
+        * @param bool $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
         * @param int $dbSource Use master or slave database to pull count 
(Optional. Defaults to DB_SLAVE)
         * @param string $section Notification section
         * @param bool|string $global Whether to include foreign notifications. 
If set to 'preference', uses the user's preference.
@@ -245,7 +246,7 @@
        /**
         * Get the timestamp of the latest unread alert
         *
-        * @param boolean $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
+        * @param bool $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
         * @param int $dbSource Use master or slave database to pull count 
(Optional. Defaults to DB_SLAVE)
         * @return bool|MWTimestamp Timestamp of latest unread alert, or false 
if there are no unread alerts.
         */
@@ -256,7 +257,7 @@
        /**
         * Get the timestamp of the latest unread message
         *
-        * @param boolean $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
+        * @param bool $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
         * @param int $dbSource Use master or slave database to pull count 
(Optional. Defaults to DB_SLAVE)
         * @return bool|MWTimestamp
         */
@@ -269,7 +270,7 @@
         *
         * If $wgEchoCrossWikiNotifications is disabled, the $global parameter 
is ignored.
         *
-        * @param boolean $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
+        * @param bool $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
         * @param int $dbSource Use master or slave database to pull count 
(Optional. Defaults to DB_SLAVE)
         * @param string $section Notification section
         * @param bool|string $global Whether to include foreign notifications. 
If set to 'preference', uses the user's preference.
@@ -348,7 +349,7 @@
 
        /**
         * Mark one or more notifications read for a user.
-        * @param $eventIds Array of event IDs to mark read
+        * @param array $eventIds Array of event IDs to mark read
         * @return bool
         */
        public function markRead( $eventIds ) {
@@ -380,7 +381,7 @@
 
        /**
         * Mark one or more notifications unread for a user.
-        * @param $eventIds Array of event IDs to mark unread
+        * @param array $eventIds Array of event IDs to mark unread
         * @return bool
         */
        public function markUnRead( $eventIds ) {
@@ -468,7 +469,7 @@
         * Invalidate cache and update echo_unread_wikis if x-wiki 
notifications is enabled
         * NOTE: Consider calling this function from a deferred update since it 
may access the db
         *
-        * @param $dbSource int use master or replica database to pull count
+        * @param int $dbSource Use master or replica database to pull count
         */
        public function resetNotificationCount( $dbSource = DB_REPLICA ) {
                global $wgEchoCrossWikiNotifications;
diff --git a/includes/Notifier.php b/includes/Notifier.php
index 8a49efc..409e2d0 100644
--- a/includes/Notifier.php
+++ b/includes/Notifier.php
@@ -6,8 +6,8 @@
         * Record an EchoNotification for an EchoEvent
         * Currently used for web-based notifications.
         *
-        * @param $user User to notify.
-        * @param $event EchoEvent to notify about.
+        * @param User $user User to notify.
+        * @param EchoEvent $event EchoEvent to notify about.
         */
        public static function notifyWithNotification( $user, $event ) {
                // Only create the notification if the user wants to receive 
that type
@@ -26,8 +26,8 @@
        /**
         * Send a Notification to a user by email
         *
-        * @param $user User to notify.
-        * @param $event EchoEvent to notify about.
+        * @param User $user User to notify.
+        * @param EchoEvent $event EchoEvent to notify about.
         * @return bool
         */
        public static function notifyWithEmail( $user, $event ) {
diff --git a/includes/UserLocator.php b/includes/UserLocator.php
index 286ded2..afe9a3d 100644
--- a/includes/UserLocator.php
+++ b/includes/UserLocator.php
@@ -8,6 +8,7 @@
         * heavily watched pages when this is used.
         *
         * @param EchoEvent $event
+        * @param int $batchSize
         * @return User[]
         */
        public static function locateUsersWatchingTitle( EchoEvent $event, 
$batchSize = 500 ) {
@@ -78,7 +79,7 @@
         * Return the user that created the first revision of the
         * associated title.
         *
-        * @param EchoEvent $evnet
+        * @param EchoEvent $event
         * @return User[]
         */
        public static function locateArticleCreator( EchoEvent $event ) {
diff --git a/includes/api/ApiEchoNotifications.php 
b/includes/api/ApiEchoNotifications.php
index e8f4797..870d9f7 100644
--- a/includes/api/ApiEchoNotifications.php
+++ b/includes/api/ApiEchoNotifications.php
@@ -142,7 +142,7 @@
         * @param string $continue
         * @param string $format
         * @param Title[] $titles
-        * @param boolean $unreadFirst
+        * @param bool $unreadFirst
         * @param bool $bundle
         * @return array
         */
@@ -175,7 +175,7 @@
         * @param string $continue
         * @param string $format
         * @param Title[] $titles
-        * @param boolean $unreadFirst
+        * @param bool $unreadFirst
         * @param bool $bundle
         * @return array
         */
@@ -287,7 +287,7 @@
         * Internal helper method for getting property 'count' data
         * @param User $user
         * @param string[] $sections
-        * @param boolean $groupBySection
+        * @param bool $groupBySection
         * @return array
         */
        protected function getPropCount( User $user, array $sections, 
$groupBySection ) {
@@ -314,7 +314,7 @@
         * Internal helper method for getting property 'seenTime' data
         * @param User $user
         * @param string[] $sections
-        * @param boolean $groupBySection
+        * @param bool $groupBySection
         * @return array
         */
        protected function getPropSeenTime( User $user, array $sections, 
$groupBySection ) {
@@ -631,6 +631,7 @@
 
        /**
         * @see ApiBase::getExamplesMessages()
+        * @return array
         */
        protected function getExamplesMessages() {
                return [
diff --git a/includes/cache/LocalCache.php b/includes/cache/LocalCache.php
index 0e2b974..d951e30 100644
--- a/includes/cache/LocalCache.php
+++ b/includes/cache/LocalCache.php
@@ -41,6 +41,7 @@
         * Add a key to the lookup and the key is used to resolve cache target
         *
         * @param int $key
+        * @param null $target
         */
        public function add( $key, $target = null ) {
                if (
diff --git a/includes/cache/RevisionLocalCache.php 
b/includes/cache/RevisionLocalCache.php
index ef109aa..9831de4 100644
--- a/includes/cache/RevisionLocalCache.php
+++ b/includes/cache/RevisionLocalCache.php
@@ -23,7 +23,7 @@
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        protected function resolve() {
                if ( $this->lookups ) {
diff --git a/includes/cache/TitleLocalCache.php 
b/includes/cache/TitleLocalCache.php
index 9e2ce2e..6c43790 100644
--- a/includes/cache/TitleLocalCache.php
+++ b/includes/cache/TitleLocalCache.php
@@ -23,7 +23,7 @@
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        protected function resolve() {
                if ( $this->lookups ) {
diff --git a/includes/controller/NotificationController.php 
b/includes/controller/NotificationController.php
index 3e95d9d..788a60f 100644
--- a/includes/controller/NotificationController.php
+++ b/includes/controller/NotificationController.php
@@ -55,7 +55,7 @@
        * If using it in sentence context, pass the value from 
getCappedNotificationCount
        * into a message and use PLURAL.  Example: 
notification-bundle-header-page-linked
        *
-       * @param int count Notification count
+       * @param int $count Notification count
        * @return string Formatted count, after applying cap then formatting to 
string
        */
        public static function formatNotificationCount( $count ) {
@@ -68,7 +68,7 @@
         * Processes notifications for a newly-created EchoEvent
         *
         * @param EchoEvent $event
-        * @param boolean $defer Defer to job queue or not
+        * @param bool $defer Defer to job queue or not
         */
        public static function notify( $event, $defer = true ) {
                // Defer to job queue if defer to job queue is requested and
@@ -460,6 +460,12 @@
         *
         * Converts E_RECOVERABLE_ERROR, such as passing null to a method 
expecting
         * a non-null object, into exceptions.
+        * @param int $errno
+        * @param string $errstr
+        * @param string $errfile
+        * @param int $errline
+        * @return bool
+        * @throw EchoCatchableFatalErrorException
         */
        public static function formatterErrorHandler( $errno, $errstr, 
$errfile, $errline ) {
                if ( $errno !== E_RECOVERABLE_ERROR ) {
diff --git a/includes/formatters/EchoHtmlDigestEmailFormatter.php 
b/includes/formatters/EchoHtmlDigestEmailFormatter.php
index 459b123..f2f96cc 100644
--- a/includes/formatters/EchoHtmlDigestEmailFormatter.php
+++ b/includes/formatters/EchoHtmlDigestEmailFormatter.php
@@ -154,7 +154,7 @@
 
        /**
         * Apply style to notification category header
-        * @param string $category. Can contain HTML. Is included as-is in HTML 
template, is not escaped.
+        * @param string $category Can contain HTML. Is included as-is in HTML 
template, is not escaped.
         * @return string
         */
        protected function applyStyleToCategory( $category ) {
diff --git a/includes/mapper/EventMapper.php b/includes/mapper/EventMapper.php
index aeee3bd..4a3b2fe 100644
--- a/includes/mapper/EventMapper.php
+++ b/includes/mapper/EventMapper.php
@@ -9,7 +9,7 @@
        /**
         * Insert an event record
         *
-        * @param EchoEvent
+        * @param EchoEvent $event
         * @return int|bool
         */
        public function insert( EchoEvent $event ) {
@@ -41,8 +41,8 @@
        /**
         * Create an EchoEvent by id
         *
-        * @param int
-        * @param boolean
+        * @param int $id
+        * @param bool $fromMaster
         * @return EchoEvent|bool false if it wouldn't load/unserialize
         * @throws MWException
         */
diff --git a/includes/model/Event.php b/includes/model/Event.php
index be8b092..ecc0941 100644
--- a/includes/model/Event.php
+++ b/includes/model/Event.php
@@ -89,7 +89,7 @@
 
        /**
         * Creates an EchoEvent object
-        * @param $info array Named arguments:
+        * @param array $info Named arguments:
         * type (required): The event type;
         * variant: A variant of the type;
         * agent: The user who caused the event;
@@ -271,7 +271,7 @@
        /**
         * Loads data from the provided $row into this object.
         *
-        * @param $row stdClass row object from echo_event
+        * @param stdClass $row row object from echo_event
         * @return bool Whether loading was successful
         */
        public function loadFromRow( $row ) {
@@ -333,8 +333,8 @@
 
        /**
         * Loads data from the database into this object, given the event ID.
-        * @param $id int Event ID
-        * @param $fromMaster bool
+        * @param int $id Event ID
+        * @param bool $fromMaster
         * @return bool Whether it loaded successfully
         */
        public function loadFromID( $id, $fromMaster = false ) {
@@ -364,7 +364,7 @@
        /**
         * Creates an EchoEvent from a row object
         *
-        * @param $row stdClass row object from echo_event
+        * @param stdClass $row row object from echo_event
         * @return EchoEvent|bool
         */
        public static function newFromRow( $row ) {
@@ -377,7 +377,7 @@
        /**
         * Creates an EchoEvent from the database by ID
         *
-        * @param $id int Event ID
+        * @param int $id Event ID
         * @return EchoEvent|bool
         */
        public static function newFromID( $id ) {
@@ -430,11 +430,11 @@
         * field of this revision, if it's marked as deleted.  When no
         * revision is attached always returns true.
         *
-        * @param $field Integer:one of Revision::DELETED_TEXT,
+        * @param int $field One of Revision::DELETED_TEXT,
         *                              Revision::DELETED_COMMENT,
         *                              Revision::DELETED_USER
-        * @param $user User object to check
-        * @return Boolean
+        * @param User $user User object to check
+        * @return bool
         */
        public function userCan( $field, User $user ) {
                $revision = $this->getRevision();
@@ -616,7 +616,7 @@
        /**
         * Get the message key of the primary or secondary link for a 
notification type.
         *
-        * @param $rank String 'primary' or 'secondary'
+        * @param String $rank 'primary' or 'secondary'
         * @return String i18n message key
         */
        public function getLinkMessage( $rank ) {
@@ -632,7 +632,7 @@
        /**
         * Get the link destination of the primary or secondary link for a 
notification type.
         *
-        * @param $rank String 'primary' or 'secondary'
+        * @param String $rank 'primary' or 'secondary'
         * @return String The link destination, e.g. 'agent'
         */
        public function getLinkDestination( $rank ) {
@@ -653,7 +653,7 @@
        }
 
        /**
-        * @param $hash string
+        * @param string $hash
         */
        public function setBundleHash( $hash ) {
                $this->bundleHash = $hash;
@@ -675,28 +675,28 @@
        }
 
        /**
-        * @inheritdoc
+        * @inheritDoc
         */
        public function canBeBundled() {
                return true;
        }
 
        /**
-        * @inheritdoc
+        * @inheritDoc
         */
        public function getBundlingKey() {
                return $this->getBundleHash();
        }
 
        /**
-        * @inheritdoc
+        * @inheritDoc
         */
        public function setBundledElements( $bundleables ) {
                $this->setBundledEvents( $bundleables );
        }
 
        /**
-        * @inheritdoc
+        * @inheritDoc
         */
        public function getSortingKey() {
                return $this->getTimestamp();
diff --git a/includes/model/Notification.php b/includes/model/Notification.php
index a15037c..4c5f338 100644
--- a/includes/model/Notification.php
+++ b/includes/model/Notification.php
@@ -62,7 +62,7 @@
 
        /**
         * Creates an EchoNotification object based on event and user
-        * @param $info array The following keys are required:
+        * @param array $info The following keys are required:
         * - 'event' The EchoEvent being notified about.
         * - 'user' The User being notified.
         * @throws MWException
@@ -151,8 +151,8 @@
 
        /**
         * Load a notification record from std class
-        * @param stdClass
-        * @param EchoTargetPage[]|null An array of EchoTargetPage instances, 
or null if not loaded.
+        * @param stdClass $row
+        * @param EchoTargetPage[]|null $targetPages An array of EchoTargetPage 
instances, or null if not loaded.
         * @return EchoNotification|bool false if failed to load/unserialize
         */
        public static function newFromRow( $row, $targetPages = null ) {
@@ -279,28 +279,28 @@
        }
 
        /**
-        * @inheritdoc
+        * @inheritDoc
         */
        public function canBeBundled() {
                return !$this->isRead();
        }
 
        /**
-        * @inheritdoc
+        * @inheritDoc
         */
        public function getBundlingKey() {
                return $this->getBundleHash();
        }
 
        /**
-        * @inheritdoc
+        * @inheritDoc
         */
        public function setBundledElements( $bundleables ) {
                $this->setBundledNotifications( $bundleables );
        }
 
        /**
-        * @inheritdoc
+        * @inheritDoc
         */
        public function getSortingKey() {
                return ( $this->isRead() ? '0' : '1' ) . '_' . 
$this->getTimestamp();
diff --git a/includes/schemaUpdate.php b/includes/schemaUpdate.php
index 592c222..4bc58da 100644
--- a/includes/schemaUpdate.php
+++ b/includes/schemaUpdate.php
@@ -12,7 +12,7 @@
        protected $newTitleFromNsAndText = [ 'Title', 'makeTitleSafe' ];
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function update( $row ) {
                $update = $this->updatePageIdFromTitle( $row );
@@ -26,7 +26,7 @@
        /**
         * Hackish method of mocking Title::newFromText for tests
         *
-        * @param $callable callable
+        * @param callable $callable
         */
        public function setNewTitleFromNsAndText( $callable ) {
                $this->newTitleFromNsAndText = $callable;
@@ -35,8 +35,8 @@
        /**
         * Hackish method of mocking Title::makeTitleSafe for tests
         *
-        * @param $namespace integer The namespace of the page to look up
-        * @param $text string The page name to look up
+        * @param int $namespace The namespace of the page to look up
+        * @param string $text The page name to look up
         * @return Title|null The title located for the namespace + text, or 
null if invalid
         */
        protected function newTitleFromNsAndText( $namespace, $text ) {
@@ -48,7 +48,7 @@
         * to having only a page id in the table.  Any event from a page that 
doesn't have an
         * article id gets the title+namespace moved to the event extra data
         *
-        * @param $row stdClass A row from the database
+        * @param stdClass $row A row from the database
         * @return array All updates required for this row
         */
        protected function updatePageIdFromTitle( $row ) {
@@ -77,8 +77,8 @@
         * Updates the extra data for page-linked events to point to the id of 
the article
         * rather than the namespace+title combo.
         *
-        * @param $row stdClass A row from the database
-        * @param $update array
+        * @param stdClass $row A row from the database
+        * @param array $update
         *
         * @return array All updates required for this row
         */
@@ -105,8 +105,8 @@
         * extra data returns that updated data rather than the origional. If
         * no extra data exists returns array()
         *
-        * @param $row stdClass The database row being updated
-        * @param $update array Updates that need to be applied to the database 
row
+        * @param stdClass $row The database row being updated
+        * @param array $update Updates that need to be applied to the database 
row
         * @return array The event extra data
         */
        protected function extra( $row, array $update = [] ) {
diff --git a/includes/special/SpecialNotificationsMarkRead.php 
b/includes/special/SpecialNotificationsMarkRead.php
index 955fce6..09cf93b 100644
--- a/includes/special/SpecialNotificationsMarkRead.php
+++ b/includes/special/SpecialNotificationsMarkRead.php
@@ -73,8 +73,8 @@
         *
         * @param int|array $idValue ID or array of IDs
         * @param string $submitButtonValue Value attribute for button
-        * @param boolean $framed Whether the button should be framed
-        * @param string Raw HTML to use for button label
+        * @param bool $framed Whether the button should be framed
+        * @param string $submitLabelHtml Raw HTML to use for button label
         *
         * @return HTMLForm
         */
@@ -117,6 +117,7 @@
         *
         * This is only called when the form is actually visited directly, 
which is not the
         *   main intended use.
+        * @param HTMLForm $form
         */
        protected function alterForm( HTMLForm $form ) {
                $form->setSubmitText( $this->msg( 
'echo-notification-markasread' )->text() );
diff --git a/phpcs.xml b/phpcs.xml
index fa1967a..cfcae90 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -8,7 +8,6 @@
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
                <exclude 
name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />

-- 
To view, visit https://gerrit.wikimedia.org/r/370819
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie71fb080926781f2905e6264be060203c56185ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to