smartinmedia/cunity

View on GitHub
lib/modules/Messages/styles/javascript/inbox.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function loadConversations has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function loadConversations() {
    sendRequest({}, "messages", "load", function (res) {
        if (typeof res.conversations !== "undefined" && res.conversations !== null && res.conversations.length > 0) {
            $(".inbox-empty,.inbox-loader").hide();
            $(".inbox-item").remove();
Severity: Minor
Found in lib/modules/Messages/styles/javascript/inbox.js - About 1 hr to fix

Avoid deeply nested control flow statements.
Open

                        if (i === 3) {
                            userstring += ", +" + (us.length - 3);
                            break;
                        }
Severity: Major
Found in lib/modules/Messages/styles/javascript/inbox.js - About 45 mins to fix

There are no issues that match your filters.

Category
Status