Umherirrender has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/402645 )
Change subject: Improve some parameter docs
......................................................................
Improve some parameter docs
Change-Id: Iaab5cc7473f5ac85b8422149ce1a2f7e389448c2
---
M .phpcs.xml
M OnlineStatus.body.php
2 files changed, 33 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OnlineStatus
refs/changes/45/402645/1
diff --git a/.phpcs.xml b/.phpcs.xml
index debe53d..8c77608 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,14 +1,12 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
- <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
- <exclude
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
<exclude
name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
<exclude name="Squiz.Scope.MethodScope.Missing" />
</rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc" />
- <arg name="encoding" value="utf8" />
- <exclude-pattern>vendor</exclude-pattern>
+ <arg name="encoding" value="UTF-8" />
</ruleset>
diff --git a/OnlineStatus.body.php b/OnlineStatus.body.php
index ff0392f..9d9a012 100644
--- a/OnlineStatus.body.php
+++ b/OnlineStatus.body.php
@@ -6,6 +6,7 @@
*
* @param mixed $title string of Title object, if it's a title, if has
to be in
* User: of User_talk: namespace.
+ * @param bool $checkShowPref
* @return array ( string status, string username ) or null
*/
static function GetUserStatus( $title, $checkShowPref = false ) {
@@ -39,6 +40,9 @@
/**
* Used for AJAX requests
+ * @param string $action
+ * @param bool $stat
+ * @return string
*/
static function Ajax( $action, $stat = false ) {
global $wgUser;
@@ -99,6 +103,8 @@
/**
* Hook for ParserFirstCallInit
+ * @param Parser $parser
+ * @return true
*/
static function ParserFirstCallInit( $parser ) {
global $wgAllowAnyUserOnlineStatusFunction;
@@ -111,6 +117,10 @@
/**
* Callback for {{#anyuserstatus:}}
+ * @param Parser &$parser
+ * @param User $user
+ * @param bool $raw
+ * @return array|string
*/
static function ParserHookCallback( &$parser, $user, $raw = false ) {
$status = self::GetUserStatus( $user );
@@ -130,6 +140,8 @@
/**
* Hook function for MagicWordwgVariableIDs
+ * @param array &$magicWords
+ * @return true
*/
static function MagicWordVariable( &$magicWords ) {
$magicWords[] = 'onlinestatus_word';
@@ -140,6 +152,11 @@
/**
* Hook function for ParserGetVariableValueSwitch
+ * @param Parser &$parser
+ * @param array &$varCache
+ * @param string &$index
+ * @param array &$ret
+ * @return true
*/
static function ParserGetVariable( &$parser, &$varCache, &$index, &$ret
) {
if ( $index == 'onlinestatus_word' ) {
@@ -169,6 +186,9 @@
/**
* Hook for user preferences
+ * @param User $user
+ * @param array &$preferences
+ * @return true
*/
public static function GetPreferences( $user, &$preferences ) {
$msg = wfMessage( 'onlinestatus-levels'
)->inContentLanguage()->plain();
@@ -223,6 +243,8 @@
/**
* Hook for UserLoginComplete
+ * @param User $user
+ * @return true
*/
static function UserLoginComplete( $user ) {
if ( $user->getOption( 'onlineonlogin' ) ) {
@@ -235,6 +257,10 @@
/**
* Hook for UserLoginComplete
+ * @param User &$newUser
+ * @param string &$injected_html
+ * @param string|null $oldName
+ * @return true
*/
static function UserLogoutComplete( &$newUser, &$injected_html,
$oldName = null ) {
if ( $oldName === null ) {
@@ -257,6 +283,8 @@
/**
* Hook function for BeforePageDisplay
+ * @param OutputPage &$out
+ * @return true
*/
static function BeforePageDisplay( &$out ) {
global $wgRequest, $wgUser, $wgUseAjax;
@@ -289,6 +317,9 @@
/**
* Hook for PersonalUrls
+ * @param array &$urls
+ * @param Title &$title
+ * @return true
*/
static function PersonalUrls( &$urls, &$title ) {
global $wgUser, $wgUseAjax;
--
To view, visit https://gerrit.wikimedia.org/r/402645
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaab5cc7473f5ac85b8422149ce1a2f7e389448c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OnlineStatus
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits