Showing 136 of 282 total issues

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 k.Z(i, 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 this.each((function () {
                                  this.style.cssText += ";" + u
                              }))
      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 '0';
        Severity: Major
        Found in src/_helpers/developer.ts - About 30 mins to fix

          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 '7';
            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

                  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 get has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static get(field: string = '', fallbackValue: any = null): any {
                          const config = Store.get('config');
                          if (field === '') {
                              return config;
                          }
                  Severity: Minor
                  Found in src/_helpers/config.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 getEventList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public getEventList(onlyButtons: boolean = false) {
                          let results = this.events;
                          if (onlyButtons) {
                              let resultsWithButton = [];
                              for (let i: number = 0; i < results.length; i++) {
                  Severity: Minor
                  Found in src/app/inputs.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 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

                  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 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

                  Severity
                  Category
                  Status
                  Source
                  Language