[MediaWiki-commits] [Gerrit] mediawiki...FundraiserLandingPage[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: I85ac8a333b8a6e2a4b378ae137c6acdd3a1ed7c8
---
M FundraiserLandingPage.body.php
M FundraiserLandingPage.hooks.php
M FundraiserRedirector.body.php
M composer.json
M phpcs.xml
5 files changed, 19 insertions(+), 16 deletions(-)

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



diff --git a/FundraiserLandingPage.body.php b/FundraiserLandingPage.body.php
index 07eaf8f..034326f 100644
--- a/FundraiserLandingPage.body.php
+++ b/FundraiserLandingPage.body.php
@@ -5,7 +5,7 @@
  *
  * @author Peter Gehres 
  */
-class FundraiserLandingPage extends UnlistedSpecialPage  {
+class FundraiserLandingPage extends UnlistedSpecialPage {
function __construct() {
parent::__construct( 'FundraiserLandingPage' );
}
@@ -17,7 +17,7 @@
 
if ( $wgContributionTrackingFundraiserMaintenance
|| $wgContributionTrackingFundraiserMaintenanceUnsched
-   ){
+   ) {
$this->getOutput()->redirect(
Title::newFromText( 
'Special:FundraiserMaintenance' )->getFullURL(), '302'
);
@@ -122,10 +122,10 @@
 * Country, Root. It is assumed that all parts of the title are 
separated
 * with '/'.
 *
-* @param Parser $parser   Reference to the WM parser object
-* @param string $page The template page root to load
+* @param Parser $parser Reference to the WM parser object
+* @param string $page The template page root to load
 * @param string $language The language to attempt to localize onto
-* @param string $country  The country to attempt to localize onto
+* @param string $country The country to attempt to localize onto
 *
 * @return string The wikitext template
 */
@@ -156,9 +156,9 @@
 * Language, Root. It is assumed that all parts of the title are 
separated
 * with '/'.
 *
-* @param Parser $parser   Reference to the WM parser object
-* @param string $page The template page root to load
-* @param string $country  The country to attempt to localize onto
+* @param Parser $parser Reference to the WM parser object
+* @param string $page The template page root to load
+* @param string $country The country to attempt to localize onto
 * @param string $language The language to attempt to localize onto
 *
 * @return string The wikitext template
diff --git a/FundraiserLandingPage.hooks.php b/FundraiserLandingPage.hooks.php
index dee6a63..25f6136 100644
--- a/FundraiserLandingPage.hooks.php
+++ b/FundraiserLandingPage.hooks.php
@@ -4,7 +4,7 @@
 * Register the parser function hooks 'switchlanguage' and 
'switchcountry'
 * with the MW backend.
 *
-* @param $parser Parser The MW parser object to hook into.
+* @param Parser &$parser The MW parser object to hook into.
 *
 * @return bool Always true
 */
diff --git a/FundraiserRedirector.body.php b/FundraiserRedirector.body.php
index f548e55..a1becd2 100644
--- a/FundraiserRedirector.body.php
+++ b/FundraiserRedirector.body.php
@@ -47,7 +47,8 @@
if ( in_array( $tryLanguage, $mwLanguages ) ) {
// use the language if it is supported 
in MediaWiki
$language = $tryLanguage;
-   break; // don't search further
+   // don't search further
+   break;
}
}
}
@@ -76,22 +77,22 @@
 
// if the country is covered by a payment-processing chapter, 
redirect
// the donor to the chapter's default landing page
-   if ( array_key_exists( $params['country'], 
$wgFundraiserLandingPageChapters ) ){
+   if ( array_key_exists( $params['country'], 
$wgFundraiserLandingPageChapters ) ) {
// Get the message key for the chapter's landing page
$message_key = $wgFundraiserLandingPageChapters[ 
$params['country'] ];
// Get the url for the chapter's landing page
$message = $this->msg( $message_key )->plain();
// if the message is not equal to the default message 
that is returned
// for a missing message, set the redirect URL to the 
message
-   if ( 

[MediaWiki-commits] [Gerrit] mediawiki...FundraiserLandingPage[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: I85ac8a333b8a6e2a4b378ae137c6acdd3a1ed7c8
---
M FundraiserLandingPage.body.php
M FundraiserLandingPage.hooks.php
M FundraiserRedirector.body.php
M composer.json
M phpcs.xml
5 files changed, 19 insertions(+), 16 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FundraiserLandingPage 
refs/changes/73/363973/1

diff --git a/FundraiserLandingPage.body.php b/FundraiserLandingPage.body.php
index 07eaf8f..034326f 100644
--- a/FundraiserLandingPage.body.php
+++ b/FundraiserLandingPage.body.php
@@ -5,7 +5,7 @@
  *
  * @author Peter Gehres 
  */
-class FundraiserLandingPage extends UnlistedSpecialPage  {
+class FundraiserLandingPage extends UnlistedSpecialPage {
function __construct() {
parent::__construct( 'FundraiserLandingPage' );
}
@@ -17,7 +17,7 @@
 
if ( $wgContributionTrackingFundraiserMaintenance
|| $wgContributionTrackingFundraiserMaintenanceUnsched
-   ){
+   ) {
$this->getOutput()->redirect(
Title::newFromText( 
'Special:FundraiserMaintenance' )->getFullURL(), '302'
);
@@ -122,10 +122,10 @@
 * Country, Root. It is assumed that all parts of the title are 
separated
 * with '/'.
 *
-* @param Parser $parser   Reference to the WM parser object
-* @param string $page The template page root to load
+* @param Parser $parser Reference to the WM parser object
+* @param string $page The template page root to load
 * @param string $language The language to attempt to localize onto
-* @param string $country  The country to attempt to localize onto
+* @param string $country The country to attempt to localize onto
 *
 * @return string The wikitext template
 */
@@ -156,9 +156,9 @@
 * Language, Root. It is assumed that all parts of the title are 
separated
 * with '/'.
 *
-* @param Parser $parser   Reference to the WM parser object
-* @param string $page The template page root to load
-* @param string $country  The country to attempt to localize onto
+* @param Parser $parser Reference to the WM parser object
+* @param string $page The template page root to load
+* @param string $country The country to attempt to localize onto
 * @param string $language The language to attempt to localize onto
 *
 * @return string The wikitext template
diff --git a/FundraiserLandingPage.hooks.php b/FundraiserLandingPage.hooks.php
index dee6a63..25f6136 100644
--- a/FundraiserLandingPage.hooks.php
+++ b/FundraiserLandingPage.hooks.php
@@ -4,7 +4,7 @@
 * Register the parser function hooks 'switchlanguage' and 
'switchcountry'
 * with the MW backend.
 *
-* @param $parser Parser The MW parser object to hook into.
+* @param Parser &$parser The MW parser object to hook into.
 *
 * @return bool Always true
 */
diff --git a/FundraiserRedirector.body.php b/FundraiserRedirector.body.php
index f548e55..a1becd2 100644
--- a/FundraiserRedirector.body.php
+++ b/FundraiserRedirector.body.php
@@ -47,7 +47,8 @@
if ( in_array( $tryLanguage, $mwLanguages ) ) {
// use the language if it is supported 
in MediaWiki
$language = $tryLanguage;
-   break; // don't search further
+   // don't search further
+   break;
}
}
}
@@ -76,22 +77,22 @@
 
// if the country is covered by a payment-processing chapter, 
redirect
// the donor to the chapter's default landing page
-   if ( array_key_exists( $params['country'], 
$wgFundraiserLandingPageChapters ) ){
+   if ( array_key_exists( $params['country'], 
$wgFundraiserLandingPageChapters ) ) {
// Get the message key for the chapter's landing page
$message_key = $wgFundraiserLandingPageChapters[ 
$params['country'] ];
// Get the url for the chapter's landing page
$message = $this->msg( $message_key )->plain();
// if the message is not equal to the default message 
that is returned
// for a missing message, set the redirect URL to the 
message