YetiForceCompany/YetiForceCRM

View on GitHub

Showing 306,333 of 306,333 total issues

File UserPrivilegesFile.php has 399 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace App;

/**
Severity: Minor
Found in app/UserPrivilegesFile.php - About 5 hrs to fix

    File ModuleBasic.php has 396 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /* +**********************************************************************************
     * The contents of this file are subject to the vtiger CRM Public License Version 1.0
     * ("License"); You may not use this file except in compliance with the License
     * The Original Code is:  vtiger CRM Open Source
    Severity: Minor
    Found in vtlib/Vtiger/ModuleBasic.php - About 5 hrs to fix

      Vtiger_Basic_InventoryField has 41 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Vtiger_Basic_InventoryField extends \App\Base
      {
          /**
           * Field visible everywhere.
           */
      Severity: Minor
      Found in modules/Vtiger/inventoryfields/Basic.php - About 5 hrs to fix

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

                        App.Fields.Picklist.showSelect2ElementView(filterSelectElement, {
                            templateSelection: function (data) {
                                const resultContainer = document.createElement('span'),
                                    span = document.createElement('span'),
                                    image = $('.filterImage').detach();
        public_html/layouts/basic/modules/Project/resources/GanttController.js on lines 113..126

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

        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

                        App.Fields.Picklist.showSelect2ElementView(filterSelectElement, {
                            templateSelection: function (data) {
                                const resultContainer = document.createElement('span'),
                                    span = document.createElement('span'),
                                    image = $('.filterImage').clone();
        public_html/layouts/basic/modules/Vtiger/resources/RecordsList.js on lines 313..326

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

        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

        File Record.php has 395 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /* +***********************************************************************************
         * The contents of this file are subject to the vtiger CRM Public License Version 1.0
         * ("License"); You may not use this file except in compliance with the License
         * The Original Code is:  vtiger CRM Open Source
        Severity: Minor
        Found in modules/Settings/Roles/models/Record.php - About 5 hrs to fix

          Method process has 137 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function process(App\Request $request)
              {
                  $viewer = $this->getViewer($request);
                  $moduleName = $request->getModule();
                  $qualifiedModuleName = $request->getModule(false);
          Severity: Major
          Found in modules/Settings/Workflows/views/EditTask.php - About 5 hrs to fix

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

            <?php
            
            /**
             * Class to show hierarchy.
             *
            Severity: Major
            Found in modules/Partners/views/Hierarchy.php and 4 other locations - About 5 hrs to fix
            modules/Competition/views/Hierarchy.php on lines 1..37
            modules/Contacts/views/Hierarchy.php on lines 1..36
            modules/IStorages/views/Hierarchy.php on lines 1..38
            modules/Project/views/Hierarchy.php on lines 1..40

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

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

            <?php
            
            /**
             * Class to show hierarchy.
             *
            Severity: Major
            Found in modules/Competition/views/Hierarchy.php and 4 other locations - About 5 hrs to fix
            modules/Contacts/views/Hierarchy.php on lines 1..36
            modules/IStorages/views/Hierarchy.php on lines 1..38
            modules/Partners/views/Hierarchy.php on lines 1..37
            modules/Project/views/Hierarchy.php on lines 1..40

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

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

            <?php
            
            /**
             * Class to show hierarchy.
             *
            Severity: Major
            Found in modules/IStorages/views/Hierarchy.php and 4 other locations - About 5 hrs to fix
            modules/Competition/views/Hierarchy.php on lines 1..37
            modules/Contacts/views/Hierarchy.php on lines 1..36
            modules/Partners/views/Hierarchy.php on lines 1..37
            modules/Project/views/Hierarchy.php on lines 1..40

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

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

            <?php
            
            /**
             * Class to show hierarchy.
             *
            Severity: Major
            Found in modules/Contacts/views/Hierarchy.php and 4 other locations - About 5 hrs to fix
            modules/Competition/views/Hierarchy.php on lines 1..37
            modules/IStorages/views/Hierarchy.php on lines 1..38
            modules/Partners/views/Hierarchy.php on lines 1..37
            modules/Project/views/Hierarchy.php on lines 1..40

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

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

                public function getSearchCriteria(int $pageSize = 10): string
                {
                    $searchCriteria = [];
                    $searchCriteria[] = 'searchCriteria[filter_groups][0][filters][0][field]=entity_id';
                    $searchCriteria[] = 'searchCriteria[filter_groups][0][filters][0][value]=' . $this->lastScan['id'];
            Severity: Major
            Found in app/Integrations/Magento/Synchronizer/Category.php and 2 other locations - About 5 hrs to fix
            app/Integrations/Magento/Synchronizer/Product.php on lines 82..99
            app/Integrations/Magento/Synchronizer/Record.php on lines 60..77

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

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

                public function getSearchCriteria(int $pageSize = 10): string
                {
                    $searchCriteria = [];
                    $searchCriteria[] = 'searchCriteria[filter_groups][0][filters][0][field]=entity_id';
                    $searchCriteria[] = 'searchCriteria[filter_groups][0][filters][0][value]=' . $this->lastScan['id'];
            Severity: Major
            Found in app/Integrations/Magento/Synchronizer/Product.php and 2 other locations - About 5 hrs to fix
            app/Integrations/Magento/Synchronizer/Category.php on lines 164..181
            app/Integrations/Magento/Synchronizer/Record.php on lines 60..77

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

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

            <?php
            
            /**
             * Class to show hierarchy.
             *
            Severity: Major
            Found in modules/Project/views/Hierarchy.php and 4 other locations - About 5 hrs to fix
            modules/Competition/views/Hierarchy.php on lines 1..37
            modules/Contacts/views/Hierarchy.php on lines 1..36
            modules/IStorages/views/Hierarchy.php on lines 1..38
            modules/Partners/views/Hierarchy.php on lines 1..37

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

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

                public function getSearchCriteria(int $pageSize = 10): string
                {
                    $searchCriteria = [];
                    $searchCriteria[] = 'searchCriteria[filter_groups][0][filters][0][field]=entity_id';
                    $searchCriteria[] = 'searchCriteria[filter_groups][0][filters][0][value]=' . $this->lastScan['id'];
            Severity: Major
            Found in app/Integrations/Magento/Synchronizer/Record.php and 2 other locations - About 5 hrs to fix
            app/Integrations/Magento/Synchronizer/Category.php on lines 164..181
            app/Integrations/Magento/Synchronizer/Product.php on lines 82..99

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

            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
            /* +**********************************************************************************
             * The contents of this file are subject to the vtiger CRM Public License Version 1.0
             * ("License"); You may not use this file except in compliance with the License
             * The Original Code is:  vtiger CRM Open Source
            Severity: Major
            Found in modules/FInvoiceProforma/FInvoiceProforma.php and 1 other location - About 5 hrs to fix
            modules/SVendorEnquiries/SVendorEnquiries.php on lines 1..65

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

            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
            /**
             * SVendorEnquiries CRMEntity Class.
             *
             * @copyright YetiForce S.A.
            Severity: Major
            Found in modules/SVendorEnquiries/SVendorEnquiries.php and 1 other location - About 5 hrs to fix
            modules/FInvoiceProforma/FInvoiceProforma.php on lines 1..68

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

            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

            File Mail.php has 394 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * Mail Scanner bind email action.
             *
             * @package Model
            Severity: Minor
            Found in modules/OSSMail/models/Mail.php - About 5 hrs to fix

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

                              case 'M':
                                  if (
                                      prefix.indexOf('{{MM}}') === -1 &&
                                      prefix.indexOf('{{M}}') === -1 &&
                                      postfix.indexOf('{{MM}}') === -1 &&
              public_html/layouts/basic/modules/Settings/RecordNumbering/resources/Index.js on lines 185..201
              public_html/layouts/basic/modules/Settings/RecordNumbering/resources/Index.js on lines 219..235

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

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

                              case 'D':
                                  if (
                                      prefix.indexOf('{{DD}}') === -1 &&
                                      prefix.indexOf('{{D}}') === -1 &&
                                      postfix.indexOf('{{DD}}') === -1 &&
              public_html/layouts/basic/modules/Settings/RecordNumbering/resources/Index.js on lines 185..201
              public_html/layouts/basic/modules/Settings/RecordNumbering/resources/Index.js on lines 202..218

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

              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