Code Duplication    Length = 6-8 lines in 3 locations

includes/auth/AuthManager.php 3 locations

@@ 622-627 (lines=6) @@
619
					case AuthenticationResponse::ABSTAIN;
620
						$state['secondary'][$id] = true;
621
						break;
622
					case AuthenticationResponse::FAIL;
623
						$this->logger->debug( "Login failed in secondary authentication by $id" );
624
						$this->callMethodOnProviders( 7, 'postAuthentication', [ $user, $res ] );
625
						$session->remove( 'AuthManager::authnState' );
626
						\Hooks::run( 'AuthManagerLoginAuthenticateAudit', [ $res, $user, $user->getName() ] );
627
						return $res;
628
					case AuthenticationResponse::REDIRECT;
629
					case AuthenticationResponse::UI;
630
						$this->logger->debug( "Secondary login with $id returned " . $res->status );
@@ 1263-1270 (lines=8) @@
1260
							$state['primary'] = $id;
1261
							$state['primaryResponse'] = $res;
1262
							break 2;
1263
						case AuthenticationResponse::FAIL;
1264
							$this->logger->debug( __METHOD__ . ": Primary creation failed by $id", [
1265
								'user' => $user->getName(),
1266
								'creator' => $creator->getName(),
1267
							] );
1268
							$this->callMethodOnProviders( 7, 'postAccountCreation', [ $user, $creator, $res ] );
1269
							$session->remove( 'AuthManager::accountCreationState' );
1270
							return $res;
1271
						case AuthenticationResponse::ABSTAIN;
1272
							// Continue loop
1273
							break;
@@ 1329-1336 (lines=8) @@
1326
						] );
1327
						$state['primaryResponse'] = $res;
1328
						break;
1329
					case AuthenticationResponse::FAIL;
1330
						$this->logger->debug( __METHOD__ . ": Primary creation failed by $id", [
1331
							'user' => $user->getName(),
1332
							'creator' => $creator->getName(),
1333
						] );
1334
						$this->callMethodOnProviders( 7, 'postAccountCreation', [ $user, $creator, $res ] );
1335
						$session->remove( 'AuthManager::accountCreationState' );
1336
						return $res;
1337
					case AuthenticationResponse::REDIRECT;
1338
					case AuthenticationResponse::UI;
1339
						$this->logger->debug( __METHOD__ . ": Primary creation $res->status by $id", [