From: S Page Date: Tue, 26 Mar 2013 23:17:17 +0000 (-0700) Subject: Fix errors reported by phpcs in includes/HTMLForm.php X-Git-Tag: 1.31.0-rc.0~20162^2 X-Git-Url: http://git.cyclocoop.org/%27.%28%24current%20%3E%202?a=commitdiff_plain;h=c86c699c6a862de4590d1f9de97daa71ce9b4b0e;p=lhc%2Fweb%2Fwiklou.git Fix errors reported by phpcs in includes/HTMLForm.php I set property "$typeMappings" to private (no clients outside this class in our codebase). I removed property $jsAdded, it is unused in this class and throughout the codebase and seems a leftover from 2008. Special:Preferences still works with this change. Change-Id: Id5668141835e22e3e1b043109e50d73ccd6b1229 --- diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 4a527bbe29..816ea16c08 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -95,7 +95,7 @@ class HTMLForm extends ContextSource { // A mapping of 'type' inputs onto standard HTMLFormField subclasses - static $typeMappings = array( + private static $typeMappings = array( 'api' => 'HTMLApiField', 'text' => 'HTMLTextField', 'textarea' => 'HTMLTextAreaField', @@ -1996,7 +1996,6 @@ class HTMLSelectField extends HTMLFormField { * Select dropdown field, with an additional "other" textbox. */ class HTMLSelectOrOtherField extends HTMLTextField { - static $jsAdded = false; function __construct( $params ) { if ( !in_array( 'other', $params['options'], true ) ) {