YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method transformInventoryFieldFromMap has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function transformInventoryFieldFromMap($value, $mapData)
    {
        if (!empty($value)) {
            if ($this->currentInventoryRawData['name']) {
                [$entityName] = $this->transformInventoryReference($this->currentInventoryRawData['name'], true);
Severity: Minor
Found in modules/Import/actions/Data.php - About 1 hr to fix

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

        public function get(): array
        {
            $rawData = $this->recordModel->getData();
            $displayData = $fieldsLabel = [];
            foreach ($this->recordModel->getModule()->getFields() as $fieldModel) {
    Severity: Minor
    Found in api/webservice/WebserviceStandard/Users/Record.php - About 1 hr to fix

      Method getColumnNames has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function getColumnNames(): array
          {
              $headers = [];
              $selectedColumnsList = [];
              if ($cvId = $this->controller->request->getHeader('x-cv-id')) {
      Severity: Minor
      Found in api/webservice/WebserviceStandard/BaseModule/RecordsList.php - About 1 hr to fix

        Method put has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function put()
            {
                $request = $this->controller->request;
                $paymentSystem = $request->getByType('payment_system', 'Alnum');
                if (!\App\Fields\Picklist::isExists('payment_system', $paymentSystem)) {
        Severity: Minor
        Found in api/webservice/Payments/BaseAction/ReceiveFromPaymentsSystem.php - About 1 hr to fix

          Function registerRecordPreSaveEvent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  registerRecordPreSaveEvent: function (form) {
                      let thisInstance = this;
                      form.on(Vtiger_Edit_Js.recordPreSave, function (e, data) {
                          let record = jQuery('input[name="record"]').val();
                          let progressIndicatorElement = jQuery.progressIndicator({
          Severity: Minor
          Found in public_html/layouts/basic/modules/Users/resources/Edit.js - About 1 hr to fix

            Function restoreUser has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    restoreUser: function (userId, e) {
                        e.stopPropagation();
                        app.showConfirmModal({
                            title: app.vtranslate('JS_RESTORE_CONFIRMATION'),
                            confirmedCallback: () => {
            Severity: Minor
            Found in public_html/layouts/basic/modules/Users/resources/List.js - About 1 hr to fix

              Function addCustomField has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      addCustomField: function (blockId, form) {
                          var modalHeader = form.closest('#' + Window.lastModalId).find('.modal-header h3');
                          var aDeferred = $.Deferred();
              
                          modalHeader.progressIndicator({

                Function deleteModule has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        deleteModule: function (container) {
                            const self = this;
                            container.on('click', '.deleteModule', function () {
                                let forModule = $(this).attr('name');
                                app.showConfirmModal({

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

                                          confirmedCallback: () => {
                                              let params = {};
                                              params['module'] = app.getModuleName();
                                              params['parent'] = app.getParentModuleName();
                                              params['action'] = 'MassDelete';
                  Severity: Minor
                  Found in public_html/layouts/basic/modules/Settings/Mail/resources/List.js - About 1 hr to fix

                    Function initDataTable has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            initDataTable(data, columns) {
                                return this.container.find('.js-data-table').dataTable({
                                    searching: false,
                                    processing: false,
                                    scrollX: true,

                      Function regiserChangeRolePermissions has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          regiserChangeRolePermissions() {
                              this.picklistDataContainer.on('click', '.js-role-order', (e) => {
                                  let progressIndicatorElement = this.getProgressIndicator(this.container.find('.tab-content'));
                                  let disabledValues = [],
                                      enabledValues = [];

                        Function registerSubmitForm has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                registerSubmitForm: function (form) {
                                    form.on('submit', function (e) {
                                        e.preventDefault();
                                        if (form.validationEngine('validate') === true) {
                                            let formData = new FormData(form[0]);

                          Function registerEvents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  registerEvents() {
                                      const container = $('.js-watchdog-container');
                                      container.find('.js-vars').on('change', function (e) {
                                          let field = $(this);
                                          AppConnector.request({

                            Function addKey has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    addKey: function (e) {
                                        var container = jQuery('#DavKeysContainer');
                                        var editColorModal = container.find('.addKeyContainer');
                                        var clonedContainer = editColorModal.clone(true, true);
                                        var callBackFunction = function (data) {
                            Severity: Minor
                            Found in public_html/layouts/basic/modules/Settings/Dav/resources/Dav.js - About 1 hr to fix

                              Function registerSaveEvent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  registerSaveEvent: function (mode, data) {
                                      let progress = $.progressIndicator({
                                          message: app.vtranslate('Saving changes'),
                                          position: 'html',
                                          blockInfo: {

                                Function registerSubmitEvent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        registerSubmitEvent: function () {
                                            let form = this.getForm();
                                            form.on('submit', (e) => {
                                                if (form.data('submit') == 'true' && form.data('performCheck') == 'true') {
                                                    document.progressLoader = $.progressIndicator({
                                Severity: Minor
                                Found in public_html/layouts/basic/modules/Settings/Groups/resources/Edit.js - About 1 hr to fix

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

                                                          confirmedCallback: () => {
                                                              let recordList = $('.mass-selector:checked', container)
                                                                  .map((idx, selector) => {
                                                                      return $(selector).data('id');
                                                                  })

                                    Function registerTableEvents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            registerTableEvents: function (container) {
                                                var thisInstance = this;
                                                container.find('.edit').on('click', function (e) {
                                                    var currentTarget = $(e.currentTarget);
                                                    var progress = jQuery.progressIndicator();

                                      Function registerPinShortCutEvent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              registerPinShortCutEvent: function (element) {
                                                  const id = element.data('id');
                                                  const url =
                                                      'index.php?module=Vtiger&parent=Settings&action=Basic&mode=updateFieldPinnedStatus&pin=true&fieldid=' + id;
                                                  const progressIndicatorElement = $.progressIndicator({

                                        Function registerUploadButton has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                registerUploadButton: function (form) {
                                                    form.on('submit', function (e) {
                                                        e.preventDefault();
                                                        if (form.validationEngine('validate') === true) {
                                                            let formData = new FormData(form[0]),
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language