Showing 136 of 282 total issues

Avoid deeply nested control flow statements.
Open

          if (other && other.value === tile.value) {
            return true; // These two tiles can be merged
          }
Severity: Major
Found in src/assets/js/games/2048/game_manager.js - About 45 mins to fix

    Consider simplifying this complex logical expression.
    Open

            if (t.getVariable("GAME_START_NOW") && !(t.debug && t.paused || "HOOK_NORMAL" !== S(t))) {
                t.removeInstance("tutorial"), t.removeInstance("tutorial-arrow");
                var e = t.getInstance("block_".concat(t.getVariable("BLOCK_COUNT")));
                e && "SWING" === e.status && (t.setTimeMovement("HOOK_UP_MOVEMENT", 500), e.status = "BEFORE_DROP")
            }
    Severity: Major
    Found in src/assets/js/games/tower/main.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

                                  if (k.status >= 200 && k.status < 300 || 304 == k.status || 0 == k.status && "file:" == _) {
                                      if (E = E || function (t) {
                                          return t && (t = t.split(";", 2)[0]), t && ("text/html" == t ? "html" : "application/json" == t ? "json" : s.test(t) ? "script" : u.test(t) && "xml") || "text"
                                      }(y.mimeType || k.getResponseHeader("content-type")), "arraybuffer" == k.responseType || "blob" == k.responseType) t = k.response; else {
                                          t = k.responseText;
      Severity: Major
      Found in src/assets/js/games/tower/main.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                        if (c) {
                            c.processing || (this.timeMovementStartArr.push(t), c.store[u] = [], e.forEach((function (t) {
                                c.store[u].push({start: parseFloat(t[0]), end: parseFloat(t[1])})
                            })), a && a());
                            var l = function () {
        Severity: Major
        Found in src/assets/js/games/tower/main.js - About 40 mins to fix

          Function on has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                          }, e.fn.on = function (t, n, o, s, u) {
          Severity: Minor
          Found in src/assets/js/games/tower/main.js - About 35 mins to fix

            Function p has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                            function p(t, e, n, i, r) {
            Severity: Minor
            Found in src/assets/js/games/tower/main.js - About 35 mins to fix

              Function m has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                              function m(t, e, n, i, r) {
              Severity: Minor
              Found in src/assets/js/games/tower/main.js - About 35 mins to fix

                Function is_localstorage has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                    static is_localstorage(): boolean {
                        if (typeof localStorage !== 'undefined') {
                            try {
                                localStorage.setItem('feature_test', 'yes');
                                if (localStorage.getItem('feature_test') === 'yes') {
                Severity: Minor
                Found in src/_utilities/storage.utility.ts - About 35 mins to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function disableBroadcast has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                    public disableBroadcast() {
                        const $tv = this.getBroadcastVideo();
                        if ($('#tv-stream').length && typeof videojs('tv-stream') !== 'undefined') {
                            videojs('tv-stream').muted(true);
                        }
                Severity: Minor
                Found in src/_helpers/player.helper.ts - About 35 mins to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function local has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                    static local(key: string, value?: string, options?: StoreOptions): any {
                        if (!key) {
                            return false;
                        }
                
                
                Severity: Minor
                Found in src/_utilities/storage.utility.ts - About 35 mins to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function constructor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                    constructor(config) {
                        let onerror, scope = this;
                
                        this.canAccessError = this.isErrorAvailable();
                        this.configure(config);
                Severity: Minor
                Found in src/_helpers/developer.ts - About 35 mins to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Avoid too many return statements within this function.
                Open

                          return arr;
                Severity: Major
                Found in src/_helpers/template7.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return '8';
                  Severity: Major
                  Found in src/_helpers/developer.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return '6';
                    Severity: Major
                    Found in src/_helpers/developer.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                    return getBlockVariation(game._theme.blocks[blockType], blockVariation);
                      Severity: Major
                      Found in src/assets/js/games/blockrain/blockrain.jquery.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return '9';
                        Severity: Major
                        Found in src/_helpers/developer.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return parsedItem.value;
                          Severity: Major
                          Found in src/_utilities/storage.utility.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                          return getBlockVariation(game._theme.complexBlocks[blockType], blockVariation);
                            Severity: Major
                            Found in src/assets/js/games/blockrain/blockrain.jquery.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                                          if (void 0 !== e) return n(e).find(t);
                              Severity: Major
                              Found in src/assets/js/games/tower/main.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return '5';
                                Severity: Major
                                Found in src/_helpers/developer.ts - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language