YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function process has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

    public function process()
    {
        $html = '';
        if (!$this->textParser->recordModel->getModule()->isInventory()) {
            return $html;
Severity: Minor
Found in app/TextParser/ProductsTableNew.php - 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 process has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

    public function process()
    {
        $html = '';
        if (!$this->textParser->recordModel->getModule()->isInventory()) {
            return $html;
Severity: Minor
Found in app/TextParser/ProductsTableLongVersion.php - 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 process has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

    public function process()
    {
        $html = '';
        if (!$this->textParser->recordModel->getModule()->isInventory()) {
            return $html;
Severity: Minor
Found in app/TextParser/ProductsTableShortVersion.php - 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

CustomView_Record_Model has 60 functions (exceeds 20 allowed). Consider refactoring.
Open

class CustomView_Record_Model extends \App\Base
{
    /** @var bool Is featured */
    protected $isFeatured;
    /** @var bool Is default */
Severity: Major
Found in modules/CustomView/models/Record.php - About 1 day to fix

    Vtiger_Relation_Model has 60 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Vtiger_Relation_Model extends \App\Base
    {
        /**
         *  Cached instances.
         *
    Severity: Major
    Found in modules/Vtiger/models/Relation.php - About 1 day to fix

      File Language.php has 526 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      namespace App;
      
      /**
      Severity: Major
      Found in app/Language.php - About 1 day to fix

        Function maximumFieldsLength has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
        Open

            public static function maximumFieldsLength(array $conditions = []): array
            {
                $typesNotSupported = ['datetime', 'date', 'year', 'timestamp', 'time'];
                $uiTypeNotSupported = [30];
                $updated = $requiresVerification = $typeNotFound = $notSupported = 0;
        Severity: Minor
        Found in app/Db/Fixer.php - 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 get has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
        Open

            public function get(): array
            {
                $pagingModel = new \Vtiger_Paging_Model();
                $limit = 100;
                $isMorePages = false;
        Severity: Minor
        Found in api/webservice/WebserviceStandard/BaseModule/RecordHistory.php - 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

        Method getTypeDetailsForAddField has 214 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getTypeDetailsForAddField($fieldType, $params)
            {
                $displayType = 1;
                $importerType = new \App\Db\Importers\Base();
                switch ($fieldType) {
        Severity: Major
        Found in modules/Settings/LayoutEditor/models/Module.php - About 1 day to fix

          File Index.js has 519 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */
          'use strict';
          
          Settings_Vtiger_Index_Js(
              'Settings_Colors_Index_Js',
          Severity: Major
          Found in public_html/layouts/basic/modules/Settings/Colors/resources/Index.js - About 1 day to fix

            Function relatedRecord has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
            Open

                protected function relatedRecord($params)
                {
                    $params = explode('|', $params);
                    $fieldName = array_shift($params);
                    $relatedField = array_shift($params);
            Severity: Minor
            Found in app/TextParser.php - 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 getRecordRelatedListViewLinksLeftSide has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getRecordRelatedListViewLinksLeftSide(Vtiger_RelationListView_Model $viewModel)
                {
                    $links = [];
                    if (!$this->isViewable()) {
                        return [];
            Severity: Minor
            Found in modules/Vtiger/models/Record.php - 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

            File Item.php has 515 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * Picklist value item.
             *
             * @package App
            Severity: Major
            Found in app/Fields/Picklist/Item.php - About 1 day to fix

              File logs.js has 513 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              (function ($) {
                  var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-');
              
                  /**
                   * Replaces spaces with &nbsp; and line breaks with <br>
              Severity: Major
              Found in public_html/layouts/resources/debugbar/logs.js - About 1 day to fix

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

                    public function save(App\Request $request): void
                    {
                        $fieldId = $request->getInteger('fieldid');
                        if (empty($fieldId)) {
                            throw new \App\Exceptions\AppException('Empty field ID: ' . $fieldId);
                Severity: Minor
                Found in modules/Settings/LayoutEditor/actions/Field.php - 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 getStructure has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function getStructure()
                    {
                        if (!empty($this->structuredValues)) {
                            return $this->structuredValues;
                        }
                Severity: Minor
                Found in modules/Settings/Workflows/models/FilterRecordStructure.php - 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

                File dialog.js has 510 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */
                'use strict';
                
                CKEDITOR.dialog.add('base64image-dialog', function (editor) {
                    let self = null,

                  File Inventory.php has 510 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  /**
                   * Basic Inventory Model Class.
                   *
                  Severity: Major
                  Found in modules/Vtiger/models/Inventory.php - About 1 day to fix

                    ConfReport has 57 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class ConfReport
                    {
                        /** @var string System URL. */
                        private static $crmUrl;
                    
                    
                    Severity: Major
                    Found in app/Utils/ConfReport.php - About 1 day to fix

                      Method getFieldDataType has 204 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getFieldDataType()
                          {
                              if (!isset($this->fieldDataType)) {
                                  $uiType = $this->getUIType();
                                  if (55 === $uiType) {
                      Severity: Major
                      Found in modules/Vtiger/models/Field.php - About 1 day to fix
                        Severity
                        Category
                        Status
                        Source
                        Language