[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Improve some parameter docs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/371009 ) Change subject: Improve some parameter docs .. Improve some parameter docs Change-Id: Id5bd8954790c38084ae6e6e38927dcb30772533b --- M WikimediaEventsHooks.php M composer.json M includes/AuthManagerStatsdHandler.php M phpcs.xml M tests/browser/SearchSatisfactionTests.php 5 files changed, 37 insertions(+), 25 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php index ec50dfe..0d8b7e5 100644 --- a/WikimediaEventsHooks.php +++ b/WikimediaEventsHooks.php @@ -35,6 +35,8 @@ * special page) * * Add a 'loggedIn' key with the value of 1 if the user is logged in +* @param OutputPage $out +* @param array &$headerItems */ public static function onXAnalyticsHeader( OutputPage $out, array &$headerItems ) { $title = $out->getTitle(); @@ -70,6 +72,9 @@ * @param bool $isWatch * @param string $section * @param int $flags +* @param Revision $revision +* @param Status $status +* @param int $baseRevId * @see https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete * @see https://meta.wikimedia.org/wiki/Schema:PageContentSaveComplete */ @@ -205,11 +210,11 @@ * Handler for UserSaveOptions hook. * @see http://www.mediawiki.org/wiki/Manual:Hooks/UserSaveOptions * @param User $user user whose options are being saved -* @param array $options Options being saved +* @param array &$options Options being saved * @return bool true in all cases */ - // Modified version of original method from the Echo extension public static function onUserSaveOptions( $user, &$options ) { + // Modified version of original method from the Echo extension global $wgOut; // Capture user options saved via Special:Preferences or ApiOptions @@ -256,7 +261,8 @@ * @param WikiPage $article The article that was deleted * @param User $user The user that deleted the article * @param string $reason The reason that the article was deleted -* @param integer $id The ID of the article that was deleted +* @param int $id The ID of the article that was deleted +* @return true */ public static function onArticleDeleteComplete( WikiPage $article, User $user, $reason, $id ) { $title = $article->getTitle(); @@ -277,9 +283,9 @@ * @see http://www.mediawiki.org/wiki/Manual:Hooks/ArticleUndelete * @see https://meta.wikimedia.org/wiki/Schema:PageRestoration * @param Title $title Title of article restored -* @param boolean $created whether the revision created the page (default false) +* @param bool $created whether the revision created the page (default false) * @param string $comment Reason for undeleting the page -* @param integer $oldPageId The ID of the article that was deleted +* @param int $oldPageId The ID of the article that was deleted */ public static function onArticleUndelete( $title, $created, $comment, $oldPageId ) { global $wgUser; @@ -327,8 +333,8 @@ * @param Title $oldTitle The title of the old article (moved from) * @param Title $newTitle The title of the new article (moved to) * @param User $user The user who moved the article -* @param integer $pageId The page ID of the old article -* @param integer $redirectId The page ID of the redirect, 0 if a redirect wasn't +* @param int $pageId The page ID of the old article +* @param int $redirectId The page ID of the redirect, 0 if a redirect wasn't created * created * @param string $reason The reason that the title was moved * @return bool true in all cases @@ -361,16 +367,17 @@ * * @see https://www.mediawiki.org/wiki/Manual:Hooks/PageContentInsertComplete * @see https://meta.wikimedia.org/wiki/Schema:PageCreation -* @param WikiPage $wikipage page just created +* @param WikiPage $wikiPage page just created * @param User $user user who created the page * @param Content $content content of new page * @param string $summary summary given by creating user * @param bool $isMinor whether the edit is marked as minor (not actually possible for new * pages) -* @param $isWatch not used -* @param $section not used +* @param bool $isWatch not used +* @param string $section not used * @param int $flags bit flags about page creation * @param Revision $revision first
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Improve some parameter docs
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/371009 ) Change subject: Improve some parameter docs .. Improve some parameter docs Change-Id: Id5bd8954790c38084ae6e6e38927dcb30772533b --- M WikimediaEventsHooks.php M composer.json M includes/AuthManagerStatsdHandler.php M phpcs.xml M tests/browser/SearchSatisfactionTests.php 5 files changed, 37 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/09/371009/1 diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php index ec50dfe..0d8b7e5 100644 --- a/WikimediaEventsHooks.php +++ b/WikimediaEventsHooks.php @@ -35,6 +35,8 @@ * special page) * * Add a 'loggedIn' key with the value of 1 if the user is logged in +* @param OutputPage $out +* @param array &$headerItems */ public static function onXAnalyticsHeader( OutputPage $out, array &$headerItems ) { $title = $out->getTitle(); @@ -70,6 +72,9 @@ * @param bool $isWatch * @param string $section * @param int $flags +* @param Revision $revision +* @param Status $status +* @param int $baseRevId * @see https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete * @see https://meta.wikimedia.org/wiki/Schema:PageContentSaveComplete */ @@ -205,11 +210,11 @@ * Handler for UserSaveOptions hook. * @see http://www.mediawiki.org/wiki/Manual:Hooks/UserSaveOptions * @param User $user user whose options are being saved -* @param array $options Options being saved +* @param array &$options Options being saved * @return bool true in all cases */ - // Modified version of original method from the Echo extension public static function onUserSaveOptions( $user, &$options ) { + // Modified version of original method from the Echo extension global $wgOut; // Capture user options saved via Special:Preferences or ApiOptions @@ -256,7 +261,8 @@ * @param WikiPage $article The article that was deleted * @param User $user The user that deleted the article * @param string $reason The reason that the article was deleted -* @param integer $id The ID of the article that was deleted +* @param int $id The ID of the article that was deleted +* @return true */ public static function onArticleDeleteComplete( WikiPage $article, User $user, $reason, $id ) { $title = $article->getTitle(); @@ -277,9 +283,9 @@ * @see http://www.mediawiki.org/wiki/Manual:Hooks/ArticleUndelete * @see https://meta.wikimedia.org/wiki/Schema:PageRestoration * @param Title $title Title of article restored -* @param boolean $created whether the revision created the page (default false) +* @param bool $created whether the revision created the page (default false) * @param string $comment Reason for undeleting the page -* @param integer $oldPageId The ID of the article that was deleted +* @param int $oldPageId The ID of the article that was deleted */ public static function onArticleUndelete( $title, $created, $comment, $oldPageId ) { global $wgUser; @@ -327,8 +333,8 @@ * @param Title $oldTitle The title of the old article (moved from) * @param Title $newTitle The title of the new article (moved to) * @param User $user The user who moved the article -* @param integer $pageId The page ID of the old article -* @param integer $redirectId The page ID of the redirect, 0 if a redirect wasn't +* @param int $pageId The page ID of the old article +* @param int $redirectId The page ID of the redirect, 0 if a redirect wasn't created * created * @param string $reason The reason that the title was moved * @return bool true in all cases @@ -361,16 +367,17 @@ * * @see https://www.mediawiki.org/wiki/Manual:Hooks/PageContentInsertComplete * @see https://meta.wikimedia.org/wiki/Schema:PageCreation -* @param WikiPage $wikipage page just created +* @param WikiPage $wikiPage page just created * @param User $user user who created the page * @param Content $content content of new page * @param string $summary summary given by creating user * @param bool $isMinor whether the edit is marked as minor (not actually possible for new * pages) -* @param $isWatch not used -* @param $section not used +* @param bool $isWatch not used +* @param string $section not used * @param int $flags bit flags about page creation * @param