YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method showRelatedList has 142 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function showRelatedList(App\Request $request)
    {
        $moduleName = $request->getModule();
        $relatedModuleName = $request->getByType('relatedModule', 2);
        $parentId = $request->getInteger('record');
Severity: Major
Found in modules/PriceBooks/views/Detail.php - About 5 hrs to fix

    Vtiger_Base_UIType has 42 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Vtiger_Base_UIType extends \App\Base
    {
        /** @var bool Search allowed */
        protected $search = true;
    
    
    Severity: Minor
    Found in modules/Vtiger/uitypes/Base.php - About 5 hrs to fix

      File Record.php has 402 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/Groups/models/Record.php - About 5 hrs to fix

        File Index.js has 401 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';
        
        jQuery.Class(
            'Settings_MailRbl_Index_Js',
        Severity: Minor
        Found in public_html/layouts/basic/modules/Settings/MailRbl/resources/Index.js - About 5 hrs to fix

          File PackageUpdate.php has 400 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/PackageUpdate.php - About 5 hrs to fix

            Function findByDomainField has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
            Open

                public static function findByDomainField(string $moduleName, array $fields, array $emails): array
                {
                    $return = $activeFields = $domainsAndEmails = [];
                    foreach ($emails as $email) {
                        $domainsAndEmails[mb_strtolower(explode('@', $email)[1])][] = $email;
            Severity: Minor
            Found in app/Mail/RecordFinder.php - About 5 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 recalculateSharingRulesByUser has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
            Open

                public static function recalculateSharingRulesByUser($id)
                {
                    $userModel = \App\User::getUserModel($id);
                    if (!$userModel->getId()) {
                        return null;
            Severity: Minor
            Found in app/PrivilegeUtil.php - About 5 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 imapConnect has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
            Open

                public static function imapConnect($user, $password, $host = '', $folder = 'INBOX', $dieOnError = true, $config = [], array $account = [])
                {
                    \App\Log::trace("Entering OSSMail_Record_Model::imapConnect($user , '****' , $folder) method ...");
                    if (!$config) {
                        $config = self::loadRoundcubeConfig();
            Severity: Minor
            Found in modules/OSSMail/models/Record.php - About 5 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 setRelatedParent has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
            Open

                public function setRelatedParent(App\Request $request)
                {
                    $filterFields = $request->getArray('filterFields', 'Text');
                    if (!($relationId = $request->isEmpty('relationId') ? 0 : $request->getInteger('relationId')) && $this->sourceField) {
                        $relationId = \App\Relation::getRelationId($this->moduleName, $this->sourceModule, $this->sourceField);
            Severity: Minor
            Found in modules/Vtiger/views/RecordsList.php - About 5 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 process has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
            Open

                public function process()
                {
                    $db = \App\Db::getInstance();
                    $executed = [];
                    $limit = 1000;
            Severity: Minor
            Found in modules/Vtiger/crons/MultiReference.php - About 5 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

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

            <?php
            /**
             * Request basic class.
             *
             * @package App
            Severity: Minor
            Found in app/Request.php - About 5 hrs to fix

              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

                    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

                        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

                          Function loadJoin has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function loadJoin()
                              {
                                  $tableJoin = [];
                                  $moduleTableIndexList = $this->entityModel->tab_name_index;
                                  $baseTable = $this->entityModel->table_name;
                          Severity: Minor
                          Found in app/QueryGenerator.php - About 5 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 get has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function get(): array
                              {
                                  $limit = 100;
                                  $relationModuleName = $this->controller->request->getByType('param', 'Alnum');
                                  $relationId = false;
                          Severity: Minor
                          Found in api/webservice/WebserviceStandard/BaseModule/RecordRelatedList.php - About 5 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

                          File CustomView.js has 391 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /*+***********************************************************************************
                           * 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
                           * The Initial Developer of the Original Code is vtiger.
                          Severity: Minor
                          Found in public_html/layouts/basic/modules/CustomView/resources/CustomView.js - About 5 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language