Fix and enable MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: I8e3785d27d80c3756f7dfbf0d9d45ada366c490c
这个提交包含在:
Reedy 2022-02-06 23:41:55 +00:00
父节点 7357cd1b44
当前提交 b1eb21f939
共有 2 个文件被更改,包括 5 次插入5 次删除

查看文件

@ -1,8 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
</rule>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<file>.</file>
<arg name="extensions" value="php" />
<arg name="encoding" value="UTF-8" />

查看文件

@ -375,7 +375,8 @@ class SpecialContact extends UnlistedSpecialPage {
$value = '';
// TODO: Support selectandother/HTMLSelectAndOtherField
// options, options-messages and options-message
if ( isset( $field['options-messages'] ) ) { // Multiple values!
if ( isset( $field['options-messages'] ) ) {
// Multiple values!
if ( is_string( $formData[$name] ) ) {
$optionValues = array_flip( $field['options-messages'] );
if ( isset( $optionValues[$formData[$name]] ) ) {
@ -438,7 +439,8 @@ class SpecialContact extends UnlistedSpecialPage {
if ( !Hooks::run( 'ContactForm', [ &$contactRecipientAddress, &$replyTo, &$subject,
&$text, $this->formType, $formData ] )
) {
return false; // TODO: Need to do some proper error handling here
// TODO: Need to do some proper error handling here
return false;
}
wfDebug( __METHOD__ . ': sending mail from ' . $senderAddress->toString() .