Showing 282 of 282 total issues

Avoid too many return statements within this function.
Open

            return '5';
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 '8';
      Severity: Major
      Found in src/_helpers/developer.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

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

          Avoid too many return statements within this function.
          Open

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

            Avoid too many return statements within this function.
            Open

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

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                                      })); else if (P(t)) i = [t], t = null; else if (p.test(t)) i = k.fragment(t.trim(), RegExp.$1, e), t = null; else {
                                          if (void 0 !== e) return n(e).find(t);
                                          i = k.qsa(l, t)
                                      }
              Severity: Minor
              Found in src/assets/js/games/tower/main.js and 1 other location - About 30 mins to fix
              src/assets/js/games/tower/main.js on lines 174..177

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 45.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                      t.x += t.ax, (t.x >= t.originX + t.width || t.x <= t.originX - t.width) && (t.ax *= -1), _(e) && (t.y += 1.2 * k(e)), t.y >= e.height && (t.y = .66 * -e.height, t.count += 4, j(t))
              Severity: Minor
              Found in src/assets/js/games/tower/main.js and 1 other location - About 30 mins to fix
              src/assets/js/games/tower/main.js on lines 1510..1510

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 45.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                                  if ("string" == typeof t) if ("<" == (t = t.trim())[0] && p.test(t)) i = k.fragment(t, RegExp.$1, e), t = null; else {
                                      if (void 0 !== e) return n(e).find(t);
                                      i = k.qsa(l, t)
                                  } else {
              Severity: Minor
              Found in src/assets/js/games/tower/main.js and 1 other location - About 30 mins to fix
              src/assets/js/games/tower/main.js on lines 182..185

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 45.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                                      return t.y + t.height >= e.y ? t.x < e.x - t.calWidth || t.x > e.collisionX + t.calWidth ? 1 : t.x < e.x ? 2 : t.x > e.collisionX ? 3 : t.x > e.x + .8 * t.calWidth && t.x < e.x + 1.2 * t.calWidth ? 5 : 4 : 0
              Severity: Minor
              Found in src/assets/js/games/tower/main.js and 1 other location - About 30 mins to fix
              src/assets/js/games/tower/main.js on lines 1451..1451

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 45.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                      var n = t.getVariable("SUCCESS_COUNT"), i = t.getVariable("GAME_SCORE"), r = t.getVariable("GAME_USER_OPTION").landBlockSpeed;
              Severity: Minor
              Found in src/assets/js/games/tower/main.js and 1 other location - About 30 mins to fix
              src/assets/js/games/tower/main.js on lines 1622..1622

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 45.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                      if( typeof this._theme.background === 'string' ) {
                        this._$canvas.css('background-color', this._theme.background);
                      }
              Severity: Minor
              Found in src/assets/js/games/blockrain/blockrain.jquery.js and 1 other location - About 30 mins to fix
              src/assets/js/games/blockrain/blockrain.jquery.js on lines 1217..1219

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 45.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                    if( typeof this._theme.background === 'string' ) {
                      this._$canvas.css('background-color', this._theme.background);
                    }
              Severity: Minor
              Found in src/assets/js/games/blockrain/blockrain.jquery.js and 1 other location - About 30 mins to fix
              src/assets/js/games/blockrain/blockrain.jquery.js on lines 187..189

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 45.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                                  var e = t.getVariable("SUCCESS_COUNT"), n = t.getVariable("GAME_SCORE"), i = t.getVariable("GAME_USER_OPTION").hookAngle;
              Severity: Minor
              Found in src/assets/js/games/tower/main.js and 1 other location - About 30 mins to fix
              src/assets/js/games/tower/main.js on lines 1360..1360

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 45.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Function destroy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  public destroy(layout?: string): void {
                      if (this.config.exitMethod === 'hide') {
                          try {
                              this.appManager.hide();
                          } catch (e) {
              Severity: Minor
              Found in src/app/bootstrap.ts - About 25 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 loadDetails has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  private loadDetails($carousel: JQuery<HTMLElement>, $item?: JQuery<HTMLElement>): void {
                      const self = this;
                      const id = (typeof $item !== 'undefined'
                          && typeof $item.attr('data-id') !== 'undefined'
                          && $item.attr('data-id'))
              Severity: Minor
              Found in src/modules/news/news.module.ts - About 25 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 serialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              Grid.prototype.serialize = function () {
                var cellState = [];
              
                for (var x = 0; x < this.size; x++) {
                  var row = cellState[x] = [];
              Severity: Minor
              Found in src/assets/js/games/2048/grid.js - About 25 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 rewind has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  public rewind() {
                      const self = this;
                      const player = this.type === 'videojs' ? videojs(this.playerId) : this.instance[0];
                      this.instance.userActive(true);
                      try {
              Severity: Minor
              Found in src/_helpers/player.helper.ts - About 25 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 expiry has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  static expiry(val): any {
                      if (!val) {
                          return false;
                      }
                      if (-1 === val) {
              Severity: Minor
              Found in src/_utilities/storage.utility.ts - About 25 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 fromState has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              Grid.prototype.fromState = function (state) {
                var cells = [];
              
                for (var x = 0; x < this.size; x++) {
                  var row = cells[x] = [];
              Severity: Minor
              Found in src/assets/js/games/2048/grid.js - About 25 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

              Severity
              Category
              Status
              Source
              Language