resources: Collapse all jQuery UI modules into one deprecated mega-module
[lhc/web/wiklou.git] / includes / specialpage / AuthManagerSpecialPage.php
index 65cd2d2..9934150 100644 (file)
@@ -13,7 +13,8 @@ use MediaWiki\Session\Token;
  */
 abstract class AuthManagerSpecialPage extends SpecialPage {
        /** @var string[] The list of actions this special page deals with. Subclasses should override
-        * this. */
+        * this.
+        */
        protected static $allowedActions = [
                AuthManager::ACTION_LOGIN, AuthManager::ACTION_LOGIN_CONTINUE,
                AuthManager::ACTION_CREATE, AuthManager::ACTION_CREATE_CONTINUE,
@@ -434,10 +435,11 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
                                if ( is_string( reset( $status ) ) ) {
                                        $status = Status::newFatal( ...$status );
                                } elseif ( is_array( reset( $status ) ) ) {
-                                       $status = Status::newGood();
+                                       $ret = Status::newGood();
                                        foreach ( $status as $message ) {
-                                               $status->fatal( ...$message );
+                                               $ret->fatal( ...$message );
                                        }
+                                       $status = $ret;
                                } else {
                                        throw new UnexpectedValueException( 'invalid HTMLForm::trySubmit() return value: '
                                                . 'first element of array is ' . gettype( reset( $status ) ) );
@@ -507,7 +509,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
         * Generates a HTMLForm descriptor array from a set of authentication requests.
         * @param AuthenticationRequest[] $requests
         * @param string $action AuthManager action name (one of the AuthManager::ACTION_* constants)
-        * @return array
+        * @return array[]
         */
        protected function getAuthFormDescriptor( $requests, $action ) {
                $fieldInfo = AuthenticationRequest::mergeFieldInfo( $requests );
@@ -598,7 +600,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
        /**
         * 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 array &$formDescriptor
+        * @param array[] &$formDescriptor
         */
        protected function addTabIndex( &$formDescriptor ) {
                $i = 1;