YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function select has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                            select: function (_event, ui) {
                                $.each(ui.item.address, function (index, value) {
                                    let field = container.find('.fieldValue [name^=' + index + ']');
                                    if (field.length && value) {
                                        if (typeof value !== 'object') {
Severity: Minor
Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 1 hr to fix

    Function getBasicOptions has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            getBasicOptions: function getBasicOptions() {
                return {
                    legend: {
                        display: true
                    },

      Function registerListViewCheckRecords has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          registerListViewCheckRecords(container) {
              let templateElements = container.find('[name="pdf_template[]"]');
              templateElements.on('change', function () {
                  document.progressLoader = $.progressIndicator({
                      message: app.vtranslate('JS_PDF_RECALCULATING'),
      Severity: Minor
      Found in public_html/layouts/basic/modules/Vtiger/resources/PDF.js - About 1 hr to fix

        Function register has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                register(container) {
                    if (typeof container === 'undefined' || typeof container.length === 'undefined' || !container.length) {
                        return app.errorLog('Dependend select field container is missing.');
                    }
                    container.each(function () {
        Severity: Minor
        Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

          Function validate has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      validate(element) {
                          let status = true,
                              params;
                          const form = element.closest('form');
                          if (
          Severity: Minor
          Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

            Function formatToDisplay has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    formatToDisplay(value, fixed = true, numberOfDecimal = CONFIG.noOfCurrencyDecimals) {
                        if (!value) {
                            value = 0;
                        }
                        let strDecimal = value.toString().split('.')[1];
            Severity: Minor
            Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

              Function registerIconsEvents has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      registerIconsEvents(selectElement) {
                          selectElement.on('select2:selecting', (event) => {
                              let currentTarget = $(event.params.args.originalEvent.target);
                              if (!currentTarget.hasClass('js-select-option-event') && !currentTarget.is('path')) {
                                  return;
              Severity: Minor
              Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

                Function callbackShown has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            callbackShown: () => {
                                let href;
                                if (!selectElement.attr('href')) {
                                    href = selectElement.find('a').attr('href');
                                }
                Severity: Minor
                Found in public_html/layouts/resources/app.js - About 1 hr to fix

                  Method dataProviderByType has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function dataProviderByType()
                      {
                          // $type, $assertion, $expected, $text, $message, $exception
                          return [
                              ['Standard', 'Same', 'Test-text-string-for-purifier', 'Test-text-string-for-purifier', 'Sample text should be unchanged', null],
                  Severity: Minor
                  Found in tests/App/Purifier.php - About 1 hr to fix

                    Method getTemplatePath has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getTemplatePath($templateName, $moduleName = ''): string
                        {
                            $moduleName = str_replace(':', '/', $moduleName);
                            $cacheKey = $templateName . $moduleName;
                            if (\App\Cache::has('ViewerTemplatePath', $cacheKey)) {
                    Severity: Minor
                    Found in include/runtime/Viewer.php - About 1 hr to fix

                      Method purify has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function purify($input, $loop = true)
                          {
                              if (empty($input)) {
                                  return $input;
                              }
                      Severity: Minor
                      Found in app/Purifier.php - About 1 hr to fix

                        Method parseAdvFilter has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function parseAdvFilter($advFilterList = false)
                            {
                                if (!$advFilterList) {
                                    $advFilterList = $this->advFilterList;
                                }
                        Severity: Minor
                        Found in app/QueryGenerator.php - About 1 hr to fix

                          Method validSearchParams has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function validSearchParams(string $moduleName, array $searchParams, $convert = true): array
                              {
                                  $searchParamsCount = \count($searchParams);
                                  if ($searchParamsCount > 2) {
                                      throw new Exceptions\IllegalValue("ERR_NUMBER_OF_ARGUMENTS_NOT_ALLOWED||{$searchParamsCount}|| > 2||" . Utils::varExport($searchParams, true), 406);
                          Severity: Minor
                          Found in app/Condition.php - About 1 hr to fix

                            Method findByDomainField has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function findByDomainField(string $moduleName, array $fields, array $emails): array
                                {
                                    $return = $activeFields = $domainsAndEmails = [];
                                    foreach ($emails as $email) {
                                        $domainsAndEmails[mb_strtolower(explode('@', $email)[1])][] = $email;
                            Severity: Minor
                            Found in app/Mail/RecordFinder.php - About 1 hr to fix

                              Method getDbInfo has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getDbInfo(): array
                                  {
                                      $return = [
                                          'isFileSize' => false,
                                          'size' => 0,
                              Severity: Minor
                              Found in app/Db.php - About 1 hr to fix

                                Method getRulesForServiceContracts has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public static function getRulesForServiceContracts(int $serviceContractId, \Vtiger_Record_Model $recordModel): array
                                    {
                                        $times = $businessHours = [];
                                        foreach (self::getSlaPolicyForServiceContracts($serviceContractId, $recordModel->getModule()->getId()) as $row) {
                                            switch ($row['policy_type']) {
                                Severity: Minor
                                Found in app/Utils/ServiceContracts.php - About 1 hr to fix

                                  Method htmlTruncate has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public static function htmlTruncate(string $html, int $length = 255, string $ending = '...'): string
                                      {
                                          if (\strlen($html) <= $length) {
                                              return $html;
                                          }
                                  Severity: Minor
                                  Found in app/TextUtils.php - About 1 hr to fix

                                    Method formatToRangeText has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static function formatToRangeText($value, $mode = 'short', $showEmptyValue = true, $unit = 'h')
                                        {
                                            $full = $short = [];
                                            $hours = (int) $value;
                                            if ('y' === $unit) {
                                    Severity: Minor
                                    Found in app/Fields/RangeTime.php - About 1 hr to fix

                                      Method davSaveAttendee has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function davSaveAttendee(array $record)
                                          {
                                              $owner = \Users_Privileges_Model::getInstanceById($record['assigned_user_id']);
                                              $invities = $this->getInvitations($record['id']);
                                              $attendees = $this->vcomponent->select('ATTENDEE');
                                      Severity: Minor
                                      Found in app/Integrations/Dav/Calendar.php - About 1 hr to fix

                                        Method baseModuleTools has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static function baseModuleTools(): int
                                            {
                                                $i = 0;
                                                $allUtility = $missing = $curentProfile2utility = [];
                                                foreach ((new \App\Db\Query())->from('vtiger_profile2utility')->all() as $row) {
                                        Severity: Minor
                                        Found in app/Db/Fixer.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language