OpenHPS/openhps-mongodb

View on GitHub
src/MongoDataServiceDriver.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function connect has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public connect(): Promise<void> {
        if (this._client !== undefined) {
            return Promise.resolve();
        }
        return new Promise((resolve, reject) => {
Severity: Minor
Found in src/MongoDataServiceDriver.ts - About 1 hr to fix

    Function insert has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public insert(id: I, object: T): Promise<T> {
            return new Promise<T>((resolve, reject) => {
                if (this._collection === undefined) {
                    return reject(new Error(`MongoDB connection not ready!`));
                }
    Severity: Minor
    Found in src/MongoDataServiceDriver.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status