partkeepr/PartKeepr

View on GitHub

Showing 922 of 922 total issues

Method parseConfiguration has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function parseConfiguration($importConfiguration)
    {
        if (!property_exists($importConfiguration, "importBehaviour")) {
            return false;

Severity: Major
Found in src/PartKeepr/ImportBundle/Configuration/ManyToOneConfiguration.php - About 2 hrs to fix

    Method __invoke has 57 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function __invoke(Request $request, $id)
        {
            list($resourceType) = $this->extractAttributes($request);
    
            /**
    Severity: Major
    Found in src/PartKeepr/BatchJobBundle/Action/ExecuteBatchJobAction.php - About 2 hrs to fix

      Method registerBundles has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function registerBundles()
          {
              // Base 3rd party bundles required for PartKeepr operation
              $bundles = [
                  new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
      Severity: Major
      Found in app/AppKernel.php - About 2 hrs to fix

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

        <?php
        
        namespace PartKeepr\FrontendBundle\Action;
        
        use Dunglas\ApiBundle\Action\ActionUtilTrait;
        Severity: Major
        Found in src/PartKeepr/FrontendBundle/Action/MarkAsDefaultAction.php and 1 other location - About 2 hrs to fix
        src/PartKeepr/PartBundle/Action/SetDefaultUnitAction.php on lines 1..55

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

        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

        <?php
        
        namespace PartKeepr\PartBundle\Action;
        
        use Dunglas\ApiBundle\Action\ActionUtilTrait;
        Severity: Major
        Found in src/PartKeepr/PartBundle/Action/SetDefaultUnitAction.php and 1 other location - About 2 hrs to fix
        src/PartKeepr/FrontendBundle/Action/MarkAsDefaultAction.php on lines 1..57

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

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

            initComponent: function ()
            {
                /**
                 * Due to an ExtJS issue, we need to delay the event
                 * for a bit.

          Function createFormConfig has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              createFormConfig: function (renderer)
              {
                  var configIterator, config, field, fields = [], useDescriptionElemement;
          
                  for (configIterator in renderer.rendererConfigs)

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

                renderer: function (value)
                {
                    var values = value.split("/");
                    var idstr = values[values.length - 1];
                    var idint = parseInt(idstr);
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js on lines 208..215
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartInfoGrid.js on lines 47..53

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

            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 3 locations. Consider refactoring.
            Open

                                    renderer: function (value)
                                    {
                                        var values = value.split("/");
                                        var idstr = values[values.length - 1];
                                        var idint = parseInt(idstr);
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Grid/Renderers/InternalIDRenderer.js on lines 6..13
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartInfoGrid.js on lines 47..53

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

            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 3 locations. Consider refactoring.
            Open

                        renderer: function (value)
                        {
                            var values = value.split("/");
                            var idstr = values[values.length - 1];
                            var idint = parseInt(idstr);
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Grid/Renderers/InternalIDRenderer.js on lines 6..13
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js on lines 208..215

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

            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 (selection.length === 0) {
                        category = this.getTree().getRootNode().firstChild.getId();
                    } else {
                        var item = selection.shift();
                        category = item.getId();
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/StorageLocation/StorageLocationNavigation.js on lines 132..137

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

            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

                    init: function (words, sigBytes) {
                        words = this.words = words || [];
            
                        if (sigBytes != undefined) {
                            this.sigBytes = sigBytes;
            src/PartKeepr/FrontendBundle/Resources/public/js/Util/Crypto/x64-core.js on lines 225..233

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

            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 (selection.length === 0) {
                        category = this.getTree().getRootNode().firstChild.getId();
                    } else {
                        var item = selection.shift();
                        category = item.getId();
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/StorageLocation/StorageLocationNavigation.js on lines 150..155

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

            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

                    init: function (words, sigBytes) {
                        words = this.words = words || [];
            
                        if (sigBytes != undefined) {
                            this.sigBytes = sigBytes;
            src/PartKeepr/FrontendBundle/Resources/public/js/Util/Crypto/core.js on lines 158..166

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

            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

            UploadedFile has 21 functions (exceeds 20 allowed). Consider refactoring.
            Open

            abstract class UploadedFile extends BaseEntity
            {
                /**
                 * Specifies the type of the file.
                 *
            Severity: Minor
            Found in src/PartKeepr/UploadedFileBundle/Entity/UploadedFile.php - About 2 hrs to fix

              Function createPicker has 53 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  createPicker: function ()
                  {
                      this.partsGrid = Ext.create("PartKeepr.PartsGrid", {
                          enableTopToolbar: true,
                          enableEditing: false,

                File BatchJobEditor.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                Ext.define('PartKeepr.BatchJobEditor', {
                    extend: 'PartKeepr.Editor',
                    alias: 'widget.BatchJobEditor',
                
                    defaults: {

                  Method testUploadAction has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function testUploadAction()
                      {
                          $client = static::makeClient(true);
                  
                          $file = __DIR__.'/Fixtures/files/uploadtest.png';

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

                        for (i = 0; i < plen; i += 2) {
                            this.encipher(lr, 0);
                            this.P[i] = lr[0];
                            this.P[i + 1] = lr[1];
                        }
                    src/PartKeepr/FrontendBundle/Resources/public/js/Util/Crypto/bcrypt.js on lines 384..388

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

                    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

                        for (i = 0; i < slen; i += 2) {
                            this.encipher(lr, 0);
                            this.S[i] = lr[0];
                            this.S[i + 1] = lr[1];
                        }
                    src/PartKeepr/FrontendBundle/Resources/public/js/Util/Crypto/bcrypt.js on lines 378..382

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

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language