YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Consider simplifying this complex logical expression.
Open

        if (!$userPrivilegesModel->hasModuleActionPermission($request->getModule(), 'Import') || !$userPrivilegesModel->hasModuleActionPermission($request->getModule(), 'CreateView') || (
            $relationId && (
                !($relationModel = Vtiger_Relation_Model::getInstanceById($relationId))
                || !$relationModel->isAddActionSupported()
                || $relationModel->getRelationModuleName() !== $request->getModule()
Severity: Critical
Found in modules/Vtiger/views/Import.php - About 1 hr to fix

    Function triggerMassOff2FA has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            triggerMassOff2FA: function () {
                let url = window.location.href;
                let listInstance = Settings_Vtiger_List_Js.getInstance();
                let validationResult = listInstance.checkListRecordSelected();
                if (validationResult !== true) {
    Severity: Minor
    Found in public_html/layouts/basic/modules/Users/resources/List.js - About 1 hr to fix

      Function registerAddMember has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          registerAddMember() {
              this.container.find('.js-data-table').on('click', '.js-member-add', (e) => {
                  let url = e.currentTarget.dataset.url + '&groupID=' + this.container.find('form').serializeFormData()['groupID'];
                  app.showModalWindow(
                      null,
      Severity: Minor
      Found in public_html/layouts/basic/modules/Users/resources/Groups.js - About 1 hr to fix

        Function confirmedCallback has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                        confirmedCallback: () => {
                            var module = app.getModuleName();
                            var postData = {
                                module: module,
                                action: 'TaskAjax',

          Function setDefaultEndTime has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  setDefaultEndTime: function (container) {
                      const self = this;
                      if (container.find('.js-autofill').is(':checked')) {
                          self.getFreeTime(container);
                      } else {
          Severity: Minor
          Found in public_html/layouts/basic/modules/Calendar/resources/Edit.js - About 1 hr to fix

            Function registerMainCheckBoxClickEvent has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    registerMainCheckBoxClickEvent: function () {
                        const self = this;
                        this.getRelatedContainer().on('click', '#relatedListViewEntriesMainCheckBox', function () {
                            let selectedIds = self.readSelectedIds(),
                                excludedIds = self.readExcludedIds();
            Severity: Minor
            Found in public_html/layouts/basic/modules/Vtiger/resources/RelatedList.js - About 1 hr to fix

              Function changeWatching has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  changeWatching: function (instance) {
                      let value, module, state, className, user, record;
                      if (instance != undefined) {
                          instance = $(instance);
                          value = instance.data('value');
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/Vtiger.js - About 1 hr to fix

                Function submitSearchForm has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        submitSearchForm(detailContentsHolder) {
                            let searchTextDom = detailContentsHolder.find('.js-comment-search'),
                                widgetContainer = searchTextDom.closest('[data-name="ModComments"]'),
                                progressIndicatorElement = $.progressIndicator();
                            if (searchTextDom.data('container') === 'widget' && !searchTextDom.val()) {
                Severity: Minor
                Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 1 hr to fix

                  Function registerNavigatorButtons has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          registerNavigatorButtons: function () {
                              const container = this.getContainer();
                              let btnStart = container.find('.js-time-counter-start');
                              let btnStop = container.find('.js-time-counter-stop');
                              let btnReset = container.find('.js-time-counter-reset');

                    Function saveData has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            saveData(container, data) {
                                let form = container.find('form');
                                container.on('click', '.js-modal__save', (e) => {
                                    if (form.validationEngine('validate')) {
                                        e.preventDefault();
                    Severity: Minor
                    Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

                      Function itemRenderer has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                      itemRenderer: function (li, e) {
                                          $('<span />').addClass(csscls('message')).text(e.message).appendTo(li);
                                          if (e.file) {
                                              var header = $('<span />')
                                                  .addClass(csscls('filename'))
                      Severity: Minor
                      Found in public_html/layouts/resources/debugbar/logs.js - About 1 hr to fix

                        Function showLazySelect has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                showLazySelect(selectElement, params) {
                                    $.fn.select2.amd.require(['select2/data/array', 'select2/utils'], (ArrayData, Utils) => {
                                        function CustomData($element, params) {
                                            CustomData.__super__.constructor.call(this, $element, params);
                                        }
                        Severity: Minor
                        Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

                          Function init has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  init() {
                                      $('.js-changesjson-edit', this.container)
                                          .off('click')
                                          .on('click', () => {
                                              let field = this.getField();
                          Severity: Minor
                          Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

                            Method exportCustomViews has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function exportCustomViews(ModuleBasic $moduleInstance)
                                {
                                    $customViewDataReader = (new \App\Db\Query())->from('vtiger_customview')->where(['entitytype' => $moduleInstance->name])
                                        ->createCommand()->query();
                                    if (!$customViewDataReader->count()) {
                            Severity: Minor
                            Found in vtlib/Vtiger/PackageExport.php - About 1 hr to fix

                              Method export has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function export()
                                  {
                                      $timings = [];
                                      $stack = [];
                                      foreach ($this->messages as $i => $log) {
                              Severity: Minor
                              Found in app/Log/Profiling.php - About 1 hr to fix

                                Method setUpdater has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public static function setUpdater($moduleName, $record = false, $priority = false, $type = 1)
                                    {
                                        $params = [
                                            'module' => $moduleName,
                                            'type' => $type,
                                Severity: Minor
                                Found in app/PrivilegeUpdater.php - About 1 hr to fix

                                  Method getViewId has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getViewId($noCache = false)
                                      {
                                          \App\Log::trace(__METHOD__);
                                          if (isset($this->defaultViewId)) {
                                              return $this->defaultViewId;
                                  Severity: Minor
                                  Found in app/CustomView.php - About 1 hr to fix

                                    Method relatedRecordsList has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        protected function relatedRecordsList($params)
                                        {
                                            [$relatedModuleName, $columns, $conditions, $viewIdOrName, $limit, $maxLength] = array_pad(explode('|', $params), 6, '');
                                            if (is_numeric($relatedModuleName)) {
                                                if ($relationListView = \Vtiger_RelationListView_Model::getInstance($this->recordModel, '', $relatedModuleName)) {
                                    Severity: Minor
                                    Found in app/TextParser.php - About 1 hr to fix

                                      Method install has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public static function install(\Composer\Script\Event $event): void
                                          {
                                              $rootDir = realpath(__DIR__ . '/../../');
                                              if (!\defined('ROOT_DIRECTORY')) {
                                                  \define('ROOT_DIRECTORY', $rootDir);
                                      Severity: Minor
                                      Found in app/Installer/Composer.php - About 1 hr to fix

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

                                            public function process(): string
                                            {
                                                $relatedModuleName = 'Documents';
                                                if (!$this->textParser->recordModel
                                                    || !\App\Privilege::isPermitted($relatedModuleName)
                                        Severity: Minor
                                        Found in app/TextParser/RelatedAttachments.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language