Legoktm has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/360279 )
Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
......................................................................
build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.FunctionComment.Missing.Protected
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
Change-Id: Id89e8e15151311f65756b60b4a025d4f6196d9da
---
M .gitignore
M ApiShortenUrl.php
M SpecialUrlShortener.php
M UrlShortener.utils.php
M composer.json
M phpcs.xml
6 files changed, 16 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UrlShortener
refs/changes/79/360279/1
diff --git a/.gitignore b/.gitignore
index 6f04b9e..3251b73 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
node_modules/
/vendor
+composer.lock
diff --git a/ApiShortenUrl.php b/ApiShortenUrl.php
index be5cfc3..c5372d6 100644
--- a/ApiShortenUrl.php
+++ b/ApiShortenUrl.php
@@ -42,7 +42,6 @@
$this->getResult()->addValue( null, $this->getModuleName(),
[ 'shorturl' => $shortUrl ]
);
-
}
public function mustBePosted() {
diff --git a/SpecialUrlShortener.php b/SpecialUrlShortener.php
index 6fb5681..7315e06 100644
--- a/SpecialUrlShortener.php
+++ b/SpecialUrlShortener.php
@@ -47,7 +47,7 @@
$lang = $this->getLanguage();
return $this->msg( 'urlshortener-approved-domains' )
->numParams( count( $domains ) )
- ->params( $lang->listToText( array_map( function( $i ) {
+ ->params( $lang->listToText( array_map( function ( $i )
{
return "<code>$i</code>";
}, $domains ) ) );
}
diff --git a/UrlShortener.utils.php b/UrlShortener.utils.php
index 12658af..fa302ba 100755
--- a/UrlShortener.utils.php
+++ b/UrlShortener.utils.php
@@ -202,7 +202,7 @@
} else {
// Collapse the whitelist into a single string, so we
have to run regex check only once
$domainsWhitelist = implode( '|', array_map(
- function( $item ) {
+ function ( $item ) {
return '^' . $item . '$';
},
$wgUrlShortenerDomainsWhitelist
diff --git a/composer.json b/composer.json
index b8f68fb..4a8c744 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.9.0"
},
"scripts": {
"fix": "phpcbf",
diff --git a/phpcs.xml b/phpcs.xml
index 4ffde0b..e397005 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,9 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<ruleset>
- <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
+ <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
+ <exclude name="MediaWiki.FunctionComment.Missing.Protected" />
+ <exclude name="MediaWiki.FunctionComment.Missing.Public" />
+ <exclude
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+ </rule>
<file>.</file>
- <arg name="extensions" value="php,php5,inc"/>
- <arg name="encoding" value="UTF-8"/>
+ <arg name="extensions" value="php,php5,inc" />
+ <arg name="encoding" value="UTF-8" />
<exclude-pattern>vendor</exclude-pattern>
<exclude-pattern>node_modules</exclude-pattern>
</ruleset>
--
To view, visit https://gerrit.wikimedia.org/r/360279
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id89e8e15151311f65756b60b4a025d4f6196d9da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UrlShortener
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits