Code Duplication    Length = 8-8 lines in 2 locations

includes/auth/AuthManager.php 2 locations

@@ 1056-1063 (lines=8) @@
1053
1054
		// Permissions check
1055
		$status = $this->checkAccountCreatePermissions( $creator );
1056
		if ( !$status->isGood() ) {
1057
			$this->logger->debug( __METHOD__ . ': {creator} cannot create users: {reason}', [
1058
				'user' => $username,
1059
				'creator' => $creator->getName(),
1060
				'reason' => $status->getWikiText( null, null, 'en' )
1061
			] );
1062
			return AuthenticationResponse::newFail( $status->getMessage() );
1063
		}
1064
1065
		$status = $this->canCreateAccount(
1066
			$username, [ 'flags' => User::READ_LOCKING, 'creating' => true ]
@@ 1068-1075 (lines=8) @@
1065
		$status = $this->canCreateAccount(
1066
			$username, [ 'flags' => User::READ_LOCKING, 'creating' => true ]
1067
		);
1068
		if ( !$status->isGood() ) {
1069
			$this->logger->debug( __METHOD__ . ': {user} cannot be created: {reason}', [
1070
				'user' => $username,
1071
				'creator' => $creator->getName(),
1072
				'reason' => $status->getWikiText( null, null, 'en' )
1073
			] );
1074
			return AuthenticationResponse::newFail( $status->getMessage() );
1075
		}
1076
1077
		$user = User::newFromName( $username, 'creatable' );
1078
		foreach ( $reqs as $req ) {