Code Duplication    Length = 13-13 lines in 2 locations

includes/auth/AuthManager.php 2 locations

@@ 504-516 (lines=13) @@
501
				}
502
			} elseif ( $state['primaryResponse'] === null ) {
503
				$provider = $this->getAuthenticationProvider( $state['primary'] );
504
				if ( !$provider instanceof PrimaryAuthenticationProvider ) {
505
					// Configuration changed? Force them to start over.
506
					// @codeCoverageIgnoreStart
507
					$ret = AuthenticationResponse::newFail(
508
						wfMessage( 'authmanager-authn-not-in-progress' )
509
					);
510
					$this->callMethodOnProviders( 7, 'postAuthentication',
511
						[ User::newFromName( $guessUserName ) ?: null, $ret ]
512
					);
513
					$session->remove( 'AuthManager::authnState' );
514
					return $ret;
515
					// @codeCoverageIgnoreEnd
516
				}
517
				$id = $provider->getUniqueId();
518
				$res = $provider->continuePrimaryAuthentication( $reqs );
519
				switch ( $res->status ) {
@@ 554-566 (lines=13) @@
551
			$res = $state['primaryResponse'];
552
			if ( $res->username === null ) {
553
				$provider = $this->getAuthenticationProvider( $state['primary'] );
554
				if ( !$provider instanceof PrimaryAuthenticationProvider ) {
555
					// Configuration changed? Force them to start over.
556
					// @codeCoverageIgnoreStart
557
					$ret = AuthenticationResponse::newFail(
558
						wfMessage( 'authmanager-authn-not-in-progress' )
559
					);
560
					$this->callMethodOnProviders( 7, 'postAuthentication',
561
						[ User::newFromName( $guessUserName ) ?: null, $ret ]
562
					);
563
					$session->remove( 'AuthManager::authnState' );
564
					return $ret;
565
					// @codeCoverageIgnoreEnd
566
				}
567
568
				if ( $provider->accountCreationType() === PrimaryAuthenticationProvider::TYPE_LINK &&
569
					$res->linkRequest &&