YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function loadFieldSpecificUi has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        loadFieldSpecificUi(fieldSelect) {
            const selectedOption = fieldSelect.find('option:selected');
            const row = fieldSelect.closest('div.js-conditions-row');
            const fieldUiHolder = row.find('.fieldUiHolder');
            const fieldInfo = selectedOption.data('fieldinfo');

    Function registerImport has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        registerImport() {
            let form = this.container.find('form');
            this.container.find('.js-import').on('click', () => {
                let formData = form.serializeFormData();
                if (formData['storage'] != 0 && !form.validationEngine('validate')) {

      Function uncheckNode has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              this.uncheckNode = function (obj, e, traversing = false) {
                  let cascade = this.settings.checkbox.cascade;
                  if (typeof cascade !== 'undefined' && cascade) {
                      if (cascade.indexOf('down') !== -1 && !traversing) {
                          if (this.is_closed(obj)) {
      Severity: Minor
      Found in public_html/layouts/resources/libraries/jstree.category.js - About 1 hr to fix

        Function deselect_node has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                this.deselect_node = function (obj, supress_event, e) {
                    if (this.get_node(obj).original.type == 'category') {
                        obj = this.get_node(obj);
                        if (obj.category.checked) {
                            this.uncheckNode(obj, e);
        Severity: Minor
        Found in public_html/layouts/resources/libraries/jstree.category.js - About 1 hr to fix

          Function checkNode has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  this.checkNode = function (obj, e, traversing = false) {
                      let dom = this.get_node(obj, true);
                      this._data.category.selected.push(obj.id);
                      let cascade = this.settings.checkbox.cascade;
                      if (typeof cascade !== 'undefined' && cascade) {
          Severity: Minor
          Found in public_html/layouts/resources/libraries/jstree.category.js - About 1 hr to fix

            Function uploadError has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                uploadError(_e, data) {
                    this.progressInstance.progressIndicator({ mode: 'hide' });
                    app.errorLog('File upload error.');
                    const { jqXHR, files } = data;
                    const response = jqXHR.responseJSON;
            Severity: Minor
            Found in public_html/layouts/resources/fields/MultiImage.js - About 1 hr to fix

              Method getRelatedLevelVariable has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getRelatedLevelVariable($fieldType = false)
                  {
                      $cacheKey = "{$this->moduleName}|$fieldType";
                      if (isset(static::$relatedVariableLevel[$cacheKey])) {
                          return static::$relatedVariableLevel[$cacheKey];
              Severity: Minor
              Found in app/TextParser.php - About 1 hr to fix

                Method initInventoryValuesByUser has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function initInventoryValuesByUser()
                    {
                        $invData = [];
                        $counter = 1;
                        foreach ($this->cleanRecordModels as $groupBy => $newRecordModel) {
                Severity: Minor
                Found in app/RecordConverter.php - About 1 hr to fix

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

                      public function process(): void
                      {
                          $scanner = $this->scannerEngine;
                          if ($this->checkExceptions('CreatedMail') || false !== $scanner->getMailCrmId()) {
                              return;
                  Severity: Minor
                  Found in app/Mail/ScannerAction/CreatedMail.php - About 1 hr to fix

                    Method process has 43 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: Minor
                    Found in app/TextParser/UserNewRecords.php - About 1 hr to fix

                      Method getUsersAndGroupForModuleList has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getUsersAndGroupForModuleList($view = false, $conditions = false, $fieldName = 'assigned_user_id')
                          {
                              $queryGenerator = new \App\QueryGenerator($this->moduleName, $this->currentUser->getId());
                              if ($view) {
                                  $queryGenerator->initForCustomViewById($view);
                      Severity: Minor
                      Found in app/Fields/Owner.php - About 1 hr to fix

                        Method truncateHtml has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function truncateHtml(?string $html, ?string $size = 'medium', ?int $length = 200, $showBtn = false): string
                            {
                                if (empty($html)) {
                                    return '';
                                }
                        Severity: Minor
                        Found in app/Layout.php - About 1 hr to fix

                          Method sendFromTemplate has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function sendFromTemplate(array $params): bool
                              {
                                  Log::trace('Send mail from template', 'Mailer');
                                  if (empty($params['template'])) {
                                      Log::warning('No template', 'Mailer');
                          Severity: Minor
                          Found in app/Mailer.php - About 1 hr to fix

                            Method getValuesForSave has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getValuesForSave()
                                {
                                    $forSave = [
                                        'vtiger_users' => [
                                            'date_modified' => date('Y-m-d H:i:s'),
                            Severity: Minor
                            Found in modules/Users/models/Record.php - About 1 hr to fix

                              Method step has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function step($step, App\Request $request)
                                  {
                                      $viewer = $this->getViewer($request);
                                      $moduleName = $request->getModule();
                                      $qualifiedModuleName = $request->getModule(false);
                              Severity: Minor
                              Found in modules/Settings/MappedFields/views/Edit.php - About 1 hr to fix

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

                                    public function process(App\Request $request)
                                    {
                                        try {
                                            $orderId = $message = '';
                                            $responseType = 'success';
                                Severity: Minor
                                Found in modules/Settings/YetiForce/actions/Buy.php - About 1 hr to fix

                                  Method getListViewEntries has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getListViewEntries($pagingModel)
                                      {
                                          $moduleModel = $this->getModule();
                                          $moduleName = $moduleModel->getName();
                                          $parentModuleName = $moduleModel->getParentName();
                                  Severity: Minor
                                  Found in modules/Settings/Vtiger/models/ListView.php - About 1 hr to fix

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

                                        public function save($mapping)
                                        {
                                            $db = \App\Db::getInstance();
                                            $deleteMappingsList = $updateMappingsList = $createMappingsList = [];
                                            foreach ($mapping as $mappingDetails) {
                                    Severity: Minor
                                    Found in modules/Settings/Leads/models/Mapping.php - About 1 hr to fix

                                      Method getDisplayValue has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function getDisplayValue(string $key)
                                          {
                                              $fieldValue = $this->get($key);
                                              switch ($key) {
                                                  case 'frequency':
                                      Severity: Minor
                                      Found in modules/Settings/CronTasks/models/Record.php - About 1 hr to fix

                                        Method updateReminderPostpone has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function updateReminderPostpone(string $time)
                                            {
                                                switch ($time) {
                                                    case '15m':
                                                        $datatime = date('Y-m-d H:i:s', strtotime('+15 min'));
                                        Severity: Minor
                                        Found in modules/Calendar/models/Record.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language