YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function onSubmit has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        onSubmit(ev) {
            ev.preventDefault();
            ev.stopPropagation();
            this.container.validationEngine(app.validationEngineOptions);
            const policyType = Number(this.container.find('[name="policy_type"]:checked').val());

    Function registerSwitchEvents has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        registerSwitchEvents() {
            let isWorkDays,
                switchShowTypeVal,
                switchContainer = $('.js-calendar__tab--filters'),
                switchShowType = switchContainer.find('.js-switch--showType'),
    Severity: Major
    Found in public_html/layouts/basic/modules/Vtiger/resources/CalendarView.js - About 2 hrs to fix

      Method testModuleModel has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function testModuleModel()
          {
              $moduleModel = \Settings_CustomView_Module_Model::getInstance('Settings:CustomView');
              $cvsData = \App\CustomView::getFiltersByModule('Leads');
              $this->assertIsArray($cvsData, 'Custom views list should be array type');
      Severity: Major
      Found in tests/Settings/CustomView.php - About 2 hrs to fix

        Method hardDrive has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private static function hardDrive(): array
            {
                $countGroup = 50;
                $maxTime = 0.2;
                $read = $write = [];
        Severity: Major
        Found in app/Utils/Benchmarks.php - About 2 hrs to fix

          Method getDenormalizedData has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getDenormalizedData($calendarData)
              {
                  $vObject = VObject\Reader::read($calendarData);
                  $uid = $lastOccurence = $firstOccurence = $component = $componentType = null;
                  foreach ($vObject->getComponents() as $component) {
          Severity: Major
          Found in app/Integrations/Dav/Calendar.php - About 2 hrs to fix

            Method showFieldLayout has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function showFieldLayout(App\Request $request)
                {
                    $qualifiedModule = $request->getModule(false);
                    $activeTab = 'detailViewLayout';
                    if ($request->has('tab')) {
            Severity: Major
            Found in modules/Settings/LayoutEditor/views/Index.php - About 2 hrs to fix

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

                  public function getFieldInstanceByName($name)
                  {
                      $moduleName = $this->getModule()->getName(true);
                      $fields = $this->getModule()->getFormFields();
                      $params = ['label' => 'LBL_' . \strtoupper($name), 'fieldvalue' => $this->get($name) ?? $fields[$name]['default'] ?? '', 'typeofdata' => 'V'];
              Severity: Major
              Found in modules/Settings/Magento/models/Record.php - About 2 hrs to fix

                Method getContent has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getContent(): string
                    {
                        if ($this->has('parsedContent')) {
                            return $this->get('parsedContent');
                        }
                Severity: Major
                Found in modules/OSSMail/models/Mail.php - About 2 hrs to fix

                  File List.js has 263 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/Rss/resources/List.js - About 2 hrs to fix

                    File Page.php has 263 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * Abstract page view controller file.
                     *
                     * @package   Controller
                    Severity: Minor
                    Found in app/Controller/View/Page.php - About 2 hrs to fix

                      File AdvanceSearch.js has 262 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/Vtiger/resources/AdvanceSearch.js - About 2 hrs to fix

                        File Module.php has 262 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/Settings/CurrencyUpdate/models/Module.php - About 2 hrs to fix

                          File Calendar.php has 262 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          
                          /**
                           * Calendar Model Class.
                           *
                          Severity: Minor
                          Found in modules/Calendar/models/Calendar.php - About 2 hrs to fix

                            Function registerAdavancedSequenceEvent has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    registerAdavancedSequenceEvent: function () {
                                        const editViewForm = this.getForm();
                                        const sequenceBtn = editViewForm.find('.js-adavanced-sequence');
                                        sequenceBtn.on('click', function () {
                                            let sourceModule = editViewForm.find('[name="sourceModule"]').val();

                              Function getRule has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      getRule: function () {
                                          var form = this.getForm();
                                          var freq = form.find('.recurringType').val();
                                          var rule = 'FREQ=' + freq;
                                          rule += ';INTERVAL=' + form.find('.repeatFrequency').val();
                              Severity: Major
                              Found in public_html/layouts/basic/modules/Calendar/resources/Edit.js - About 2 hrs to fix

                                Function registerSubmitEvent has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    registerSubmitEvent(select2Element) {
                                        $('#CustomView').on('submit', (e) => {
                                            const form = $(e.currentTarget);
                                            let selectElement = this.getColumnSelectElement();
                                            if ($('#viewname').val().length > 100) {
                                Severity: Major
                                Found in public_html/layouts/basic/modules/CustomView/resources/CustomView.js - About 2 hrs to fix

                                  Function widgetRelatedRecordView has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          widgetRelatedRecordView: function (container, load) {
                                              let cacheKey = this.getRecordId() + '_' + container.data('id');
                                              let relatedRecordCacheID = app.moduleCacheGet(cacheKey);
                                              if (relatedRecordCacheID !== null) {
                                                  let newActive = container.find(".js-carousel-item[data-id = '" + relatedRecordCacheID + "']");
                                  Severity: Major
                                  Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 2 hrs to fix

                                    Function loadInventoryData has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            loadInventoryData(recordId, sourceModule, success = false, fail = false) {
                                                const progressLoader = $.progressIndicator({ blockInfo: { enabled: true } });
                                                return new Promise((resolve, reject) => {
                                                    AppConnector.request({
                                                        module: app.getModuleName(),
                                    Severity: Major
                                    Found in public_html/layouts/basic/modules/Vtiger/resources/Inventory.js - About 2 hrs to fix

                                      Function getUi has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              getUi: function () {
                                                  let pickListValues = this.getPickListValues();
                                                  let value = this.getValue() || '';
                                                  let values = value.split(',').map((v) => pickListValues[v] || '');
                                                  let displayValue = values.join(', ', values);
                                      Severity: Major
                                      Found in public_html/layouts/basic/modules/Vtiger/resources/AdvanceFilter.js - About 2 hrs to fix

                                        Function validateToClose has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                validateToClose: function (form) {
                                                    const aDeferred = $.Deferred();
                                                    let closedStatus = app.getMainParams('closeTicketForStatus', true);
                                                    let status = form.find('[name="ticketstatus"] :selected').val();
                                                    let progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });
                                        Severity: Major
                                        Found in public_html/layouts/basic/modules/HelpDesk/resources/Edit.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language