partkeepr/PartKeepr

View on GitHub

Showing 481 of 922 total issues

Function FileSaver has 123 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        , FileSaver = function(blob, name, no_auto_bom) {
            if (!no_auto_bom) {
                blob = auto_bom(blob);
            }
            // First try a.download, then web filesystem, then object URLs
Severity: Major
Found in src/PartKeepr/FrontendBundle/Resources/public/js/Util/FileSaver.js - About 4 hrs to fix

    Function parseConfiguration has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

        public function parseConfiguration($importConfiguration)
        {
            if (property_exists($importConfiguration, "fields")) {
                foreach ($importConfiguration->fields as $field => $configuration) {
                    if ($this->classMetadata->hasField($field)) {
    Severity: Minor
    Found in src/PartKeepr/ImportBundle/Configuration/Configuration.php - About 4 hrs 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 initComponent has 121 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        initComponent: function ()
        {
            this.store = Ext.create("Ext.data.Store", {
                model: 'PartKeepr.PartBundle.Entity.PartParameter',
                proxy: {

      Function replaceTemporaryFile has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
      Open

          public function replaceTemporaryFile(GetResponseForControllerResultEvent $event)
          {
              $data = $event->getControllerResult();
      
              if (!is_object($data)) {

      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

      Method load has 118 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function load(ObjectManager $manager)
          {
              $partUnit = new PartMeasurementUnit();
              $partUnit->setName('pieces');
              $partUnit->setShortName('pcs');
      Severity: Major
      Found in src/PartKeepr/PartBundle/DataFixtures/PartDataLoader.php - About 4 hrs to fix

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

            initComponent: function ()
            {
        
                if (this.imageUpload) {
                    this.uploadURL = PartKeepr.getBasePath() + "/api/temp_images/upload";

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

              initComponent: function ()
              {
                  this.iconComponent = Ext.create('Ext.Component', {
                      baseCls: Ext.baseCSSPrefix + 'message-box-icon' + " " + Ext.baseCSSPrefix + 'message-box-error'
                  });

            Function getLegacyConfig has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

                protected function getLegacyConfig()
                {
                    $config = [];
            
                    $legacyConfig = $this->get('partkeepr.setup.config_service')->legacyConfigParser();

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

            var isaac = (function(){
            
              /* private: internal states */
              var m = Array(256), // internal memory
                  acc = 0,        // accumulator
            Severity: Major
            Found in src/PartKeepr/FrontendBundle/Resources/public/js/Util/Crypto/isaac.js - About 4 hrs to fix

              Function renderCell has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

                  renderCell: function (column, record, recordIndex, rowIndex, columnIndex, out) {
                      var me = this,
                          fullIndex,
                          selModel = me.selectionModel,
                          cellValues = me.cellValues,

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

                  public function __invoke(Request $request, $id)
                  {
                      list($resourceType) = $this->extractAttributes($request);
              
                      /**
              Severity: Minor
              Found in src/PartKeepr/BatchJobBundle/Action/ExecuteBatchJobAction.php - About 4 hrs 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 initComponent has 102 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  initComponent: function ()
                  {
              
                      this.infoGrid = Ext.create("PartKeepr.Components.Part.PartInfoGrid", {
                          mode: 'short',

                File ImporterManyToOneConfiguration.js has 336 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                Ext.define("PartKeepr.Importer.ImporterManyToOneConfiguration", {
                    extend: "Ext.form.Panel",
                    layout: {
                        type: 'vbox',
                        align: 'stretch'

                  PartParameter has 32 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class PartParameter extends BaseEntity
                  {
                      const VALUE_TYPE_STRING = 'string';
                  
                      const VALUE_TYPE_NUMERIC = 'numeric';
                  Severity: Minor
                  Found in src/PartKeepr/PartBundle/Entity/PartParameter.php - About 4 hrs to fix

                    User has 32 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class User extends BaseEntity implements UserInterface, EquatableInterface
                    {
                        /**
                         * @ORM\Column(length=50)
                         * @Groups({"default"})
                    Severity: Minor
                    Found in src/PartKeepr/AuthBundle/Entity/User.php - About 4 hrs to fix

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

                          initComponent: function ()
                          {
                      
                              this.groupingFeature = Ext.create('Ext.grid.feature.Grouping', {
                                  //enableGroupingMenu: false,

                        Function initComponent has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                        Open

                            initComponent: function ()
                            {
                                this.store = Ext.create("Ext.data.Store", {
                                    model: 'PartKeepr.PartBundle.Entity.PartParameter',
                                    proxy: {

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

                            doSearch: function (searchValue) {
                                if (typeof searchValue !== "string") {
                                    return;
                                }
                        
                        

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

                            initComponent: function ()
                            {
                        
                                this.batchJobStore = Ext.create("Ext.data.Store", {
                                    model: 'PartKeepr.BatchJobBundle.Entity.BatchJob',

                          Function defineColumns has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              defineColumns: function ()
                              {
                                  this.columns = [
                                      {
                                          header: '<span class="web-icon fugue-icon paper-clip"></span>',
                            Severity
                            Category
                            Status
                            Source
                            Language