jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/354253 )
Change subject: Add phpcs and make pass ...................................................................... Add phpcs and make pass Change-Id: I0bac641435949110fa9b933e61cfa7d44040ad53 --- M DismissableSiteNotice.hooks.php M DismissableSiteNotice.php M composer.json A phpcs.xml 4 files changed, 20 insertions(+), 7 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/DismissableSiteNotice.hooks.php b/DismissableSiteNotice.hooks.php index 38475e5..ea7a2ac 100644 --- a/DismissableSiteNotice.hooks.php +++ b/DismissableSiteNotice.hooks.php @@ -25,15 +25,15 @@ $out->addModules( 'ext.dismissableSiteNotice' ); $out->addJsConfigVars( 'wgSiteNoticeId', "$major.$minor" ); - $notice = Html::rawElement( 'div', array( 'class' => 'mw-dismissable-notice' ), - Html::rawElement( 'div', array( 'class' => 'mw-dismissable-notice-close' ), + $notice = Html::rawElement( 'div', [ 'class' => 'mw-dismissable-notice' ], + Html::rawElement( 'div', [ 'class' => 'mw-dismissable-notice-close' ], $skin->msg( 'sitenotice_close-brackets' ) ->rawParams( - Html::element( 'a', array( 'href' => '#' ), $skin->msg( 'sitenotice_close' )->text() ) + Html::element( 'a', [ 'href' => '#' ], $skin->msg( 'sitenotice_close' )->text() ) ) ->escaped() ) . - Html::rawElement( 'div', array( 'class' => 'mw-dismissable-notice-body' ), $notice ) + Html::rawElement( 'div', [ 'class' => 'mw-dismissable-notice-body' ], $notice ) ); } diff --git a/DismissableSiteNotice.php b/DismissableSiteNotice.php index bd66784..0c14305 100644 --- a/DismissableSiteNotice.php +++ b/DismissableSiteNotice.php @@ -19,7 +19,8 @@ // Keep i18n globals so mergeMessageFileList.php doesn't break $wgMessagesDirs['DismissableSiteNotice'] = __DIR__ . '/i18n'; /* wfWarn( - 'Deprecated PHP entry point used for DismissableSiteNotice extension. Please use wfLoadExtension instead, ' . + 'Deprecated PHP entry point used for DismissableSiteNotice extension. ' . + 'Please use wfLoadExtension instead, ' . 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' ); */ return; 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/354253 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0bac641435949110fa9b933e61cfa7d44040ad53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DismissableSiteNotice Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits