/**
* Submit handler callback for HTMLForm
* @private
- * @param $data array Submitted data
+ * @param array $data Submitted data
* @return Status
*/
public function handleFormSubmit( $data ) {
/**
* Adds a sequential tabindex starting from 1 to all form elements. This way the user can
* use the tab key to traverse the form without having to step through all links and such.
- * @param $formDescriptor
+ * @param array &$formDescriptor
*/
protected function addTabIndex( &$formDescriptor ) {
$i = 1;
} elseif ( array_key_exists( 'type', $definition ) ) {
$class = HTMLForm::$typeMappings[$definition['type']];
}
- if ( $class !== 'HTMLInfoField' ) {
+ if ( $class !== HTMLInfoField::class ) {
$definition['tabindex'] = $i;
$i++;
}
];
if ( $type === 'submit' && isset( $singleFieldInfo['label'] ) ) {
- $descriptor['default'] = wfMessage( $singleFieldInfo['label'] )->plain();
+ $descriptor['default'] = $singleFieldInfo['label']->plain();
} elseif ( $type !== 'submit' ) {
$descriptor += array_filter( [
// help-message is omitted as it is usually not really useful for a web interface
if ( isset( $singleFieldInfo['options'] ) ) {
$descriptor['options'] = array_flip( array_map( function ( $message ) {
- /** @var $message Message */
+ /** @var Message $message */
return $message->parse();
}, $singleFieldInfo['options'] ) );
}