[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Improve some parameter docs

2018-01-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402900 )

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: Ic8e321286c8028c60839cd97a93dbd59010ee7f7
---
M .phpcs.xml
M CentralNotice.hooks.php
M CentralNoticeBannerLogPager.php
M CentralNoticeCampaignLogPager.php
M CentralNoticePageLogPager.php
M CentralNoticePager.php
M api/ApiCentralNoticeCdnCacheUpdateBanner.php
M api/ApiCentralNoticeLogs.php
M api/ApiCentralNoticeQueryCampaign.php
M includes/AllocationCalculator.php
M includes/Banner.php
M includes/BannerMessage.php
M includes/BannerMessageGroup.php
M includes/BannerRenderer.php
M includes/CNBannerPager.php
M includes/CNCampaignPager.php
M includes/CNChoiceDataResourceLoaderModule.php
M includes/Campaign.php
M includes/ChoiceDataProvider.php
M includes/HtmlFormElements/HTMLCentralNoticeBanner.php
M includes/HtmlFormElements/HTMLCentralNoticeBannerMessage.php
M includes/IBannerMixin.php
M special/SpecialBannerAllocation.php
M special/SpecialBannerRandom.php
M special/SpecialCentralNotice.php
M special/SpecialCentralNoticeLogs.php
M special/SpecialGlobalAllocation.php
M special/SpecialHideBanners.php
M special/SpecialNoticeTemplate.php
M tests/CNTestFixturesResourceLoaderModule.php
M tests/CentralNoticeTestFixtures.php
31 files changed, 125 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/00/402900/1

diff --git a/.phpcs.xml b/.phpcs.xml
index 9d96d27..114efbc 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -5,8 +5,6 @@



-   
-   



diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index 7a0a930..84315da 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -100,6 +100,8 @@
 
/**
 * Tell the UserMerge extension where we store user ids
+* @param array[] &$updateFields
+* @return true
 */
public static function onUserMergeAccountFields( &$updateFields ) {
global $wgNoticeInfrastructure;
diff --git a/CentralNoticeBannerLogPager.php b/CentralNoticeBannerLogPager.php
index 01a078d..15e90bf 100644
--- a/CentralNoticeBannerLogPager.php
+++ b/CentralNoticeBannerLogPager.php
@@ -10,6 +10,7 @@
 
/**
 * Sort the log list by timestamp
+* @return string
 */
function getIndexField() {
return 'tmplog_timestamp';
@@ -17,6 +18,7 @@
 
/**
 * Pull log entries from the database
+* @return array
 */
function getQueryInfo() {
return [
@@ -27,6 +29,8 @@
 
/**
 * Generate the content of each table row (1 row = 1 log entry)
+* @param stdClass $row
+* @return string HTML
 */
function formatRow( $row ) {
global $wgExtensionAssetsPath;
diff --git a/CentralNoticeCampaignLogPager.php 
b/CentralNoticeCampaignLogPager.php
index f47b705..21e8e86 100644
--- a/CentralNoticeCampaignLogPager.php
+++ b/CentralNoticeCampaignLogPager.php
@@ -16,6 +16,7 @@
 
/**
 * Sort the log list by timestamp
+* @return string
 */
function getIndexField() {
return 'notlog_timestamp';
@@ -23,6 +24,7 @@
 
/**
 * Pull log entries from the database
+* @return array[]
 */
function getQueryInfo() {
$request = $this->getRequest();
@@ -74,6 +76,8 @@
 
/**
 * Generate the content of each table row (1 row = 1 log entry)
+* @param stdClass $row
+* @return string HTML
 */
function formatRow( $row ) {
global $wgExtensionAssetsPath;
@@ -504,6 +508,7 @@
 
/**
 * Specify table headers
+* @return string HTML
 */
function getStartBody() {
$htmlOut = '';
@@ -534,6 +539,7 @@
 
/**
 * Close table
+* @return strint HTML
 */
function getEndBody() {
$htmlOut = '';
diff --git a/CentralNoticePageLogPager.php b/CentralNoticePageLogPager.php
index 914daa7..b8417ee 100644
--- a/CentralNoticePageLogPager.php
+++ b/CentralNoticePageLogPager.php
@@ -23,6 +23,7 @@
 
/**
 * Sort the log list by timestamp
+* @return string
 */
function getIndexField() {
return 'rc_timestamp';
@@ -30,6 +31,7 @@
 
/**
 * Pull log entries from the database
+* @return array[]
 */
function getQueryInfo() {
$conds = [
@@ -77,6 +79,8 @@
 
/**
 * Generate the content of each table row (1 row = 1 log entry)
+* @param stdClass $row
+* @return string HTML
 */
function formatRow( $row 

[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Improve some parameter docs

2017-10-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/382813 )

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: Id701f81836580dbcab26f852bb5a62605f4b4476
---
M CentralNotice.hooks.php
M CentralNoticeCampaignLogPager.php
M CentralNoticePageLogPager.php
M TemplatePager.php
M includes/AllocationCalculator.php
M includes/Banner.php
M includes/BannerMessageGroup.php
M includes/CNBannerPager.php
M includes/Campaign.php
M patches/CNDatabasePatcher.php
M phpcs.xml
M special/SpecialBannerAllocation.php
M special/SpecialBannerLoader.php
M special/SpecialCentralNotice.php
M special/SpecialCentralNoticeBanners.php
M special/SpecialCentralNoticeLogs.php
M special/SpecialGlobalAllocation.php
M tests/CentralNoticeTestFixtures.php
18 files changed, 101 insertions(+), 103 deletions(-)

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



diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index b980767..38bfb64 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -119,7 +119,7 @@
 * the language object is initialized before all namespaces are 
registered -- which would
 * be the case if we just used the wgExtensionFunctions hook system.
 *
-* @param array $namespaces Modifiable list of namespaces -- similar to 
$wgExtraNamespaces
+* @param array &$namespaces Modifiable list of namespaces -- similar 
to $wgExtraNamespaces
 *
 * @return bool True if the hook completed successfully.
 */
@@ -157,8 +157,8 @@
 * BeforePageDisplay hook handler
 * This function adds the startUp and geoIP modules to the page (as 
needed)
 *
-* @param $out  OutputPage
-* @param $skin Skin
+* @param OutputPage $out
+* @param Skin $skin
 * @return bool
 */
public static function onBeforePageDisplay( $out, $skin ) {
@@ -193,7 +193,7 @@
 * MakeGlobalVariablesScript hook handler
 * This function sets the pseudo-global JavaScript variables that are 
used by CentralNotice
 *
-* @param $vars array
+* @param array &$vars
 * @return bool
 */
public static function onMakeGlobalVariablesScript( &$vars ) {
@@ -254,7 +254,7 @@
 * SiteNoticeAfter hook handler
 * This function outputs the siteNotice div that the banners are loaded 
into.
 *
-* @param $notice string
+* @param string &$notice
 * @return bool
 */
public static function onSiteNoticeAfter( &$notice ) {
@@ -267,7 +267,7 @@
 * ResourceLoaderGetConfigVars hook handler
 * Send php config vars to js via ResourceLoader
 *
-* @param &$vars: variables to be added to the output of the startup 
module
+* @param array &$vars variables to be added to the output of the 
startup module
 * @return bool
 */
public static function onResourceLoaderGetConfigVars( &$vars ) {
@@ -329,7 +329,7 @@
/**
 * UnitTestsList hook handler
 *
-* @param $files array
+* @param array &$files
 * @return bool
 */
public static function onUnitTestsList( &$files ) {
@@ -351,7 +351,7 @@
 * ResourceLoaderTestModules hook handler
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
 *
-* @param array $testModules
+* @param array &$testModules
 * @param ResourceLoader $resourceLoader
 * @return bool
 */
@@ -416,7 +416,7 @@
/**
 * EventLoggingRegisterSchemas hook handler.
 *
-* @param array $schemas The schemas currently registered with the 
EventLogging
+* @param array &$schemas The schemas currently registered with the 
EventLogging
 *  extension
 * @return bool Always true
 */
diff --git a/CentralNoticeCampaignLogPager.php 
b/CentralNoticeCampaignLogPager.php
index 2baf81f..f47b705 100644
--- a/CentralNoticeCampaignLogPager.php
+++ b/CentralNoticeCampaignLogPager.php
@@ -177,7 +177,7 @@
}
 
/**
-* @param $row
+* @param object $row
 * @return string
 */
function showInitialSettings( $row ) {
@@ -238,7 +238,7 @@
}
 
/**
-* @param $row
+* @param object $row
 * @return string
 */
function showChanges( $row ) {
@@ -336,8 +336,8 @@
}
 
/**
-* @param $param
-* @param $row
+* @param string $param
+* @param object $row
 * @return string
 */
private function testBooleanChange( $param, $row ) {
@@ -406,8 +406,8 @@
 
/**
 * Test for changes to campaign priority
-* @param $param
-* @param $row
+* 

[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Improve some parameter docs

2017-10-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/382813 )

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: Id701f81836580dbcab26f852bb5a62605f4b4476
---
M CentralNotice.hooks.php
M CentralNoticeCampaignLogPager.php
M CentralNoticePageLogPager.php
M TemplatePager.php
M includes/AllocationCalculator.php
M includes/Banner.php
M includes/BannerMessageGroup.php
M includes/CNBannerPager.php
M includes/Campaign.php
M patches/CNDatabasePatcher.php
M phpcs.xml
M special/SpecialBannerAllocation.php
M special/SpecialBannerLoader.php
M special/SpecialCentralNotice.php
M special/SpecialCentralNoticeBanners.php
M special/SpecialCentralNoticeLogs.php
M special/SpecialGlobalAllocation.php
M tests/CentralNoticeTestFixtures.php
18 files changed, 101 insertions(+), 103 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/13/382813/1

diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index b980767..38bfb64 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -119,7 +119,7 @@
 * the language object is initialized before all namespaces are 
registered -- which would
 * be the case if we just used the wgExtensionFunctions hook system.
 *
-* @param array $namespaces Modifiable list of namespaces -- similar to 
$wgExtraNamespaces
+* @param array &$namespaces Modifiable list of namespaces -- similar 
to $wgExtraNamespaces
 *
 * @return bool True if the hook completed successfully.
 */
@@ -157,8 +157,8 @@
 * BeforePageDisplay hook handler
 * This function adds the startUp and geoIP modules to the page (as 
needed)
 *
-* @param $out  OutputPage
-* @param $skin Skin
+* @param OutputPage $out
+* @param Skin $skin
 * @return bool
 */
public static function onBeforePageDisplay( $out, $skin ) {
@@ -193,7 +193,7 @@
 * MakeGlobalVariablesScript hook handler
 * This function sets the pseudo-global JavaScript variables that are 
used by CentralNotice
 *
-* @param $vars array
+* @param array &$vars
 * @return bool
 */
public static function onMakeGlobalVariablesScript( &$vars ) {
@@ -254,7 +254,7 @@
 * SiteNoticeAfter hook handler
 * This function outputs the siteNotice div that the banners are loaded 
into.
 *
-* @param $notice string
+* @param string &$notice
 * @return bool
 */
public static function onSiteNoticeAfter( &$notice ) {
@@ -267,7 +267,7 @@
 * ResourceLoaderGetConfigVars hook handler
 * Send php config vars to js via ResourceLoader
 *
-* @param &$vars: variables to be added to the output of the startup 
module
+* @param array &$vars variables to be added to the output of the 
startup module
 * @return bool
 */
public static function onResourceLoaderGetConfigVars( &$vars ) {
@@ -329,7 +329,7 @@
/**
 * UnitTestsList hook handler
 *
-* @param $files array
+* @param array &$files
 * @return bool
 */
public static function onUnitTestsList( &$files ) {
@@ -351,7 +351,7 @@
 * ResourceLoaderTestModules hook handler
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
 *
-* @param array $testModules
+* @param array &$testModules
 * @param ResourceLoader $resourceLoader
 * @return bool
 */
@@ -416,7 +416,7 @@
/**
 * EventLoggingRegisterSchemas hook handler.
 *
-* @param array $schemas The schemas currently registered with the 
EventLogging
+* @param array &$schemas The schemas currently registered with the 
EventLogging
 *  extension
 * @return bool Always true
 */
diff --git a/CentralNoticeCampaignLogPager.php 
b/CentralNoticeCampaignLogPager.php
index 2baf81f..f47b705 100644
--- a/CentralNoticeCampaignLogPager.php
+++ b/CentralNoticeCampaignLogPager.php
@@ -177,7 +177,7 @@
}
 
/**
-* @param $row
+* @param object $row
 * @return string
 */
function showInitialSettings( $row ) {
@@ -238,7 +238,7 @@
}
 
/**
-* @param $row
+* @param object $row
 * @return string
 */
function showChanges( $row ) {
@@ -336,8 +336,8 @@
}
 
/**
-* @param $param
-* @param $row
+* @param string $param
+* @param object $row
 * @return string
 */
private function testBooleanChange( $param, $row ) {
@@ -406,8 +406,8 @@
 
/**
 * Test for changes to campaign priority
-* @param $param
-*