YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

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

    public function save()
    {
        $db = \App\Db::getInstance();
        $settingsModel = Settings_Menu_Module_Model::getInstance();
        $edit = $this->get('edit');
Severity: Major
Found in modules/Settings/Menu/models/Record.php - About 2 hrs to fix

    Method add has 64 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function add()
        {
            $contactId = (int) $this->mail->findEmailAddress('from_email', 'Contacts', false);
            $parentId = (int) $this->mail->findEmailAddress('from_email', 'Accounts', false);
            $record = Vtiger_Record_Model::getCleanInstance('HelpDesk');
    Severity: Major
    Found in modules/OSSMailScanner/scanneractions/CreatedHelpDesk.php - About 2 hrs to fix

      Method getAdvancedLinks has 64 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getAdvancedLinks()
          {
              $moduleModel = $this->getModule();
              $advancedLinks = [];
      
      
      Severity: Major
      Found in modules/Vtiger/models/ListView.php - About 2 hrs to fix

        Method getGanttMilestones has 64 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getGanttMilestones($projectIds)
            {
                $queryGenerator = new App\QueryGenerator('ProjectMilestone');
                $queryGenerator->setFields(['id', 'parentid', 'projectid', 'projectmilestonename', 'projectmilestonedate', 'projectmilestone_no', 'projectmilestone_progress', 'projectmilestone_priority', 'sum_time', 'estimated_work_time', 'projectmilestone_status', 'assigned_user_id']);
                $queryGenerator->addNativeCondition(['vtiger_projectmilestone.projectid' => $projectIds]);
        Severity: Major
        Found in modules/Project/models/Gantt.php - About 2 hrs to fix

          File Basic.php has 273 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          /**
           * Inventory Basic Field Class.
           *
          Severity: Minor
          Found in modules/Vtiger/inventoryfields/Basic.php - About 2 hrs to fix

            Function registerSubmitForm has 63 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    registerSubmitForm: function (container) {
                        const aDeferred = $.Deferred();
                        let instanse = this;
                        container.on('click', '.js-modal__save', () => {
                            let params = {

              Method parseConditions has 63 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function parseConditions(?array $conditions, \App\QueryGenerator $queryGenerator, string $html = '', bool $show = false): string
                  {
                      if (empty($conditions)) {
                          return '';
                      }
              Severity: Major
              Found in app/TextParser/RecordsList.php - About 2 hrs to fix

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

                    public function process(): string
                    {
                        $html = '';
                        $moduleName = $this->params[0];
                        if (!empty($textParserParams = $this->textParser->getParam('textParserParams')) && isset($textParserParams['userId'])
                Severity: Major
                Found in app/TextParser/UserRecordsDuplicateList.php - About 2 hrs to fix

                  Method delete has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function delete()
                      {
                          $db = \App\Db::getInstance();
                          try {
                              parent::delete();
                  Severity: Major
                  Found in modules/Settings/LayoutEditor/models/Field.php - About 2 hrs to fix

                    Method getStructure has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getStructure()
                        {
                            if (!empty($this->structuredValues)) {
                                return $this->structuredValues;
                            }
                    Severity: Major
                    Found in modules/Settings/Workflows/models/FilterRecordStructure.php - About 2 hrs to fix

                      Method doTask has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function doTask($recordModel)
                          {
                              if (!empty($this->template)) {
                                  $mailerContent = [];
                                  if (!empty($this->smtp)) {
                      Severity: Major
                      Found in modules/com_vtiger_workflow/tasks/VTEmailTemplateTask.php - About 2 hrs to fix

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

                            public function process()
                            {
                                $moduleModel = Vtiger_Module_Model::getInstance($this->textParser->moduleName);
                                $fields = $moduleModel->getFields();
                                $ids = $this->textParser->getParam('pdf')->getVariable('recordsId');
                        Severity: Major
                        Found in modules/OSSTimeControl/textparsers/DetailedList.php - About 2 hrs to fix

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

                              public function process(App\Request $request)
                              {
                                  $moduleName = $request->getModule();
                                  $this->recordModel = Vtiger_Record_Model::getCleanInstance($moduleName);
                                  $moduleModel = $this->recordModel->getModule();
                          Severity: Major
                          Found in modules/Vtiger/views/QuickCreateAjax.php - About 2 hrs to fix

                            File Cache.php has 271 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 include/runtime/Cache.php - About 2 hrs to fix

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

                                  {
                                      init() {
                                          Calendar_Edit_Js.currencyInstance = this;
                                      },
                                      registerReminderFieldCheckBox: function () {
                              Severity: Minor
                              Found in public_html/layouts/basic/modules/Calendar/resources/Edit.js - About 2 hrs to fix

                                Watchdog has 23 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class Watchdog
                                {
                                    /**
                                     * Allowed flags array.
                                     *
                                Severity: Minor
                                Found in app/YetiForce/Watchdog.php - About 2 hrs to fix

                                  Item has 23 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class Item extends \App\Base
                                  {
                                      /** @var int Item ID */
                                      protected $id;
                                      /** @var string Item name */
                                  Severity: Minor
                                  Found in app/Fields/Picklist/Item.php - About 2 hrs to fix

                                    Mailer has 23 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class Mailer
                                    {
                                        /** @var string[] Queue status */
                                        public static $statuses = [
                                            0 => 'LBL_PENDING_ACCEPTANCE',
                                    Severity: Minor
                                    Found in app/Mailer.php - About 2 hrs to fix

                                      Settings_MappedFields_Module_Model has 23 functions (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      class Settings_MappedFields_Module_Model extends Settings_Vtiger_Module_Model
                                      {
                                          protected $record = false;
                                          public $baseTable = 'a_yf_mapped_config';
                                          public $mappingTable = 'a_yf_mapped_fields';
                                      Severity: Minor
                                      Found in modules/Settings/MappedFields/models/Module.php - About 2 hrs to fix

                                        Settings_SMSNotifier_Record_Model has 23 functions (exceeds 20 allowed). Consider refactoring.
                                        Open

                                        class Settings_SMSNotifier_Record_Model extends Settings_Vtiger_Record_Model
                                        {
                                            /** @var array Record changes */
                                            protected $changes = [];
                                        
                                        
                                        Severity: Minor
                                        Found in modules/Settings/SMSNotifier/models/Record.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language