jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354256 )
Change subject: Add phpcs and make pass
......................................................................
Add phpcs and make pass
Change-Id: Iba9016143979c488595e8c5bd9ba315e162234ae
---
M FundraisingMessageGroup.php
M FundraisingTranslateWorkflow.php
M composer.json
A phpcs.xml
4 files changed, 100 insertions(+), 27 deletions(-)
Approvals:
jenkins-bot: Verified
Jforrester: Looks good to me, approved
diff --git a/FundraisingMessageGroup.php b/FundraisingMessageGroup.php
index 859646a..919139f 100644
--- a/FundraisingMessageGroup.php
+++ b/FundraisingMessageGroup.php
@@ -63,30 +63,90 @@
* Delegate everything else to the pseudo-parent object
*/
public function __call( $method, $args ) {
- return call_user_func_array( array( $this->group, $method ),
$args );
+ return call_user_func_array( [ $this->group, $method ], $args );
}
- function getConfiguration() { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function getId() { return $this->__call( __FUNCTION__, func_get_args() ); }
- function getLabel( IContextSource $context = null ) { return
$this->__call( __FUNCTION__, func_get_args() ); }
- function getDescription( IContextSource $context = null ) { return
$this->__call( __FUNCTION__, func_get_args() ); }
- function getIcon() { return $this->__call( __FUNCTION__, func_get_args()
); }
- function getNamespace() { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function isMeta() { return $this->__call( __FUNCTION__, func_get_args() );
}
- function exists() { return $this->__call( __FUNCTION__, func_get_args() );
}
- function getFFS() { return $this->__call( __FUNCTION__, func_get_args() );
}
- function getChecker() { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function getMangler() { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function initCollection( $code ) { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function load( $code ) { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function getDefinitions() { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function getTags( $type = null ) { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function getMessage( $key, $code ) { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function getSourceLanguage() { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function getTranslatableLanguages() { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function getTranslationAids() { return $this->__call( __FUNCTION__,
func_get_args() ); }
+ function getConfiguration() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
- // WikiPageMessageGroup functions
- function getTitle() { return $this->__call( __FUNCTION__,
func_get_args() ); }
- function getInsertablesSuggester() { return $this->__call(
__FUNCTION__, func_get_args() ); }
+ function getId() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getLabel( IContextSource $context = null ) {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getDescription( IContextSource $context = null ) {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getIcon() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getNamespace() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function isMeta() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function exists() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getFFS() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getChecker() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getMangler() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function initCollection( $code ) {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function load( $code ) {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getDefinitions() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getTags( $type = null ) {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getMessage( $key, $code ) {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getSourceLanguage() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getTranslatableLanguages() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getTranslationAids() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getTitle() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
+ function getInsertablesSuggester() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
}
diff --git a/FundraisingTranslateWorkflow.php b/FundraisingTranslateWorkflow.php
index f55017a..1946436 100644
--- a/FundraisingTranslateWorkflow.php
+++ b/FundraisingTranslateWorkflow.php
@@ -4,10 +4,11 @@
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['FundraisingTranslateWorkflow'] = __DIR__ . '/i18n';
/* wfWarn(
- 'Deprecated PHP entry point used for
FundraisingTranslateWorkflow extension. Please use wfLoadExtension instead, ' .
+ 'Deprecated PHP entry point used for
FundraisingTranslateWorkflow extension. ' .
+ 'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for
more details.'
); */
return;
} else {
die( 'This version of the FundraisingTranslateWorkflow extension
requires MediaWiki 1.25+' );
-}
\ No newline at end of file
+}
diff --git a/composer.json b/composer.json
index 686b65b..b8f68fb 100644
--- a/composer.json
+++ b/composer.json
@@ -1,11 +1,14 @@
{
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
- "jakub-onderka/php-console-highlighter": "0.3.2"
+ "jakub-onderka/php-console-highlighter": "0.3.2",
+ "mediawiki/mediawiki-codesniffer": "0.7.2"
},
"scripts": {
+ "fix": "phpcbf",
"test": [
- "parallel-lint . --exclude vendor"
+ "parallel-lint . --exclude vendor",
+ "phpcs -p -s"
]
}
}
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 0000000..ede6c5d
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ruleset>
+ <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
+ <file>.</file>
+ <arg name="extensions" value="php,php5,inc"/>
+ <arg name="encoding" value="utf8"/>
+ <exclude-pattern>vendor</exclude-pattern>
+ <exclude-pattern>node_modules</exclude-pattern>
+</ruleset>
--
To view, visit https://gerrit.wikimedia.org/r/354256
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iba9016143979c488595e8c5bd9ba315e162234ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FundraisingTranslateWorkflow
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits