YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Avoid too many return statements within this method.
Open

            return false;
Severity: Major
Found in modules/Import/helpers/Utils.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                return false;
    Severity: Major
    Found in modules/Import/helpers/Utils.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return false;
      Severity: Major
      Found in modules/Import/helpers/Utils.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return true;
        Severity: Major
        Found in modules/Import/helpers/Utils.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                                  return true;
          Severity: Major
          Found in api/webservice/WebservicePremium/Privilege.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return true;
            Severity: Major
            Found in api/webservice/WebservicePremium/Privilege.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return false;
              Severity: Major
              Found in api/webservice/WebservicePremium/Privilege.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return false;
                Severity: Major
                Found in api/webservice/WebservicePremium/Privilege.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                              return true;
                  Severity: Major
                  Found in api/webservice/WebservicePremium/Privilege.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return true;
                    Severity: Major
                    Found in api/webservice/WebservicePremium/Privilege.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                          return true;
                      Severity: Major
                      Found in api/webservice/WebservicePremium/Privilege.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return false;
                        Severity: Major
                        Found in api/webservice/WebservicePremium/Privilege.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return $permission;
                          Severity: Major
                          Found in api/webservice/WebservicePremium/Privilege.php - About 30 mins to fix

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

                                    registerFieldDetailsChange: function (contents) {
                                        contents.find('[name="mandatory"]').on('change', function (e) {
                                            let currentTarget = $(e.currentTarget);
                                            if (currentTarget.attr('readonly') !== 'readonly') {
                                                var form = currentTarget.closest('.fieldDetailsForm');

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

                                    registerDragDropEvent: function (contentData) {
                                        if (contentData == undefined) {
                                            return;
                                        }
                                        const thisInstance = this;

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

                                    getHourValues: function (list, currentValue) {
                                        let options = '';
                                        for (let key in list) {
                                            //IE Browser consider the prototype properties also, it should consider has own properties only.
                                            if (list.hasOwnProperty(key)) {
                            Severity: Minor
                            Found in public_html/layouts/basic/modules/Users/resources/Edit.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 checkChildren has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    checkChildren: function (id, data) {
                                        let self = this,
                                            dataNew = [];
                                        for (let key in data) {
                                            if (data[key].id != id) {

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

                                    lockCheckbox: function (contents) {
                                        contents.on('change', ':checkbox', function (e) {
                                            let currentTarget = $(e.currentTarget);
                                            if (currentTarget.attr('readonly') === 'readonly') {
                                                var status = $(e.currentTarget).is(':checked');

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

                                    registerChangeVal: function (content) {
                                        content.on('change', '.configField', function (e) {
                                            let target = $(e.currentTarget),
                                                params = {
                                                    module: app.getModuleName(),

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

                                    registerChangeVal: function (content) {
                                        content.find('.js-config-field').on('change', function (e) {
                                            var target = $(e.currentTarget);
                                            var params = {};
                                            params['type'] = target.data('type');

                            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