YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method showSearchComments has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function showSearchComments(App\Request $request)
    {
        if (!\App\Privilege::isPermitted('ModComments')) {
            throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);
        }
Severity: Minor
Found in modules/Vtiger/views/Detail.php - About 1 hr to fix

    Method showModTrackerByField has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function showModTrackerByField(App\Request $request)
        {
            $moduleName = $request->getModule();
            $recordModel = $this->record->getRecord();
            $fieldName = $request->getByType('field', 'Alnum');
    Severity: Minor
    Found in modules/Vtiger/views/Detail.php - About 1 hr to fix

      Method owners has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function owners(App\Request $request)
          {
              $owner = App\Fields\Owner::getInstance();
              $owner->showRoleName = true;
              $owner->find($request->getByType('value', 'Text'));
      Severity: Minor
      Found in modules/Vtiger/actions/Search.php - About 1 hr to fix

        Method getRelationListModel has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function getRelationListModel(App\Request $request)
            {
                $parentRecordModel = \Vtiger_Record_Model::getInstanceById($request->getInteger('record'), $request->getModule());
                $relationId = $request->isEmpty('relationId') ? false : $request->getInteger('relationId');
                $cvId = $request->isEmpty('cvId', true) ? 0 : $request->getByType('cvId', \App\Purifier::ALNUM);
        Severity: Minor
        Found in modules/Vtiger/actions/RelationAjax.php - About 1 hr to fix

          Method get has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function get()
              {
                  $rawData = $records = [];
                  $showRaw = $this->isRawData();
                  $queryGenerator = $this->getQuery();
          Severity: Minor
          Found in api/webservice/ManageConsents/Approvals/RecordsList.php - About 1 hr to fix

            Method getRecordFromRow has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function getRecordFromRow(array $row): array
                {
                    $record = ['recordLabel' => \App\Record::getLabel($row['id'])];
                    if ($this->fields) {
                        $moduleModel = reset($this->fields)->getModule();
            Severity: Minor
            Found in api/webservice/WebserviceStandard/BaseModule/RecordsList.php - About 1 hr to fix

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

                      registerSwitch: function () {
                          this.container.find('.js-switch--inventory').on('click', (event) => {
                              event.preventDefault();
                              app.showConfirmModal({
                                  title: app.vtranslate('JS_EXTENDED_MODULE'),

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

                        registerOnChangeEventForSourceModule: function () {
                            var form = this.getContainer();
                            form.on('change', '.sourceFields', function (e) {
                                var element = jQuery(e.currentTarget);
                                var container = jQuery(element.closest('tr'));

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

                          createUpdatedBlockFieldsList: function () {
                              var thisInstance = this;
                              var contents = this.container.find('.contents');
                  
                              for (var index in thisInstance.updatedBlocksList) {

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

                            registerChangeVal: function (content) {
                                content.find('input[type="checkbox"]').on('change', function (e) {
                                    let target = $(e.currentTarget),
                                        value = target.is(':checked'),
                                        params = {

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

                              deleteCustomBlock: function (blockId) {
                                  var thisInstance = this;
                                  var progressIndicatorElement = $.progressIndicator({
                                      position: 'html',
                                      blockInfo: {

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

                                registerDeleteShortCutEvent: function (shortcutsContainer = $('.js-shortcuts')) {
                                    shortcutsContainer.on('click', '.unpin', (e) => {
                                        e.preventDefault();
                                        var actionEle = $(e.currentTarget);
                                        var closestBlock = actionEle.closest('.js-shortcut');

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

                                  preSaveValidation: function () {
                                      const aDeferred = $.Deferred();
                                      let formData = new FormData(this.container[0]);
                                      formData.append('mode', 'preSaveValidation');
                                      AppConnector.request({

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

                                registerCompare() {
                                    let form = this.container.find('form');
                                    this.container.find('.js-compare').on('click', () => {
                                        let formData = form.serializeFormData();
                                        formData['module'] = 'Products';

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

                                      registerConvertLeadSubmit: function () {
                                          var thisInstance = this;
                                          var formElement = this.getConvertLeadForm();
                              
                                          formElement.on('jqv.form.validating', function (e) {
                              Severity: Minor
                              Found in public_html/layouts/basic/modules/Leads/resources/Detail.js - About 1 hr to fix

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

                                        makeDefault: function (container) {
                                            var recordId = container.find('#recordId').val();
                                            var module = app.getModuleName();
                                            var postData = {
                                                module: module,
                                Severity: Minor
                                Found in public_html/layouts/basic/modules/Rss/resources/List.js - About 1 hr to fix

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

                                      loadCalendarData() {
                                          const self = this,
                                              progressInstance = $.progressIndicator({ blockInfo: { enabled: true } });
                                          let options = this.getDefaultParams();
                                          self.fullCalendar.removeAllEvents();

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

                                            addRelationBetweenRecords: function (relatedModule, relatedModuleRecordId, selectedTabElement, params = {}, url) {
                                                let aDeferred = jQuery.Deferred();
                                                let thisInstance = this;
                                                let relatedController;
                                                if (selectedTabElement == undefined) {
                                    Severity: Minor
                                    Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 1 hr to fix

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

                                              triggerMassEdit: function (massEditUrl) {
                                                  let listInstance = Vtiger_List_Js.getInstance();
                                                  if (listInstance.checkListRecordSelected() !== true) {
                                                      let selectedCount = this.getSelectedRecordCount();
                                                      if (selectedCount > $('#listMaxEntriesMassEdit').val()) {
                                      Severity: Minor
                                      Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 1 hr to fix

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

                                            formatDate(startDate, endDate, type) {
                                                switch (type) {
                                                    case 'month':
                                                        return Calendar_Js.monthFormat[CONFIG.dateFormat]
                                                            .replace('YYYY', startDate['year'])
                                        Severity: Minor
                                        Found in public_html/layouts/resources/Calendar.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language