YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function createUpdatedBlockFieldsList has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        createUpdatedBlockFieldsList: function () {
            const thisInstance = this;
            const contents = $('#quickCreateEditorContainer').find('.contents');
            const updatedBlock = contents.find('.block');
            if (app.getMainParams('quickCreateLayout') === 'blocks') {

    Function addRelatedRecord has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            addRelatedRecord: function (element, callback) {
                let aDeferred = jQuery.Deferred();
                let referenceModuleName = this.moduleName;
                let parentId = this.getParentId();
                let parentModule = this.parentModuleName;
    Severity: Major
    Found in public_html/layouts/basic/modules/Vtiger/resources/RelatedList.js - About 2 hrs to fix

      Function showFiltersModal has 72 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          showFiltersModal() {
              const self = this;
              app.showModalHtml({
                  headerIcon: 'fas fa-filter',
                  header: app.vtranslate('JS_FILTER_BY_STATUSES'),
      Severity: Major
      Found in public_html/layouts/basic/modules/Project/resources/Gantt.js - About 2 hrs to fix

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

            public function process(): void
            {
                \App\Utils\ConfReport::saveEnv();
                $this->status = 1;
                $errorsText = '<br>';
        Severity: Major
        Found in app/SystemWarnings/SystemRequirements/Configuration.php - About 2 hrs to fix

          Method getSearchLabelQuery has 72 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getSearchLabelQuery(): Db\Query
              {
                  $query = (new Db\Query())->select(['csl.crmid', 'setype' => 'vtiger_tab.name', 'csl.searchlabel'])
                      ->from('u_#__crmentity_search_label csl')
                      ->innerJoin('vtiger_tab', 'csl.tabid = vtiger_tab.tabid')
          Severity: Major
          Found in app/RecordSearch.php - About 2 hrs to fix

            Method getFieldInstanceByName has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getFieldInstanceByName($name)
                {
                    $moduleName = $this->getModule()->getName(true);
                    $fieldsLabel = $this->getEditFields();
                    $params = ['uitype' => 1, 'column' => $name, 'name' => $name, 'label' => $fieldsLabel[$name], 'displaytype' => 1, 'typeofdata' => 'V~M', 'presence' => 0, 'isEditableReadOnly' => false];
            Severity: Major
            Found in modules/Settings/WebserviceUsers/services/WebservicePremium.php - About 2 hrs to fix

              Method getCRMConversionRate has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getCRMConversionRate($from, $to, $date = '')
                  {
                      $mainCurrencyCode = \App\Fields\Currency::getDefault()['currency_code'];
                      $activeBankId = self::getActiveBankId();
                      $exchange = false;
              Severity: Major
              Found in modules/Settings/CurrencyUpdate/models/Module.php - About 2 hrs to fix

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

                    public function doTask($recordModel)
                    {
                        if (!\App\Module::isModuleActive('Calendar')) {
                            return;
                        }
                Severity: Major
                Found in modules/com_vtiger_workflow/tasks/VTCreateEventTask.php - About 2 hrs to fix

                  Method getCalendarActivities has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getCalendarActivities($mode, Vtiger_Paging_Model $pagingModel, $user, $recordId = false, $paramsMore = [])
                      {
                          $activities = [];
                          $query = new \App\Db\Query();
                          if (!$user) {
                  Severity: Major
                  Found in modules/Home/models/Module.php - About 2 hrs to fix

                    File InterestsConflict.php has 286 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    /**
                     * Conflict of interest component file.
                     *
                    Severity: Minor
                    Found in app/Components/InterestsConflict.php - About 2 hrs to fix

                      File Module.php has 286 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      
                      /**
                       * @copyright YetiForce S.A.
                       * @license   YetiForce Public License 6.5 (licenses/LicenseEN.txt or yetiforce.com)
                      Severity: Minor
                      Found in modules/OSSMail/models/Module.php - About 2 hrs to fix

                        Function getValues has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                getValues(tasktype) {
                                    let fieldListFunctionName = 'get' + tasktype + 'FieldList',
                                        fieldList = [];
                                    if (typeof this[fieldListFunctionName] !== 'undefined') {
                                        fieldList = this[fieldListFunctionName].apply();

                          Function getRecordsListParams has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  getRecordsListParams: function (container) {
                                      let formElement = container.closest('form');
                                      let sourceModule = $('input[name="module"]', formElement).val();
                                      let popupReferenceModule = $('input[name="popupReferenceModule"]', container).val();
                                      let sourceFieldElement = $('input[class="sourceField"]', container);
                          Severity: Major
                          Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 2 hrs to fix

                            Method appendDouble has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function appendDouble(&$combinations)
                                {
                                    $int = '123456789';
                                    $fieldData = (new \App\Db\Query())->from('vtiger_field')->where(['uitype' => 7, 'typeofdata' => 'NN~O'])->one();
                                    foreach ($this->getCombinations() as $combination) {
                            Severity: Major
                            Found in tests/Base/Z_StringFormatting.php - About 2 hrs to fix

                              Method resetPassword has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function resetPassword(): void
                                  {
                                      $this->climate->arguments->add([
                                          'login' => [
                                              'prefix' => 'l',
                              Severity: Major
                              Found in app/Cli/Users.php - About 2 hrs to fix

                                Method __construct has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function __construct()
                                    {
                                        $this->exec = \function_exists('exec');
                                        $this->climate = new \League\CLImate\CLImate();
                                        if (!$this->exec) {
                                Severity: Major
                                Found in app/Cli.php - About 2 hrs to fix

                                  Method isReadPermittedBySharing has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public static function isReadPermittedBySharing($moduleName, $tabId, $actionId, $recordId, $userId)
                                      {
                                          \App\Log::trace("Entering isReadPermittedBySharing($moduleName,$tabId,$actionId,$recordId,$userId) method ...");
                                          $sharingPrivileges = \App\User::getSharingFile($userId);
                                  
                                  
                                  Severity: Major
                                  Found in app/Privilege.php - About 2 hrs to fix

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

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

                                      File Record.php has 285 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/Workflows/models/Record.php - About 2 hrs to fix

                                        Method getDefaultValidator has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function getDefaultValidator(): array
                                            {
                                                $validator = [];
                                                $fieldName = $this->getName();
                                                switch ($fieldName) {
                                        Severity: Major
                                        Found in modules/Vtiger/models/Field.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language