From 950910dc99861bd61903a2dbe938aeb226141e40 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 28 Sep 2015 13:35:28 +0200 Subject: [PATCH] Fix PHPCS warnings in includes/htmlform/ Change-Id: Ifbf050c92a84d6af59709632965f48f3d567c0da --- includes/htmlform/HTMLCheckField.php | 5 ++++- includes/htmlform/HTMLForm.php | 6 +++++- includes/htmlform/HTMLFormField.php | 3 ++- includes/htmlform/HTMLTitleTextField.php | 4 +++- includes/htmlform/OOUIHTMLForm.php | 4 +++- includes/htmlform/VFormHTMLForm.php | 4 +++- 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/includes/htmlform/HTMLCheckField.php b/includes/htmlform/HTMLCheckField.php index 9666c4ea87..b2268546fa 100644 --- a/includes/htmlform/HTMLCheckField.php +++ b/includes/htmlform/HTMLCheckField.php @@ -56,7 +56,10 @@ class HTMLCheckField extends HTMLFormField { $attr['id'] = $this->mID; $attr['name'] = $this->mName; - $attr += $this->getAttributes( array( 'disabled', 'tabindex' ), array( 'tabindex' => 'tabIndex' ) ); + $attr += $this->getAttributes( + array( 'disabled', 'tabindex' ), + array( 'tabindex' => 'tabIndex' ) + ); if ( $this->mClass !== '' ) { $attr['classes'] = array( $this->mClass ); diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 2779d5a7ea..e51620f208 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -959,7 +959,11 @@ class HTMLForm extends ContextSource { $html = Xml::fieldset( $legend, $html ); } - return Html::rawElement( 'form', $this->getFormAttributes() + array( 'class' => 'visualClear' ), $html ); + return Html::rawElement( + 'form', + $this->getFormAttributes() + array( 'class' => 'visualClear' ), + $html + ); } /** diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index 484b29a115..20d7250f36 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -925,7 +925,8 @@ abstract class HTMLFormField { * Returns the given attributes from the parameters * * @param array $list List of attributes to get - * @param array $mappings Optional - Key/value map of attribute names to use instead of the ones passed in + * @param array $mappings Optional - Key/value map of attribute names to use + * instead of the ones passed in. * @return array Attributes */ public function getAttributes( array $list, array $mappings = null ) { diff --git a/includes/htmlform/HTMLTitleTextField.php b/includes/htmlform/HTMLTitleTextField.php index a225c67c39..ade4cf7b51 100644 --- a/includes/htmlform/HTMLTitleTextField.php +++ b/includes/htmlform/HTMLTitleTextField.php @@ -55,7 +55,9 @@ class HTMLTitleTextField extends HTMLTextField { } $text = $title->getPrefixedText(); - if ( $this->mParams['namespace'] !== false && !$title->inNamespace( $this->mParams['namespace'] ) ) { + if ( $this->mParams['namespace'] !== false && + !$title->inNamespace( $this->mParams['namespace'] ) + ) { return $this->msg( 'htmlform-title-badnamespace', $this->mParams['namespace'], $text )->parse(); } diff --git a/includes/htmlform/OOUIHTMLForm.php b/includes/htmlform/OOUIHTMLForm.php index f8aa0ac339..60f02a1f22 100644 --- a/includes/htmlform/OOUIHTMLForm.php +++ b/includes/htmlform/OOUIHTMLForm.php @@ -39,7 +39,9 @@ class OOUIHTMLForm extends HTMLForm { */ protected $displayFormat = 'ooui'; - public static function loadInputFromParameters( $fieldname, $descriptor, HTMLForm $parent = null ) { + public static function loadInputFromParameters( $fieldname, $descriptor, + HTMLForm $parent = null + ) { $field = parent::loadInputFromParameters( $fieldname, $descriptor, $parent ); $field->setShowEmptyLabel( false ); return $field; diff --git a/includes/htmlform/VFormHTMLForm.php b/includes/htmlform/VFormHTMLForm.php index 3788379dad..124a3d5b8d 100644 --- a/includes/htmlform/VFormHTMLForm.php +++ b/includes/htmlform/VFormHTMLForm.php @@ -42,7 +42,9 @@ class VFormHTMLForm extends HTMLForm { return true; } - public static function loadInputFromParameters( $fieldname, $descriptor, HTMLForm $parent = null ) { + public static function loadInputFromParameters( $fieldname, $descriptor, + HTMLForm $parent = null + ) { $field = parent::loadInputFromParameters( $fieldname, $descriptor, $parent ); $field->setShowEmptyLabel( false ); return $field; -- 2.20.1