core/api/hooks/hooks.query.js

Summary

Maintainability
B
6 hrs
Test Coverage
C
74%

Function populateObjects has 62 lines of code (exceeds 50 allowed). Consider refactoring.
Open

export function populateObjects (options) {
  return async function (hook) {
    const app = hook.app
    const data = hook.data
    const params = hook.params
Severity: Major
Found in core/api/hooks/hooks.query.js - About 1 hr to fix

    Function populateObject has 60 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    export function populateObject (options) {
      return async function (hook) {
        const app = hook.app
        const data = hook.data
        const params = hook.params
    Severity: Major
    Found in core/api/hooks/hooks.query.js - About 1 hr to fix

      Avoid too many return statements within this function.
      Open

            return hook
      Severity: Major
      Found in core/api/hooks/hooks.query.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return hook
        Severity: Major
        Found in core/api/hooks/hooks.query.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                return hook
          Severity: Major
          Found in core/api/hooks/hooks.query.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return hook
            Severity: Major
            Found in core/api/hooks/hooks.query.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      else return hook
              Severity: Major
              Found in core/api/hooks/hooks.query.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      return hook
                Severity: Major
                Found in core/api/hooks/hooks.query.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                            else return hook
                  Severity: Major
                  Found in core/api/hooks/hooks.query.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                          else return hook
                    Severity: Major
                    Found in core/api/hooks/hooks.query.js - About 30 mins to fix

                      There are no issues that match your filters.

                      Category
                      Status