YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method preProcess has 84 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function preProcess(App\Request $request, $display = true)
    {
        parent::preProcess($request, false);

        $moduleName = $request->getModule();
Severity: Major
Found in modules/Vtiger/views/Detail.php - About 3 hrs to fix

    `` has 28 functions (exceeds 20 allowed). Consider refactoring.
    Open

        {
            menuContainer: false,
            contentContainer: false,
            init: function () {
                this.setContentsContainer('.js-base-container');
    Severity: Minor
    Found in public_html/layouts/basic/modules/Vtiger/resources/Header.js - About 3 hrs to fix

      `` has 28 functions (exceeds 20 allowed). Consider refactoring.
      Open

          {
              filterContainer: false,
              //Hold the conditions for a particular field type
              fieldTypeConditionMapping: false,
              //Hold the condition and their label translations
      Severity: Minor
      Found in public_html/layouts/basic/modules/Vtiger/resources/AdvanceFilter.js - About 3 hrs to fix

        ModuleBasic has 28 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class ModuleBasic
        {
            /** ID of this instance */
            public $id = false;
            public $name = false;
        Severity: Minor
        Found in vtlib/Vtiger/ModuleBasic.php - About 3 hrs to fix

          Method export has 83 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function export(Module $moduleInstance, $todir = '', $zipFileName = '', $directDownload = false)
              {
                  $this->zipFileName = $zipFileName;
                  $this->moduleInstance = $moduleInstance;
                  $module = $this->moduleInstance->name;
          Severity: Major
          Found in vtlib/Vtiger/PackageExport.php - About 3 hrs to fix

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

                public function process()
                {
                    $html = '';
                    if (!$this->textParser->recordModel->getModule()->isInventory()) {
                        return $html;
            Severity: Major
            Found in app/TextParser/ProductsTableLongVTwoLang.php - About 3 hrs to fix

              Method sendByRowQueue has 83 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function sendByRowQueue($rowQueue)
                  {
                      if ('demo' === \App\Config::main('systemMode')) {
                          return true;
                      }
              Severity: Major
              Found in app/Mailer.php - About 3 hrs to fix

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

                    public function process()
                    {
                        \App\Log::trace('Start create AddressBook');
                
                        $limit = App\Config::performance('CRON_MAX_NUMBERS_RECORD_ADDRESS_BOOK_UPDATER');
                Severity: Major
                Found in modules/Vtiger/crons/AddressBook.php - About 3 hrs to fix

                  Method get has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function get(): array
                      {
                          $limit = 100;
                          $relationModuleName = $this->controller->request->getByType('param', 'Alnum');
                          $relationId = false;
                  Severity: Major
                  Found in api/webservice/WebserviceStandard/BaseModule/RecordRelatedList.php - About 3 hrs to fix

                    File PickListHandler.php has 304 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    class Settings_Picklist_PickListHandler_Handler
                    {
                        /**
                    Severity: Minor
                    Found in modules/Settings/Picklist/handlers/PickListHandler.php - About 3 hrs to fix

                      Function registerListEvents has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              registerListEvents: function () {
                                  let thisInstance = this;
                                  this.content.find('a.favorites').on('click', function () {
                                      let progressInstance = jQuery.progressIndicator({
                                          position: 'html',
                      Severity: Major
                      Found in public_html/layouts/basic/modules/Vtiger/resources/RelatedList.js - About 3 hrs to fix

                        Method recordsList has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            protected function recordsList($params)
                            {
                                [$moduleName, $columns, $conditions, $viewIdOrName, $limit, $maxLength, $params] = array_pad(explode('|', $params, 7), 7, '');
                                $paramsArray = $params ? self::parseFieldParam($params) : [];
                                $cvId = 0;
                        Severity: Major
                        Found in app/TextParser.php - About 3 hrs to fix

                          Method searchCodeInjection has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function searchCodeInjection(): bool
                              {
                                  if (!\function_exists('token_get_all')) {
                                      return true;
                                  }
                          Severity: Major
                          Found in app/Fields/File.php - About 3 hrs to fix

                            Method save has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function save(App\Request $request)
                                {
                                    $workflowId = !$request->isEmpty('for_workflow') ? $request->getInteger('for_workflow') : 0;
                                    if (!empty($workflowId)) {
                                        $record = !$request->isEmpty('task_id') ? $request->getInteger('task_id') : 0;
                            Severity: Major
                            Found in modules/Settings/Workflows/actions/TaskAjax.php - About 3 hrs to fix

                              Method getValueFromImport has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getValueFromImport($value, $defaultValue = null)
                                  {
                                      if (empty($value)) {
                                          return '';
                                      }
                              Severity: Major
                              Found in modules/Vtiger/uitypes/Reference.php - About 3 hrs to fix

                                Function getUi has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        getUi: function () {
                                            let comparatorSelectedOptionVal = this.get('comparatorElementVal'),
                                                dateSpecificConditions = this.get('dateSpecificConditions'),
                                                html = '';
                                            if (comparatorSelectedOptionVal === 'bw' || comparatorSelectedOptionVal === 'custom') {
                                Severity: Minor
                                Found in public_html/layouts/basic/modules/Vtiger/resources/AdvanceFilter.js - About 3 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 export has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function export(Module $moduleInstance, $todir = '', $zipFileName = '', $directDownload = false)
                                    {
                                        $this->zipFileName = $zipFileName;
                                        $this->moduleInstance = $moduleInstance;
                                        $module = $this->moduleInstance->name;
                                Severity: Minor
                                Found in vtlib/Vtiger/PackageExport.php - About 3 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 getAllModules has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                                    {
                                        if (\App\Cache::has('moduleTabs', 'all')) {
                                            $moduleList = \App\Cache::get('moduleTabs', 'all');
                                        } else {
                                Severity: Minor
                                Found in vtlib/Vtiger/Functions.php - About 3 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 loadLanguageFile has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public static function loadLanguageFile($language, $moduleName = '_Base')
                                    {
                                        if (!isset(static::$languageContainer[$language][$moduleName])) {
                                            if (Cache::has('LanguageFiles', $language . $moduleName)) {
                                                static::$languageContainer[$language][$moduleName] = Cache::get('LanguageFiles', $language . $moduleName);
                                Severity: Minor
                                Found in app/Language.php - About 3 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 install has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public static function install(\Composer\Script\Event $event): void
                                    {
                                        $rootDir = realpath(__DIR__ . '/../../');
                                        if (!\defined('ROOT_DIRECTORY')) {
                                            \define('ROOT_DIRECTORY', $rootDir);
                                Severity: Minor
                                Found in app/Installer/Composer.php - About 3 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

                                Severity
                                Category
                                Status
                                Source
                                Language