Fix errors reported by phpcs in includes/HTMLForm.php
authorS Page <spage@wikimedia.org>
Tue, 26 Mar 2013 23:17:17 +0000 (16:17 -0700)
committerSpage <spage@wikimedia.org>
Thu, 28 Mar 2013 08:44:04 +0000 (08:44 +0000)
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

includes/HTMLForm.php

index 4a527bb..816ea16 100644 (file)
@@ -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 ) ) {