preferences: Add typehint in saveFormData() for PreferencesFormOOUI
This was temporarily removed in 3bcf5655870f for compat with the GlobalPreferences extension. The old typehint of HTMLForm was incorrect (as discovered by a Phan rule that was disabled for core), because getModifiedUser() only exists in the PreferencesFormOOUI subclass. Change-Id: I792286ed44f03467b5d875e61c52b1953252b55f Depends-On: I4fa3e6aad872434ca397325ed7a83f94973661d0
This commit is contained in:
parent
0e8afecabc
commit
ed398c0253
1 changed files with 2 additions and 3 deletions
|
|
@ -1586,12 +1586,11 @@ class DefaultPreferencesFactory implements PreferencesFactory {
|
|||
* Handle the form submission if everything validated properly
|
||||
*
|
||||
* @param array $formData
|
||||
* @param HTMLForm $form
|
||||
* @param PreferencesFormOOUI $form
|
||||
* @param array[] $formDescriptor
|
||||
* @return bool|Status|string
|
||||
*/
|
||||
protected function saveFormData( $formData, HTMLForm $form, array $formDescriptor ) {
|
||||
/** @var \User $user */
|
||||
protected function saveFormData( $formData, PreferencesFormOOUI $form, array $formDescriptor ) {
|
||||
$user = $form->getModifiedUser();
|
||||
$hiddenPrefs = $this->options->get( 'HiddenPrefs' );
|
||||
$result = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue