Merge "Improve some parameter docs"

This commit is contained in:
jenkins-bot 2017-10-18 22:37:05 +00:00 committed by Gerrit Code Review
commit 5cfdc7f648
5 changed files with 19 additions and 21 deletions

View file

@ -169,7 +169,7 @@ class MWEchoNotifUser {
* Get message count for this user.
*
* @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 int $dbSource Use master or slave database to pull count (Optional. Defaults to DB_REPLICA)
* @return int
*/
public function getMessageCount( $cached = true, $dbSource = DB_REPLICA ) {
@ -180,7 +180,7 @@ class MWEchoNotifUser {
* Get alert count for this user.
*
* @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 int $dbSource Use master or slave database to pull count (Optional. Defaults to DB_REPLICA)
* @return int
*/
public function getAlertCount( $cached = true, $dbSource = DB_REPLICA ) {
@ -198,7 +198,7 @@ class MWEchoNotifUser {
* If $wgEchoCrossWikiNotifications is disabled, the $global parameter is ignored.
*
* @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 int $dbSource Use master or slave database to pull count (Optional. Defaults to DB_REPLICA)
* @param string $section Notification section
* @param bool|string $global Whether to include foreign notifications. If set to 'preference', uses the user's preference.
* @return int
@ -247,7 +247,7 @@ class MWEchoNotifUser {
* Get the timestamp of the latest unread alert
*
* @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 int $dbSource Use master or slave database to pull count (Optional. Defaults to DB_REPLICA)
* @return bool|MWTimestamp Timestamp of latest unread alert, or false if there are no unread alerts.
*/
public function getLastUnreadAlertTime( $cached = true, $dbSource = DB_REPLICA ) {
@ -258,7 +258,7 @@ class MWEchoNotifUser {
* Get the timestamp of the latest unread message
*
* @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 int $dbSource Use master or slave database to pull count (Optional. Defaults to DB_REPLICA)
* @return bool|MWTimestamp
*/
public function getLastUnreadMessageTime( $cached = true, $dbSource = DB_REPLICA ) {
@ -271,7 +271,7 @@ class MWEchoNotifUser {
* If $wgEchoCrossWikiNotifications is disabled, the $global parameter is ignored.
*
* @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 int $dbSource Use master or slave database to pull count (Optional. Defaults to DB_REPLICA)
* @param string $section Notification section
* @param bool|string $global Whether to include foreign notifications. If set to 'preference', uses the user's preference.
* @return bool|MWTimestamp Timestamp of latest unread message, or false if there are no unread messages.

View file

@ -49,15 +49,15 @@ class EchoNotificationController {
}
/**
* Format the notification count as a string. This should only be used for an
* isolated string count, e.g. as displayed in personal tools or returned by the API.
*
* 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
* @return string Formatted count, after applying cap then formatting to string
*/
* Format the notification count as a string. This should only be used for an
* isolated string count, e.g. as displayed in personal tools or returned by the API.
*
* 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
* @return string Formatted count, after applying cap then formatting to string
*/
public static function formatNotificationCount( $count ) {
$cappedCount = self::getCappedNotificationCount( $count );

View file

@ -61,6 +61,7 @@ abstract class EchoAbstractMapper {
/**
* Get the listener for a method
*
* @param string $method
* @return array
* @throws MWException
*/

View file

@ -7,7 +7,6 @@ use OOUI\LabelElement;
use OOUI\TitledElement;
use OOUI\Tag;
use OOUI\Widget;
use OOUI\HtmlSnippet;
/**
* Widget combining a label and icon
@ -19,9 +18,9 @@ class LabelIconWidget extends Widget {
/**
* @param array $config Configuration options
* @param string|HtmlSnippet $config['label'] Label text
* @param string $config['title'] Title text
* @param string $config['icon'] Icon key
* - string|HtmlSnippet $config['label'] Label text
* - string $config['title'] Title text
* - string $config['icon'] Icon key
*/
public function __construct( $config ) {
parent::__construct( $config );

View file

@ -5,8 +5,6 @@
<exclude name="Generic.Files.LineLength.TooLong" />
<exclude name="MediaWiki.Commenting.FunctionComment.ExtraParamComment" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" />
<exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />