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 <pgeh...@wikimedia.org> */ -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 ( $message != "<$message_key>" ){ + if ( $message != "<$message_key>" ) { $redirectURL = $message; - if ( strpos( $redirectURL, "LandingCheck" ) !== false ){ + if ( strpos( $redirectURL, "LandingCheck" ) !== false ) { // the chapter is using LandingCheck, so go ahead and send // all of the params as well $querystring = http_build_query( $params ); - if ( strpos( $redirectURL, "?" ) === false ){ + if ( strpos( $redirectURL, "?" ) === false ) { $redirectURL .= "?" . $querystring; } else { $redirectURL .= "&" . $querystring; diff --git a/composer.json b/composer.json index b8f68fb..4f55859 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", "jakub-onderka/php-console-highlighter": "0.3.2", - "mediawiki/mediawiki-codesniffer": "0.7.2" + "mediawiki/mediawiki-codesniffer": "0.10.0" }, "scripts": { "fix": "phpcbf", diff --git a/phpcs.xml b/phpcs.xml index 4ffde0b..4b351d7 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <ruleset> - <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/> + <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"> + <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic"/> + </rule> <file>.</file> <arg name="extensions" value="php,php5,inc"/> <arg name="encoding" value="UTF-8"/> -- To view, visit https://gerrit.wikimedia.org/r/363973 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85ac8a333b8a6e2a4b378ae137c6acdd3a1ed7c8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FundraiserLandingPage Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits