partkeepr/PartKeepr

View on GitHub

Showing 481 of 922 total issues

Function createFilterFields has 804 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    createFilterFields: function ()
    {

        // Create the storage location filter field
        this.storageLocationFilter = Ext.create("PartKeepr.StorageLocationComboBox", {

    File PartFilterPanel.js has 994 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Defines the part filter panel.
     *
     *
     */

      File ThemeTester.js has 943 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      Ext.define("PartKeepr.ThemeTester", {
          extend: "Ext.panel.Panel",
          scrollable: true,
      
          initComponent: function () {

        Function createFilterFields has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
        Open

            createFilterFields: function ()
            {
        
                // Create the storage location filter field
                this.storageLocationFilter = Ext.create("PartKeepr.StorageLocationComboBox", {

        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 initComponent has 274 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            initComponent: function ()
            {
                // Defines the overall height of all fields, used to calculate the anchoring for the description field
                var overallHeight = (this.partMode == "create") ? 320: 265;
        
        

          File PartKeepr.js has 607 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          Ext.namespace('PartKeepr');
          
          PartKeepr.application = null;
          
          Ext.application({
          Severity: Major
          Found in src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js - About 1 day to fix

            Function applyData has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
            Open

                applyData: function ()
                {
                    var spec, i, unit, value, siPrefix, distributor, j, partDistributor, currency, k, found;
            
                    if (this.waitMessage instanceof Ext.window.MessageBox)

            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

            Part has 68 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Part extends BaseEntity
            {
                /**
                 * The category of the part.
                 *
            Severity: Major
            Found in src/PartKeepr/PartBundle/Entity/Part.php - About 1 day to fix

              File bcrypt.js has 576 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              function bCrypt() {
                  this.GENSALT_DEFAULT_LOG2_ROUNDS = 10;
                  this.BCRYPT_SALT_LEN = 16;
                  this.BLOWFISH_NUM_ROUNDS = 16;
                  this.MAX_EXECUTION_TIME = 100;

                Function saveAs has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
                Open

                var saveAs = saveAs || (function(view) {
                    "use strict";
                    // IE <10 is explicitly unsupported
                    if (typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
                        return;
                Severity: Minor
                Found in src/PartKeepr/FrontendBundle/Resources/public/js/Util/FileSaver.js - About 1 day 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 bCrypt has 233 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function bCrypt() {
                    this.GENSALT_DEFAULT_LOG2_ROUNDS = 10;
                    this.BCRYPT_SALT_LEN = 16;
                    this.BLOWFISH_NUM_ROUNDS = 16;
                    this.MAX_EXECUTION_TIME = 100;

                  Function treeMaker has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
                  Open

                      treeMaker: function (node, model, prefix, callback, originalVisitedModels)
                      {
                          var fields = model.getFields();
                          var checked;
                          var newNode;

                  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 CryptoJS has 226 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var CryptoJS = CryptoJS || (function (Math, undefined) {
                      /**
                       * CryptoJS namespace.
                       */
                      var C = {};
                  Severity: Major
                  Found in src/PartKeepr/FrontendBundle/Resources/public/js/Util/Crypto/core.js - About 1 day to fix

                    Function saveAs has 214 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var saveAs = saveAs || (function(view) {
                        "use strict";
                        // IE <10 is explicitly unsupported
                        if (typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
                            return;
                    Severity: Major
                    Found in src/PartKeepr/FrontendBundle/Resources/public/js/Util/FileSaver.js - About 1 day to fix

                      Function initComponent has 208 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          initComponent: function () {
                      
                              /**
                               * Create the store with the default sorter "name ASC"
                               */

                        Function CryptoJS has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                        Open

                        var CryptoJS = CryptoJS || (function (Math, undefined) {
                            /**
                             * CryptoJS namespace.
                             */
                            var C = {};
                        Severity: Minor
                        Found in src/PartKeepr/FrontendBundle/Resources/public/js/Util/Crypto/core.js - About 1 day 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

                        `` has 55 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        Ext.application({
                            name: 'PartKeepr',
                            loginManager: null,
                        
                            init: function ()
                        Severity: Major
                        Found in src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js - About 7 hrs to fix

                          File PartsManager.js has 482 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /**
                           * @class PartKeepr.PartManager
                           * @todo Document the editor system a bit better
                           *
                           * The part manager encapsulates the category tree, the part display grid and the part detail view.

                            File Importer.js has 480 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            Ext.define("PartKeepr.Importer.Importer", {
                                extend: "Ext.panel.Panel",
                                layout: 'border',
                                bbar: [
                                    {

                              Function make has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  make: function (node, model, prefix, callback)
                                  {
                                      var newNode,i ,j, childNode, associationAlreadyProcessed;
                              
                                      if (!prefix) {

                              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