YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function triggerMassQuickCreate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        triggerMassQuickCreate: function (moduleName, data) {
            const self = this.relatedListInstance;
            if (self.checkListRecordSelected() !== true) {
                let listParams = self.getSelectedParams();
                let progress = $.progressIndicator({ blockInfo: { enabled: true } });
Severity: Minor
Found in public_html/layouts/basic/modules/Vtiger/resources/RelatedList.js - About 1 hr to fix

    Function registerActivityState has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            registerActivityState() {
                const self = this;
                $('.js-activity-buttons button:not(.close)').on('click', function (e) {
                    let currentTarget = $(e.currentTarget),
                        viewName = app.getViewName();

      Function getParams has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              getParams() {
                  let data = {};
                  let paramsForm = this.form.serializeFormData();
                  this.form.find('.saveParam').each(function (_, element) {
                      if (typeof paramsForm[element.name] !== 'undefined') {

        Function preQuickCreateSave has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    let preQuickCreateSave = function (data) {
                        let index, queryParam, queryParamComponents;
                        let queryParameters = [];
        
                        if (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -1) {
        Severity: Minor
        Found in public_html/layouts/basic/modules/HelpDesk/resources/Edit.js - About 1 hr to fix

          Function saveDiscountsParameters has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  saveDiscountsParameters: function (parentRow, modal) {
                      const typeName = 'aggregationType',
                          panels = modal.find('[name="' + typeName + '"]:checked');
                      let info = {};
                      info[typeName] = [];
          Severity: Minor
          Found in public_html/layouts/basic/modules/Vtiger/resources/Inventory.js - About 1 hr to fix

            Function formatTooltipTitles has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    formatTooltipTitles: function formatTooltipTitles(data) {
                        data.datasets.forEach((dataset) => {
                            if (typeof dataset.titlesFormatted === 'undefined') {
                                dataset.titlesFormatted = [];
                                dataset.data.forEach((dataItem, index) => {

              Function preQuickCreateSave has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          let preQuickCreateSave = function (data) {
                              let index, queryParam, queryParamComponents;
                              let queryParameters = [];
              
                              if (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -1) {
              Severity: Minor
              Found in public_html/layouts/basic/modules/HelpDesk/resources/Detail.js - About 1 hr to fix

                Function loadProject has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    loadProject(projectData) {
                        this.projectData = projectData;
                        if (typeof this.projectData.tasks === 'undefined' || this.projectData.tasks.length === 0) {
                            $('.js-hide-filter').addClass('d-none');
                            $('.js-show-add-record').removeClass('d-none');
                Severity: Minor
                Found in public_html/layouts/basic/modules/Project/resources/Gantt.js - About 1 hr to fix

                  Function readAndValidate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      readAndValidate: function (file, editor) {
                          const aDeferred = jQuery.Deferred(),
                              fieldInfo = $(editor.element.$).data('fieldinfo');
                          let length = editor.getData().length,
                              selectedImg = editor.getSelection();

                    Function registerAfterLoginEvents has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        registerAfterLoginEvents: function () {
                            if (this.processEvents === false) {
                                let processEvents = $('#processEvents');
                                if (processEvents.length === 0) {
                                    return;
                    Severity: Minor
                    Found in public_html/layouts/resources/app.js - About 1 hr to fix

                      Method testRecordModel has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function testRecordModel()
                          {
                              $recordModel = \Settings_Currency_Record_Model::getInstance(self::$id);
                              $this->assertNotNull($recordModel, 'Expected recordModel is not empty');
                              $this->assertNotEmpty($recordModel->getName(), 'Expected name is not empty');
                      Severity: Minor
                      Found in tests/Settings/Currency.php - About 1 hr to fix

                        Method testAddInventoryRecord has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function testAddInventoryRecord(): void
                            {
                                $request = $this->httpClient->post('FInvoiceProforma/Record/', \App\Utils::merge(['json' => [
                                    'subject' => 'Api YetiForce FInvoiceProforma',
                                    'paymentdate' => date('Y-m-d'),
                        Severity: Minor
                        Found in tests/Integrations/WebservicePremiumTest.php - About 1 hr to fix

                          Method emit has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function emit()
                              {
                                  $contentTypeSent = false;
                                  foreach ($this->headers as $header) {
                                      if (!$contentTypeSent && 0 === stripos($header, 'content-type')) {
                          Severity: Minor
                          Found in include/http/Response.php - About 1 hr to fix

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

                                public function __construct($media = '')
                                {
                                    parent::__construct();
                                    $this->debugging = App\Config::debug('DISPLAY_DEBUG_VIEWER');
                            
                            
                            Severity: Minor
                            Found in include/runtime/Viewer.php - About 1 hr to fix

                              Method view has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function view($templateName, $moduleName = '', $fetch = false)
                                  {
                                      $templatePath = $this->getTemplatePath($templateName, $moduleName);
                                      if (\App\Cache::has('ViewerTemplateExists', $templatePath)) {
                                          $templateFound = \App\Cache::get('ViewerTemplateExists', $templatePath);
                              Severity: Minor
                              Found in include/runtime/Viewer.php - About 1 hr to fix

                                Method unzip has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function unzip($toDir, bool $close = true)
                                    {
                                        if (\is_string($toDir)) {
                                            $toDir = [$toDir];
                                        }
                                Severity: Minor
                                Found in app/Zip.php - About 1 hr to fix

                                  Method getBasicLibraries has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public static function getBasicLibraries(): array
                                      {
                                          return [
                                              'YetiForce' => [
                                                  'name' => 'YetiForce',
                                  Severity: Minor
                                  Found in app/Installer/Credits.php - About 1 hr to fix

                                    Method sendReport has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static function sendReport(array $data): array
                                        {
                                            if (!\App\RequestUtil::isNetConnection()) {
                                                return ['status' => false, 'message' => \App\Language::translate('ERR_NO_INTERNET_CONNECTION', 'Other:Exceptions')];
                                            }
                                    Severity: Minor
                                    Found in app/Mail/Rbl.php - About 1 hr to fix

                                      Method updateLabelOnSave has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public static function updateLabelOnSave(\Vtiger_Record_Model $recordModel): void
                                          {
                                              $label = '';
                                              $metaInfo = \App\Module::getEntityInfo($recordModel->getModuleName());
                                              $dbCommand = Db::getInstance()->createCommand();
                                      Severity: Minor
                                      Found in app/Record.php - About 1 hr to fix

                                        Method getQueryRoom has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function getQueryRoom(): Db\Query
                                            {
                                                switch ($this->roomType) {
                                                    case 'crm':
                                                        return (new Db\Query())
                                        Severity: Minor
                                        Found in app/Chat.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language