Add access modifiers to htmlform classes
authoraddshore <addshorewiki@gmail.com>
Fri, 4 Nov 2016 10:40:42 +0000 (11:40 +0100)
committeraddshore <addshorewiki@gmail.com>
Fri, 4 Nov 2016 10:40:42 +0000 (11:40 +0100)
Change-Id: Id8c0f0676b3200993af3cec493efc99839211bcc

24 files changed:
includes/htmlform/HTMLFormField.php
includes/htmlform/HTMLNestedFilterable.php
includes/htmlform/OOUIHTMLForm.php
includes/htmlform/VFormHTMLForm.php
includes/htmlform/fields/HTMLAutoCompleteSelectField.php
includes/htmlform/fields/HTMLCheckField.php
includes/htmlform/fields/HTMLCheckMatrix.php
includes/htmlform/fields/HTMLComboboxField.php
includes/htmlform/fields/HTMLDateTimeField.php
includes/htmlform/fields/HTMLFloatField.php
includes/htmlform/fields/HTMLInfoField.php
includes/htmlform/fields/HTMLIntField.php
includes/htmlform/fields/HTMLMultiSelectField.php
includes/htmlform/fields/HTMLRadioField.php
includes/htmlform/fields/HTMLRestrictionsField.php
includes/htmlform/fields/HTMLSelectAndOtherField.php
includes/htmlform/fields/HTMLSelectField.php
includes/htmlform/fields/HTMLSelectLimitField.php
includes/htmlform/fields/HTMLSelectNamespace.php
includes/htmlform/fields/HTMLSelectOrOtherField.php
includes/htmlform/fields/HTMLSizeFilterField.php
includes/htmlform/fields/HTMLTagFilter.php
includes/htmlform/fields/HTMLTextAreaField.php
includes/htmlform/fields/HTMLTextField.php

index 4afdea7..8390a0b 100644 (file)
@@ -42,7 +42,7 @@ abstract class HTMLFormField {
         *
         * @return string Valid HTML.
         */
-       abstract function getInputHTML( $value );
+       abstract public function getInputHTML( $value );
 
        /**
         * Same as getInputHTML, but returns an OOUI object.
@@ -51,7 +51,7 @@ abstract class HTMLFormField {
         * @param string $value
         * @return OOUI\Widget|false
         */
-       function getInputOOUI( $value ) {
+       public function getInputOOUI( $value ) {
                return false;
        }
 
@@ -74,7 +74,7 @@ abstract class HTMLFormField {
         *
         * @return Message
         */
-       function msg() {
+       public function msg() {
                $args = func_get_args();
 
                if ( $this->mParent ) {
@@ -266,7 +266,7 @@ abstract class HTMLFormField {
         * @param array $alldata The data collected from the form
         * @return bool
         */
-       function isHidden( $alldata ) {
+       public function isHidden( $alldata ) {
                if ( !$this->mHideIf ) {
                        return false;
                }
@@ -284,7 +284,7 @@ abstract class HTMLFormField {
         *
         * @return bool True to cancel the submission
         */
-       function cancelSubmit( $value, $alldata ) {
+       public function cancelSubmit( $value, $alldata ) {
                return false;
        }
 
@@ -299,7 +299,7 @@ abstract class HTMLFormField {
         * @return bool|string True on success, or String error to display, or
         *   false to fail validation without displaying an error.
         */
-       function validate( $value, $alldata ) {
+       public function validate( $value, $alldata ) {
                if ( $this->isHidden( $alldata ) ) {
                        return true;
                }
@@ -318,7 +318,7 @@ abstract class HTMLFormField {
                return true;
        }
 
-       function filter( $value, $alldata ) {
+       public function filter( $value, $alldata ) {
                if ( isset( $this->mFilterCallback ) ) {
                        $value = call_user_func( $this->mFilterCallback, $value, $alldata, $this->mParent );
                }
@@ -370,7 +370,7 @@ abstract class HTMLFormField {
         * @param WebRequest $request
         * @return string The value
         */
-       function loadDataFromRequest( $request ) {
+       public function loadDataFromRequest( $request ) {
                if ( $request->getCheck( $this->mName ) ) {
                        return $request->getText( $this->mName );
                } else {
@@ -386,7 +386,7 @@ abstract class HTMLFormField {
         * @since 1.22 The 'label' attribute no longer accepts raw HTML, use 'label-raw' instead
         * @throws MWException
         */
-       function __construct( $params ) {
+       public function __construct( $params ) {
                $this->mParams = $params;
 
                if ( isset( $params['parent'] ) && $params['parent'] instanceof HTMLForm ) {
@@ -472,7 +472,7 @@ abstract class HTMLFormField {
         *
         * @return string Complete HTML table row.
         */
-       function getTableRow( $value ) {
+       public function getTableRow( $value ) {
                list( $errors, $errorClass ) = $this->getErrorsAndErrorClass( $value );
                $inputHtml = $this->getInputHTML( $value );
                $fieldType = get_class( $this );
@@ -903,7 +903,7 @@ abstract class HTMLFormField {
         * @since 1.28
         * @return string[]
         */
-       function getNotices() {
+       public function getNotices() {
                $notices = [];
 
                if ( isset( $this->mParams['notice-message'] ) ) {
@@ -924,11 +924,11 @@ abstract class HTMLFormField {
        /**
         * @return string HTML
         */
-       function getLabel() {
+       public function getLabel() {
                return is_null( $this->mLabel ) ? '' : $this->mLabel;
        }
 
-       function getLabelHtml( $cellAttributes = [] ) {
+       public function getLabelHtml( $cellAttributes = [] ) {
                # Don't output a for= attribute for labels with no associated input.
                # Kind of hacky here, possibly we don't want these to be <label>s at all.
                $for = [];
@@ -967,7 +967,7 @@ abstract class HTMLFormField {
                return $html;
        }
 
-       function getDefault() {
+       public function getDefault() {
                if ( isset( $this->mDefault ) ) {
                        return $this->mDefault;
                } else {
@@ -1036,7 +1036,7 @@ abstract class HTMLFormField {
         * @param array $array
         * @return array
         */
-       static function forceToStringRecursive( $array ) {
+       public static function forceToStringRecursive( $array ) {
                if ( is_array( $array ) ) {
                        return array_map( [ __CLASS__, 'forceToStringRecursive' ], $array );
                } else {
index 2c09ea4..d44fc60 100644 (file)
@@ -7,5 +7,5 @@ interface HTMLNestedFilterable {
         *
         * @param array $data
         */
-       function filterDataForSubmit( $data );
+       public function filterDataForSubmit( $data );
 }
index 6fbf15b..46b570d 100644 (file)
@@ -48,7 +48,7 @@ class OOUIHTMLForm extends HTMLForm {
                return $field;
        }
 
-       function getButtons() {
+       public function getButtons() {
                $buttons = '';
 
                // IE<8 has bugs with <button>, so we'll need to avoid them.
@@ -190,7 +190,7 @@ class OOUIHTMLForm extends HTMLForm {
         * @param string $elementsType
         * @return string
         */
-       function getErrorsOrWarnings( $elements, $elementsType ) {
+       public function getErrorsOrWarnings( $elements, $elementsType ) {
                if ( !in_array( $elementsType, [ 'error', 'warning' ] ) ) {
                        throw new DomainException( $elementsType . ' is not a valid type.' );
                }
@@ -230,7 +230,7 @@ class OOUIHTMLForm extends HTMLForm {
                return '';
        }
 
-       function getHeaderText( $section = null ) {
+       public function getHeaderText( $section = null ) {
                if ( is_null( $section ) ) {
                        // We handle $this->mHeader elsewhere, in getBody()
                        return '';
@@ -239,7 +239,7 @@ class OOUIHTMLForm extends HTMLForm {
                }
        }
 
-       function getBody() {
+       public function getBody() {
                $fieldset = parent::getBody();
                // FIXME This only works for forms with no subsections
                if ( $fieldset instanceof OOUI\FieldsetLayout ) {
@@ -273,7 +273,7 @@ class OOUIHTMLForm extends HTMLForm {
                return $fieldset;
        }
 
-       function wrapForm( $html ) {
+       public function wrapForm( $html ) {
                $form = new OOUI\FormLayout( $this->getFormAttributes() + [
                        'classes' => [ 'mw-htmlform-ooui' ],
                        'content' => new OOUI\HtmlSnippet( $html ),
index c920ac3..5d9f7a0 100644 (file)
@@ -50,7 +50,7 @@ class VFormHTMLForm extends HTMLForm {
                return $field;
        }
 
-       function getHTML( $submitResult ) {
+       public function getHTML( $submitResult ) {
                // This is required for VForm HTMLForms that use that style regardless
                // of wgUseMediaWikiUIEverywhere (since they pre-date it).
                // When wgUseMediaWikiUIEverywhere is removed, this should be consolidated
@@ -71,12 +71,12 @@ class VFormHTMLForm extends HTMLForm {
                return $attribs;
        }
 
-       function wrapForm( $html ) {
+       public function wrapForm( $html ) {
                // Always discard $this->mWrapperLegend
                return Html::rawElement( 'form', $this->getFormAttributes(), $html );
        }
 
-       function getButtons() {
+       public function getButtons() {
                $buttons = '';
 
                if ( $this->mShowSubmit ) {
index 76a88d5..0f86ee8 100644 (file)
@@ -29,7 +29,7 @@
 class HTMLAutoCompleteSelectField extends HTMLTextField {
        protected $autocomplete = [];
 
-       function __construct( $params ) {
+       public function __construct( $params ) {
                $params += [
                        'require-match' => false,
                ];
@@ -63,7 +63,7 @@ class HTMLAutoCompleteSelectField extends HTMLTextField {
                }
        }
 
-       function loadDataFromRequest( $request ) {
+       public function loadDataFromRequest( $request ) {
                if ( $request->getCheck( $this->mName ) ) {
                        $val = $request->getText( $this->mName . '-select', 'other' );
 
@@ -80,7 +80,7 @@ class HTMLAutoCompleteSelectField extends HTMLTextField {
                }
        }
 
-       function validate( $value, $alldata ) {
+       public function validate( $value, $alldata ) {
                $p = parent::validate( $value, $alldata );
 
                if ( $p !== true ) {
@@ -116,7 +116,7 @@ class HTMLAutoCompleteSelectField extends HTMLTextField {
                return $attribs;
        }
 
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                $oldClass = $this->mClass;
                $this->mClass = (array)$this->mClass;
 
@@ -170,7 +170,7 @@ class HTMLAutoCompleteSelectField extends HTMLTextField {
         * @param string $value
         * @return false
         */
-       function getInputOOUI( $value ) {
+       public function getInputOOUI( $value ) {
                // To be implemented, for now override the function from HTMLTextField
                return false;
        }
index a553839..b080e18 100644 (file)
@@ -4,7 +4,7 @@
  * A checkbox field
  */
 class HTMLCheckField extends HTMLFormField {
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                global $wgUseMediaWikiUIEverywhere;
 
                if ( !empty( $this->mParams['invert'] ) ) {
@@ -79,7 +79,7 @@ class HTMLCheckField extends HTMLFormField {
         *
         * @return string
         */
-       function getLabel() {
+       public function getLabel() {
                if ( $this->mParent instanceof OOUIHTMLForm ) {
                        return $this->mLabel;
                } elseif (
@@ -113,7 +113,7 @@ class HTMLCheckField extends HTMLFormField {
         *
         * @return bool
         */
-       function loadDataFromRequest( $request ) {
+       public function loadDataFromRequest( $request ) {
                $invert = isset( $this->mParams['invert'] ) && $this->mParams['invert'];
 
                // GetCheck won't work like we want for checks.
index b324fb6..890cd7c 100644 (file)
@@ -38,7 +38,7 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
                parent::__construct( $params );
        }
 
-       function validate( $value, $alldata ) {
+       public function validate( $value, $alldata ) {
                $rows = $this->mParams['rows'];
                $columns = $this->mParams['columns'];
 
@@ -79,7 +79,7 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
         *
         * @return string
         */
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                $html = '';
                $tableContents = '';
                $rows = $this->mParams['rows'];
@@ -186,7 +186,7 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
         *
         * @return string Complete HTML table row
         */
-       function getTableRow( $value ) {
+       public function getTableRow( $value ) {
                list( $errors, $errorClass ) = $this->getErrorsAndErrorClass( $value );
                $inputHtml = $this->getInputHTML( $value );
                $fieldType = get_class( $this );
@@ -224,7 +224,7 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
         *
         * @return array
         */
-       function loadDataFromRequest( $request ) {
+       public function loadDataFromRequest( $request ) {
                if ( $this->isSubmitAttempt( $request ) ) {
                        // Checkboxes are just not added to the request arrays if they're not checked,
                        // so it's perfectly possible for there not to be an entry at all
@@ -235,7 +235,7 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
                }
        }
 
-       function getDefault() {
+       public function getDefault() {
                if ( isset( $this->mDefault ) ) {
                        return $this->mDefault;
                } else {
@@ -243,7 +243,7 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
                }
        }
 
-       function filterDataForSubmit( $data ) {
+       public function filterDataForSubmit( $data ) {
                $columns = HTMLFormField::flattenOptions( $this->mParams['columns'] );
                $rows = HTMLFormField::flattenOptions( $this->mParams['rows'] );
                $res = [];
index 0c3bc5a..3f63c18 100644 (file)
@@ -25,7 +25,7 @@ class HTMLComboboxField extends HTMLTextField {
                return $attribs;
        }
 
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                $datalist = new XmlSelect( false, $this->mName . '-datalist' );
                $datalist->setTagName( 'datalist' );
                $datalist->addOptions( $this->getOptions() );
@@ -33,7 +33,7 @@ class HTMLComboboxField extends HTMLTextField {
                return parent::getInputHTML( $value ) . $datalist->getHTML();
        }
 
-       function getInputOOUI( $value ) {
+       public function getInputOOUI( $value ) {
                $disabled = false;
                $allowedParams = [ 'tabindex' ];
                $attribs = OOUI\Element::configFromHtmlAttributes(
index 3390a56..88dcd24 100644 (file)
@@ -75,7 +75,7 @@ class HTMLDateTimeField extends HTMLTextField {
                return $ret;
        }
 
-       function loadDataFromRequest( $request ) {
+       public function loadDataFromRequest( $request ) {
                if ( !$request->getCheck( $this->mName ) ) {
                        return $this->getDefault();
                }
@@ -85,7 +85,7 @@ class HTMLDateTimeField extends HTMLTextField {
                return $date ? $this->formatDate( $date ) : $value;
        }
 
-       function validate( $value, $alldata ) {
+       public function validate( $value, $alldata ) {
                $p = parent::validate( $value, $alldata );
 
                if ( $p !== true ) {
index 2ef4978..5dbccfd 100644 (file)
@@ -4,11 +4,11 @@
  * A field that will contain a numeric value
  */
 class HTMLFloatField extends HTMLTextField {
-       function getSize() {
+       public function getSize() {
                return isset( $this->mParams['size'] ) ? $this->mParams['size'] : 20;
        }
 
-       function validate( $value, $alldata ) {
+       public function validate( $value, $alldata ) {
                $p = parent::validate( $value, $alldata );
 
                if ( $p !== true ) {
index 6dc5d08..1376d0c 100644 (file)
@@ -19,7 +19,7 @@ class HTMLInfoField extends HTMLFormField {
                parent::__construct( $info );
        }
 
-       function getDefault() {
+       public function getDefault() {
                $default = parent::getDefault();
                if ( $default instanceof Closure ) {
                        $default = call_user_func( $default, $this->mParams );
index b0148d9..41916ed 100644 (file)
@@ -4,7 +4,7 @@
  * A field that must contain a number
  */
 class HTMLIntField extends HTMLFloatField {
-       function validate( $value, $alldata ) {
+       public function validate( $value, $alldata ) {
                $p = parent::validate( $value, $alldata );
 
                if ( $p !== true ) {
index fee5d63..58de763 100644 (file)
@@ -27,7 +27,7 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
                }
        }
 
-       function validate( $value, $alldata ) {
+       public function validate( $value, $alldata ) {
                $p = parent::validate( $value, $alldata );
 
                if ( $p !== true ) {
@@ -50,7 +50,7 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
                }
        }
 
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                if ( isset( $this->mParams['dropdown'] ) ) {
                        $this->mParent->getOutput()->addModules( 'jquery.chosen' );
                }
@@ -61,7 +61,7 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
                return $html;
        }
 
-       function formatOptions( $options, $value ) {
+       public function formatOptions( $options, $value ) {
                $html = '';
 
                $attribs = $this->getAttributes( [ 'disabled', 'tabindex' ] );
@@ -151,7 +151,7 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
         *
         * @return string
         */
-       function loadDataFromRequest( $request ) {
+       public function loadDataFromRequest( $request ) {
                if ( $this->isSubmitAttempt( $request ) ) {
                        // Checkboxes are just not added to the request arrays if they're not checked,
                        // so it's perfectly possible for there not to be an entry at all
@@ -162,7 +162,7 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
                }
        }
 
-       function getDefault() {
+       public function getDefault() {
                if ( isset( $this->mDefault ) ) {
                        return $this->mDefault;
                } else {
@@ -170,7 +170,7 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
                }
        }
 
-       function filterDataForSubmit( $data ) {
+       public function filterDataForSubmit( $data ) {
                $data = HTMLFormField::forceToStringRecursive( $data );
                $options = HTMLFormField::flattenOptions( $this->getOptions() );
 
index 42c2fdf..69dc617 100644 (file)
@@ -19,7 +19,7 @@ class HTMLRadioField extends HTMLFormField {
                }
        }
 
-       function validate( $value, $alldata ) {
+       public function validate( $value, $alldata ) {
                $p = parent::validate( $value, $alldata );
 
                if ( $p !== true ) {
@@ -47,13 +47,13 @@ class HTMLRadioField extends HTMLFormField {
         *
         * @return string
         */
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                $html = $this->formatOptions( $this->getOptions(), strval( $value ) );
 
                return $html;
        }
 
-       function getInputOOUI( $value ) {
+       public function getInputOOUI( $value ) {
                $options = [];
                foreach ( $this->getOptions() as $label => $data ) {
                        $options[] = [
@@ -76,7 +76,7 @@ class HTMLRadioField extends HTMLFormField {
                return true;
        }
 
-       function formatOptions( $options, $value ) {
+       public function formatOptions( $options, $value ) {
                global $wgUseMediaWikiUIEverywhere;
 
                $html = '';
index 8dc16bf..5a18025 100644 (file)
@@ -32,7 +32,7 @@ class HTMLRestrictionsField extends HTMLTextAreaField {
         * @param WebRequest $request
         * @return string|MWRestrictions Restrictions object or original string if invalid
         */
-       function loadDataFromRequest( $request ) {
+       public function loadDataFromRequest( $request ) {
                if ( !$request->getCheck( $this->mName ) ) {
                        return $this->getDefault();
                }
index e75c2b2..363769d 100644 (file)
@@ -11,7 +11,7 @@
  * @todo FIXME: If made 'required', only the text field should be compulsory.
  */
 class HTMLSelectAndOtherField extends HTMLSelectField {
-       function __construct( $params ) {
+       public function __construct( $params ) {
                if ( array_key_exists( 'other', $params ) ) {
                        // Do nothing
                } elseif ( array_key_exists( 'other-message', $params ) ) {
@@ -34,7 +34,7 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
 
        }
 
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                $select = parent::getInputHTML( $value[1] );
 
                $textAttribs = [
@@ -64,7 +64,7 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
                return "$select<br />\n$textbox";
        }
 
-       function getInputOOUI( $value ) {
+       public function getInputOOUI( $value ) {
                return false;
        }
 
@@ -73,7 +73,7 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
         *
         * @return array("<overall message>","<select value>","<text field value>")
         */
-       function loadDataFromRequest( $request ) {
+       public function loadDataFromRequest( $request ) {
                if ( $request->getCheck( $this->mName ) ) {
                        $list = $request->getText( $this->mName );
                        $text = $request->getText( $this->mName . '-other' );
@@ -108,11 +108,11 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
                return [ $final, $list, $text ];
        }
 
-       function getSize() {
+       public function getSize() {
                return isset( $this->mParams['size'] ) ? $this->mParams['size'] : 45;
        }
 
-       function validate( $value, $alldata ) {
+       public function validate( $value, $alldata ) {
                # HTMLSelectField forces $value to be one of the options in the select
                # field, which is not useful here.  But we do want the validation further up
                # the chain
index 40b31b5..c1f8e42 100644 (file)
@@ -4,7 +4,7 @@
  * A select dropdown field.  Basically a wrapper for Xmlselect class
  */
 class HTMLSelectField extends HTMLFormField {
-       function validate( $value, $alldata ) {
+       public function validate( $value, $alldata ) {
                $p = parent::validate( $value, $alldata );
 
                if ( $p !== true ) {
@@ -20,7 +20,7 @@ class HTMLSelectField extends HTMLFormField {
                }
        }
 
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                $select = new XmlSelect( $this->mName, $this->mID, strval( $value ) );
 
                if ( !empty( $this->mParams['disabled'] ) ) {
@@ -42,7 +42,7 @@ class HTMLSelectField extends HTMLFormField {
                return $select->getHTML();
        }
 
-       function getInputOOUI( $value ) {
+       public function getInputOOUI( $value ) {
                $disabled = false;
                $allowedParams = [ 'tabindex' ];
                $attribs = OOUI\Element::configFromHtmlAttributes(
index e7f1c04..45191d0 100644 (file)
@@ -12,7 +12,7 @@ class HTMLSelectLimitField extends HTMLSelectField {
         * @param array $alldata
         * @return bool
         */
-       function validate( $value, $alldata ) {
+       public function validate( $value, $alldata ) {
                if ( $value == '' ) {
                        return true;
                }
index 230790d..2e07af6 100644 (file)
@@ -12,7 +12,7 @@ class HTMLSelectNamespace extends HTMLFormField {
 
        }
 
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                return Html::namespaceSelector(
                        [
                                'selected' => $value,
index 8f7750c..1afb0a9 100644 (file)
@@ -7,7 +7,7 @@
  * and should be used instead.
  */
 class HTMLSelectOrOtherField extends HTMLTextField {
-       function __construct( $params ) {
+       public function __construct( $params ) {
                parent::__construct( $params );
                $this->getOptions();
                if ( !in_array( 'other', $this->mOptions, true ) ) {
@@ -21,7 +21,7 @@ class HTMLSelectOrOtherField extends HTMLTextField {
 
        }
 
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                $valInSelect = false;
 
                if ( $value !== false ) {
@@ -65,7 +65,7 @@ class HTMLSelectOrOtherField extends HTMLTextField {
                return "$select<br />\n$textbox";
        }
 
-       function getInputOOUI( $value ) {
+       public function getInputOOUI( $value ) {
                return false;
        }
 
@@ -74,7 +74,7 @@ class HTMLSelectOrOtherField extends HTMLTextField {
         *
         * @return string
         */
-       function loadDataFromRequest( $request ) {
+       public function loadDataFromRequest( $request ) {
                if ( $request->getCheck( $this->mName ) ) {
                        $val = $request->getText( $this->mName );
 
index c767d8f..d94eb8d 100644 (file)
@@ -9,11 +9,11 @@
  * size limits are represented using a negative integer.
  */
 class HTMLSizeFilterField extends HTMLIntField {
-       function getSize() {
+       public function getSize() {
                return isset( $this->mParams['size'] ) ? $this->mParams['size'] : 9;
        }
 
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                $attribs = [];
                if ( !empty( $this->mParams['disabled'] ) ) {
                        $attribs['disabled'] = 'disabled';
@@ -42,7 +42,7 @@ class HTMLSizeFilterField extends HTMLIntField {
        }
 
        // No OOUI yet
-       function getInputOOUI( $value ) {
+       public function getInputOOUI( $value ) {
                return false;
        }
 
@@ -51,7 +51,7 @@ class HTMLSizeFilterField extends HTMLIntField {
         *
         * @return string
         */
-       function loadDataFromRequest( $request ) {
+       public function loadDataFromRequest( $request ) {
                $size = $request->getInt( $this->mName );
                if ( !$size ) {
                        return $this->getDefault();
index 8075de5..e24541c 100644 (file)
@@ -5,7 +5,7 @@
 class HTMLTagFilter extends HTMLFormField {
        protected $tagFilter;
 
-       function getTableRow( $value ) {
+       public function getTableRow( $value ) {
                $this->tagFilter = ChangeTags::buildTagFilterSelector( $value );
                if ( $this->tagFilter ) {
                        return parent::getTableRow( $value );
@@ -13,7 +13,7 @@ class HTMLTagFilter extends HTMLFormField {
                return '';
        }
 
-       function getDiv( $value ) {
+       public function getDiv( $value ) {
                $this->tagFilter = ChangeTags::buildTagFilterSelector( $value );
                if ( $this->tagFilter ) {
                        return parent::getDiv( $value );
@@ -21,7 +21,7 @@ class HTMLTagFilter extends HTMLFormField {
                return '';
        }
 
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                if ( $this->tagFilter ) {
                        // we only need the select field, HTMLForm should handle the label
                        return $this->tagFilter[1];
index 8ffff43..82ec3bf 100644 (file)
@@ -22,15 +22,15 @@ class HTMLTextAreaField extends HTMLFormField {
                }
        }
 
-       function getCols() {
+       public function getCols() {
                return isset( $this->mParams['cols'] ) ? $this->mParams['cols'] : static::DEFAULT_COLS;
        }
 
-       function getRows() {
+       public function getRows() {
                return isset( $this->mParams['rows'] ) ? $this->mParams['rows'] : static::DEFAULT_ROWS;
        }
 
-       function getSpellCheck() {
+       public function getSpellCheck() {
                $val = isset( $this->mParams['spellcheck'] ) ? $this->mParams['spellcheck'] : null;
                if ( is_bool( $val ) ) {
                        // "spellcheck" attribute literally requires "true" or "false" to work.
@@ -39,7 +39,7 @@ class HTMLTextAreaField extends HTMLFormField {
                return null;
        }
 
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                $attribs = [
                                'id' => $this->mID,
                                'cols' => $this->getCols(),
index 3ab7176..88f5ec5 100644 (file)
@@ -22,11 +22,11 @@ class HTMLTextField extends HTMLFormField {
                }
        }
 
-       function getSize() {
+       public function getSize() {
                return isset( $this->mParams['size'] ) ? $this->mParams['size'] : 45;
        }
 
-       function getSpellCheck() {
+       public function getSpellCheck() {
                $val = isset( $this->mParams['spellcheck'] ) ? $this->mParams['spellcheck'] : null;
                if ( is_bool( $val ) ) {
                        // "spellcheck" attribute literally requires "true" or "false" to work.
@@ -43,7 +43,7 @@ class HTMLTextField extends HTMLFormField {
                return !( isset( $this->mParams['type'] ) && $this->mParams['type'] === 'password' );
        }
 
-       function getInputHTML( $value ) {
+       public function getInputHTML( $value ) {
                if ( !$this->isPersistent() ) {
                        $value = '';
                }
@@ -119,7 +119,7 @@ class HTMLTextField extends HTMLFormField {
                return $type;
        }
 
-       function getInputOOUI( $value ) {
+       public function getInputOOUI( $value ) {
                if ( !$this->isPersistent() ) {
                        $value = '';
                }