Code Duplication    Length = 7-12 lines in 2 locations

includes/specialpage/AuthManagerSpecialPage.php 1 location

@@ 482-488 (lines=7) @@
479
	 * @param $data array Submitted data
480
	 * @return Status
481
	 */
482
	public function handleFormSubmit( $data ) {
483
		$requests = AuthenticationRequest::loadRequestsFromSubmission( $this->authRequests, $data );
484
		$response = $this->performAuthenticationStep( $this->authAction, $requests );
485
486
		// we can't handle FAIL or similar as failure here since it might require changing the form
487
		return Status::newGood( $response );
488
	}
489
490
	/**
491
	 * Returns URL query parameters which can be used to reload the page (or leave and return) while

includes/specials/SpecialChangeCredentials.php 1 location

@@ 158-169 (lines=12) @@
155
		return true;
156
	}
157
158
	public function handleFormSubmit( $data ) {
159
		// remove requests do not accept user input
160
		$requests = $this->authRequests;
161
		if ( static::$loadUserData ) {
162
			$requests = AuthenticationRequest::loadRequestsFromSubmission( $this->authRequests, $data );
163
		}
164
165
		$response = $this->performAuthenticationStep( $this->authAction, $requests );
166
167
		// we can't handle FAIL or similar as failure here since it might require changing the form
168
		return Status::newGood( $response );
169
	}
170
171
	/**
172
	 * @param Message|null $error