YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

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

    public function getFieldInstanceByName($name)
    {
        if (!isset($this->customFields[$name])) {
            return parent::getFieldInstanceByName($name);
        }
Severity: Minor
Found in modules/FInvoice/dashboards/SummationByMonthsModel.php - About 1 hr to fix

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

        public static function validateFileUpload(App\Request $request)
        {
            $currentUser = \App\User::getCurrentUserModel();
    
            $uploadMaxSize = \App\Config::getMaxUploadSize();
    Severity: Minor
    Found in modules/Import/helpers/Utils.php - About 1 hr to fix

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

          public function getChild(int $id, array &$childRow, int $depthBase)
          {
              \App\Log::trace('Entering getChild(' . $id . ',' . $depthBase . ') method ...');
              if (empty($id) || $depthBase == App\Config::module('Contacts', 'MAX_HIERARCHY_DEPTH')) {
                  \App\Log::error('Exiting getChild method ... - exceeded maximum depth of hierarchy');
      Severity: Minor
      Found in modules/Contacts/Contacts.php - About 1 hr to fix

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

            public function get(): array
            {
                $moduleName = $this->controller->request->getModule();
                $moduleModel = \Vtiger_Module_Model::getInstance($moduleName);
                $return = [];
        Severity: Minor
        Found in api/webservice/WebserviceStandard/BaseModule/RelatedModules.php - About 1 hr to fix

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

              public function getStatuses()
              {
                  $closingStatuses = Settings_RealizationProcesses_Module_Model::getStatusNotModify();
                  if (empty($closingStatuses['Project'])) {
                      $closingStatuses['Project'] = ['status' => []];
          Severity: Minor
          Found in modules/Project/models/Gantt.php - About 1 hr to fix

            Function editTax has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    editTax: function (url, currentTrElement) {
                        var aDeferred = jQuery.Deferred();
                        var thisInstance = this;
            
                        var progressIndicatorElement = jQuery.progressIndicator({
            Severity: Minor
            Found in public_html/layouts/basic/modules/Settings/Vtiger/resources/Tax.js - About 1 hr to fix

              Function registerModuleChangeEvent has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      registerModuleChangeEvent: function () {
                          const self = this;
                          const container = self.getContainer();
                          container.find('.js-selected-module').on('change', function (e) {
                              const selectedModule = jQuery(e.currentTarget).val();

                Function edit has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        edit: function (url, currentTrElement) {
                            let aDeferred = jQuery.Deferred();
                            let thisInstance = this;
                
                            let progressIndicatorElement = jQuery.progressIndicator({

                  Function toggleSplit has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          toggleSplit: function (container) {
                              var thisInstance = this;
                              var listPreview = container.find('.js-detail-preview');
                              var splitsArray = [];
                              var mainBody = container.closest('.mainBody');
                  Severity: Minor
                  Found in public_html/layouts/basic/modules/Vtiger/resources/ListPreview.js - About 1 hr to fix

                    Function registerFileLocationTypeChangeEvent has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            registerFileLocationTypeChangeEvent: function (container) {
                                var thisInstance = this;
                                container.on('change', 'select[name="filelocationtype"]', function (e) {
                                    var fileLocationTypeElement = container.find('[name="filelocationtype"]');
                                    var fileNameElement = container.find('[name="filename"]');
                    Severity: Minor
                    Found in public_html/layouts/basic/modules/Documents/resources/Edit.js - About 1 hr to fix

                      Function saveCommentAjax has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              saveCommentAjax: function (
                                  element,
                                  commentMode,
                                  commentContentValue,
                                  editCommentReason,
                      Severity: Minor
                      Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 1 hr to fix

                        Function mapAddressDetails has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                mapAddressDetails: function (result, container) {
                                    for (let key in result) {
                                        if (key.indexOf('addresslevel') != -1) {
                                            if (container.find('[name="' + key + '"]').length != 0) {
                                                container.find('[name="' + key + '"]').val(result['data'][key]);
                        Severity: Minor
                        Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 1 hr to fix

                          Function getEmailFromRecord has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              getEmailFromRecord(record, module, maxEmails) {
                                  const aDeferred = $.Deferred();
                                  const progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });
                                  AppConnector.request({
                                      dataType: 'html',
                          Severity: Minor
                          Found in public_html/layouts/basic/modules/Vtiger/resources/Vtiger.js - About 1 hr to fix

                            Function registerFastEditingFields has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    registerFastEditingFields: function () {
                                        let thisInstance = this;
                                        let fastEditingFiels = jQuery('.summaryWidgetFastEditing select');
                                        fastEditingFiels.on('change', function (e) {
                                            let fieldElement = jQuery(e.currentTarget);
                            Severity: Minor
                            Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 1 hr to fix

                              Function initTaxParameters has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      initTaxParameters: function (parentRow, modal) {
                                          let parameters;
                                          if (parentRow.data('taxParam')) {
                                              parameters = parentRow.data('taxParam');
                                          } else {
                              Severity: Minor
                              Found in public_html/layouts/basic/modules/Vtiger/resources/Inventory.js - About 1 hr to fix

                                Function setBrowserHistoryOptions has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    setBrowserHistoryOptions() {
                                        const historyParams = app.getMainParams('historyParams', true);
                                        let options = {};
                                        if (historyParams && (historyParams.length || Object.keys(historyParams).length)) {
                                            let s = App.Fields.Date.getDateInstance(historyParams.start);
                                Severity: Minor
                                Found in public_html/layouts/resources/Calendar.js - About 1 hr to fix

                                  Function build has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  async function build(fileName) {
                                      const inputOptions = {
                                              input: fileName,
                                              treeshake: false,
                                              plugins: [
                                  Severity: Minor
                                  Found in public_html/src/build.js - About 1 hr to fix

                                    Method testEditAdvancedPermission has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function testEditAdvancedPermission()
                                        {
                                            $members = ['Users:1'];
                                            $conditions = [
                                                [
                                    Severity: Minor
                                    Found in tests/Settings/AdvancedPermission.php - About 1 hr to fix

                                      Method getUnlockResponse has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function getUnlockResponse(\App\Request $request): array
                                          {
                                              $query = $this->getUnlockQuery($request);
                                              $dataReader = $query->createCommand()->query();
                                              $rows = [];
                                      Severity: Minor
                                      Found in app/Controller/Components/Action/InterestsConflict.php - About 1 hr to fix

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

                                            public function process()
                                            {
                                                $moduleName = 'Calendar';
                                                $moduleModel = \Vtiger_Module_Model::getInstance($moduleName);
                                                $currentUserModel = \App\User::getCurrentUserModel();
                                        Severity: Minor
                                        Found in app/TextParser/OverdueDeadlines.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language