Code Duplication    Length = 12-12 lines in 2 locations

includes/auth/AuthManager.php 2 locations

@@ 636-647 (lines=12) @@
633
			$beginReqs = $state['reqs'];
634
635
			foreach ( $this->getSecondaryAuthenticationProviders() as $id => $provider ) {
636
				if ( !isset( $state['secondary'][$id] ) ) {
637
					// This provider isn't started yet, so we pass it the set
638
					// of reqs from beginAuthentication instead of whatever
639
					// might have been used by a previous provider in line.
640
					$func = 'beginSecondaryAuthentication';
641
					$res = $provider->beginSecondaryAuthentication( $user, $beginReqs );
642
				} elseif ( !$state['secondary'][$id] ) {
643
					$func = 'continueSecondaryAuthentication';
644
					$res = $provider->continueSecondaryAuthentication( $user, $reqs );
645
				} else {
646
					continue;
647
				}
648
				switch ( $res->status ) {
649
					case AuthenticationResponse::PASS;
650
						$this->logger->debug( "Secondary login with $id succeeded" );
@@ 1452-1463 (lines=12) @@
1449
			$beginReqs = $state['reqs'];
1450
1451
			foreach ( $this->getSecondaryAuthenticationProviders() as $id => $provider ) {
1452
				if ( !isset( $state['secondary'][$id] ) ) {
1453
					// This provider isn't started yet, so we pass it the set
1454
					// of reqs from beginAuthentication instead of whatever
1455
					// might have been used by a previous provider in line.
1456
					$func = 'beginSecondaryAccountCreation';
1457
					$res = $provider->beginSecondaryAccountCreation( $user, $creator, $beginReqs );
1458
				} elseif ( !$state['secondary'][$id] ) {
1459
					$func = 'continueSecondaryAccountCreation';
1460
					$res = $provider->continueSecondaryAccountCreation( $user, $creator, $reqs );
1461
				} else {
1462
					continue;
1463
				}
1464
				switch ( $res->status ) {
1465
					case AuthenticationResponse::PASS;
1466
						$this->logger->debug( __METHOD__ . ": Secondary creation passed by $id", [