oddbit/sonosjs

View on GitHub
src/models/state.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function lastChange has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function lastChange(opts) {
            opts = opts || {};

            var that = {};

Severity: Major
Found in src/models/state.js - About 2 hrs to fix

Function init has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            (function init() {
                switch (playState) {
                case "PLAYING":
                    that.playState = playStateType.PLAYING;
                    break;
Severity: Minor
Found in src/models/state.js - About 1 hr to fix

Function fromXml has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        lastChange.fromXml = function (xmlString, callback) {
            // Everything below the LastChange tag is URL encoded and the meta data is encoded twice
            xmlString = xml.decode(xmlString);
            var xmlParser = xml.parser();

Severity: Minor
Found in src/models/state.js - About 1 hr to fix

There are no issues that match your filters.

Category
Status