YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function registerAutoComplete has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        registerAutoComplete() {
            App.Fields.Picklist.showSelect2ElementView(this.select, {
                ajax: {
                    data: function (item) {
                        return {
Severity: Minor
Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

    Function createCodeBlock has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var createCodeBlock = (PhpDebugBar.Widgets.createCodeBlock = function (code, lang, firstLineNumber, highlightedLine) {
            var pre = $('<pre />').addClass(csscls('code-block'));
            // Add a newline to prevent <code> element from vertically collapsing too far if the last
            // code line was empty: that creates problems with the horizontal scrollbar being
            // incorrectly positioned - most noticeable when line numbers are shown.
    Severity: Minor
    Found in public_html/layouts/resources/debugbar/logs.js - About 1 hr to fix

      Function registerPinEvent has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          registerPinEvent: function () {
              const self = this;
              let pinButton = self.sidebar.find('.js-menu--pin');
              let baseContainer = self.sidebar.closest('.js-base-container');
              pinButton.on('click', () => {
      Severity: Minor
      Found in public_html/layouts/resources/app.js - About 1 hr to fix

        Method initialize has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function initialize($valuemap, $module = false, $blockInstance = false)
            {
                $this->id = (int) $valuemap['fieldid'];
                $this->tabid = (int) $valuemap['tabid'];
                $this->name = $valuemap['fieldname'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php - About 1 hr to fix

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

                  validate: function () {
                      var response = this._super();
                      if (response !== true) {
                          return response;
                      }
          Severity: Minor
          Found in public_html/layouts/resources/validator/FieldValidator.js - About 1 hr to fix

            Function uploadSuccess has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                uploadSuccess(e, data) {
                    this.progressInstance.progressIndicator({ mode: 'hide' });
                    const { result } = data;
                    const attach = result.result.attach;
                    attach.forEach((fileAttach) => {
            Severity: Minor
            Found in public_html/layouts/resources/fields/MultiImage.js - About 1 hr to fix

              Method testIfAllOperatorsExist has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function testIfAllOperatorsExist()
                  {
                      foreach ((new \DirectoryIterator(ROOT_DIRECTORY . '/modules/Vtiger/uitypes/')) as $item) {
                          if ($item->isFile() && 'php' === $item->getExtension()) {
                              $fileName = $item->getBasename('.php');
              Severity: Minor
              Found in tests/App/Conditions.php - About 1 hr to fix

                Method testDate has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function testDate()
                    {
                        $this->assertSame('+ ' . \date('Y-m-d') . ' +', self::$parserClean
                            ->setContent('+ $(date : now)$ +')
                            ->parse()
                Severity: Minor
                Found in tests/App/TextParser.php - About 1 hr to fix

                  Method getCRMRecordMetadata has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function getCRMRecordMetadata($mixedid)
                      {
                          $multimode = \is_array($mixedid);
                  
                          $ids = $multimode ? $mixedid : [$mixedid];
                  Severity: Minor
                  Found in vtlib/Vtiger/Functions.php - About 1 hr to fix

                    Method appendInteger has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function appendInteger(&$combinations)
                        {
                            $dbFormat = '123456789';
                            $fieldData = (new \App\Db\Query())->from('vtiger_field')->where(['uitype' => 7])->one();
                            foreach ($this->getCombinations() as $combination) {
                    Severity: Minor
                    Found in tests/Base/Z_StringFormatting.php - About 1 hr to fix

                      Method getLabelQuery has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getLabelQuery(): Db\Query
                          {
                              $query = (new \App\Db\Query())->select(['cl.crmid', 'cl.label', 'vtiger_crmentity.setype'])
                                  ->from('u_#__crmentity_label cl')->innerJoin('vtiger_crmentity', 'cl.crmid = vtiger_crmentity.crmid');
                              $where = ['and'];
                      Severity: Minor
                      Found in app/RecordSearch.php - About 1 hr to fix

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

                            public function process(): void
                            {
                                $this->status = 1;
                                $errorsSecurity = \App\Utils\ConfReport::getErrors('security', true);
                                unset($errorsSecurity['HTTPS']);
                        Severity: Minor
                        Found in app/SystemWarnings/Security/SecurityConf.php - About 1 hr to fix

                          Method deactivate has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function deactivate(string $moduleName, string $fieldName): bool
                              {
                                  $moduleModel = \Vtiger_Module_Model::getInstance($moduleName);
                                  if (!($fieldModel = $moduleModel->getFieldByName($fieldName))) {
                                      return false;
                          Severity: Minor
                          Found in app/RecordStatus.php - About 1 hr to fix

                            Method preProcess has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function preProcess(\App\Request $request, $display = true)
                                {
                                    parent::preProcess($request, false);
                                    $view = $this->getViewer($request);
                                    if (\App\Config::performance('BROWSING_HISTORY_WORKING')) {
                            Severity: Minor
                            Found in app/Controller/View/Page.php - About 1 hr to fix

                              Method parseInventoryData has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function parseInventoryData(\Vtiger_Record_Model $recordModel, array $item, Maps\Inventory $mapModel): array
                                  {
                                      $mapModel->setDataInv($item);
                                      $inventoryModel = \Vtiger_Inventory_Model::getInstance($recordModel->getModuleName());
                                      $inventoryRow = $inventoryModel->loadRowData($item['crmProductId'], ['currency' => $mapModel->dataCrm['currency_id']]);
                              Severity: Minor
                              Found in app/Integrations/Magento/Synchronizer/Base.php - About 1 hr to fix

                                Method sanitizeDbFormat has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public static function sanitizeDbFormat(string $date, string $fromFormat)
                                    {
                                        $dbDate = '';
                                        if ($date) {
                                            [$y, $m, $d] = self::explode($date, $fromFormat);
                                Severity: Minor
                                Found in app/Fields/Date.php - About 1 hr to fix

                                  Method addMail has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public static function addMail(array $params): bool
                                      {
                                          $params['status'] = Config::component('Mail', 'MAILER_REQUIRED_ACCEPTATION_BEFORE_SENDING') ? 0 : 1;
                                          $params['date'] = date('Y-m-d H:i:s');
                                          if (empty($params['owner'])) {
                                  Severity: Minor
                                  Found in app/Mailer.php - About 1 hr to fix

                                    Method change has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function change(App\Request $request)
                                        {
                                            $moduleName = $request->getModule();
                                            $viewer = $this->getViewer($request);
                                            $viewer->assign('WARNING', '');
                                    Severity: Minor
                                    Found in modules/Users/views/PasswordModal.php - About 1 hr to fix

                                      Method getAddFieldTypeInfo has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function getAddFieldTypeInfo()
                                          {
                                              $fieldTypesInfo = [];
                                              $addFieldSupportedTypes = $this->getAddSupportedFieldTypes();
                                              $lengthSupportedFieldTypes = ['Text', 'Decimal', 'Integer', 'Currency', 'Editor', 'AdvPercentage'];
                                      Severity: Minor
                                      Found in modules/Settings/LayoutEditor/models/Module.php - About 1 hr to fix

                                        Method getConfig has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static function getConfig($type = false)
                                            {
                                                \App\Log::trace('Start ' . __METHOD__ . " | Type: $type");
                                                $cache = Vtiger_Cache::get('SalesProcesses', false === $type ? 'all' : $type);
                                                if ($cache) {
                                        Severity: Minor
                                        Found in modules/Settings/SalesProcesses/models/Module.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language