Code Duplication    Length = 13-13 lines in 2 locations

includes/auth/AuthManager.php 2 locations

@@ 472-484 (lines=13) @@
469
				}
470
			} elseif ( $state['primaryResponse'] === null ) {
471
				$provider = $this->getAuthenticationProvider( $state['primary'] );
472
				if ( !$provider instanceof PrimaryAuthenticationProvider ) {
473
					// Configuration changed? Force them to start over.
474
					// @codeCoverageIgnoreStart
475
					$ret = AuthenticationResponse::newFail(
476
						wfMessage( 'authmanager-authn-not-in-progress' )
477
					);
478
					$this->callMethodOnProviders( 7, 'postAuthentication',
479
						[ User::newFromName( $guessUserName ) ?: null, $ret ]
480
					);
481
					$session->remove( 'AuthManager::authnState' );
482
					return $ret;
483
					// @codeCoverageIgnoreEnd
484
				}
485
				$id = $provider->getUniqueId();
486
				$res = $provider->continuePrimaryAuthentication( $reqs );
487
				switch ( $res->status ) {
@@ 522-534 (lines=13) @@
519
			$res = $state['primaryResponse'];
520
			if ( $res->username === null ) {
521
				$provider = $this->getAuthenticationProvider( $state['primary'] );
522
				if ( !$provider instanceof PrimaryAuthenticationProvider ) {
523
					// Configuration changed? Force them to start over.
524
					// @codeCoverageIgnoreStart
525
					$ret = AuthenticationResponse::newFail(
526
						wfMessage( 'authmanager-authn-not-in-progress' )
527
					);
528
					$this->callMethodOnProviders( 7, 'postAuthentication',
529
						[ User::newFromName( $guessUserName ) ?: null, $ret ]
530
					);
531
					$session->remove( 'AuthManager::authnState' );
532
					return $ret;
533
					// @codeCoverageIgnoreEnd
534
				}
535
536
				if ( $provider->accountCreationType() === PrimaryAuthenticationProvider::TYPE_LINK &&
537
					$res->linkRequest &&