Code Duplication    Length = 13-13 lines in 2 locations

includes/auth/AuthManager.php 2 locations

@@ 426-438 (lines=13) @@
423
							$state['primaryResponse'] = $res;
424
							$this->logger->debug( "Primary login with $id succeeded" );
425
							break 2;
426
						case AuthenticationResponse::FAIL;
427
							$this->logger->debug( "Login failed in primary authentication by $id" );
428
							if ( $res->createRequest || $state['maybeLink'] ) {
429
								$res->createRequest = new CreateFromLoginAuthenticationRequest(
430
									$res->createRequest, $state['maybeLink']
431
								);
432
							}
433
							$this->callMethodOnProviders( 7, 'postAuthentication',
434
								[ User::newFromName( $guessUserName ) ?: null, $res ]
435
							);
436
							$session->remove( 'AuthManager::authnState' );
437
							\Hooks::run( 'AuthManagerLoginAuthenticateAudit', [ $res, null, $guessUserName ] );
438
							return $res;
439
						case AuthenticationResponse::ABSTAIN;
440
							// Continue loop
441
							break;
@@ 492-504 (lines=13) @@
489
						$state['primaryResponse'] = $res;
490
						$this->logger->debug( "Primary login with $id succeeded" );
491
						break;
492
					case AuthenticationResponse::FAIL;
493
						$this->logger->debug( "Login failed in primary authentication by $id" );
494
						if ( $res->createRequest || $state['maybeLink'] ) {
495
							$res->createRequest = new CreateFromLoginAuthenticationRequest(
496
								$res->createRequest, $state['maybeLink']
497
							);
498
						}
499
						$this->callMethodOnProviders( 7, 'postAuthentication',
500
							[ User::newFromName( $guessUserName ) ?: null, $res ]
501
						);
502
						$session->remove( 'AuthManager::authnState' );
503
						\Hooks::run( 'AuthManagerLoginAuthenticateAudit', [ $res, null, $guessUserName ] );
504
						return $res;
505
					case AuthenticationResponse::REDIRECT;
506
					case AuthenticationResponse::UI;
507
						$this->logger->debug( "Primary login with $id returned $res->status" );