YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method getWidgetData has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function getWidgetData(): array
    {
        $moduleName = $this->fieldModel->getModuleName();
        $fieldName = $this->fieldModel->getName();
        $columnName = $this->fieldModel->getColumnName();
Severity: Minor
Found in modules/Vtiger/dashboards/UpcomingEvents.php - About 1 hr to fix

    Method getMetricList has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getMetricList()
        {
            $privilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
            $query = (new App\Db\Query())->select(['cvid', 'viewname', 'entitytype', 'userid'])->from('vtiger_customview')
                ->where(['setmetrics' => 1]);
    Severity: Minor
    Found in modules/Vtiger/dashboards/KeyMetrics.php - About 1 hr to fix

      Method getValueForEditView has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getValueForEditView(string $name)
          {
              $value = '';
              switch ($name) {
                  case 'title':
      Severity: Minor
      Found in modules/Vtiger/dashboards/ChartFilterModel.php - About 1 hr to fix

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

            public function process(App\Request $request)
            {
                $moduleName = $request->getModule();
                $recordIds = self::getRecordsListFromRequest($request);
                $configMaxMassDelete = App\Config::performance('maxMassDeleteRecords');
        Severity: Minor
        Found in modules/Vtiger/actions/MassDelete.php - About 1 hr to fix

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

              public function process(App\Request $request)
              {
                  $currentUserId = \App\User::getCurrentUserId();
                  $viewer = $this->getViewer($request);
                  $moduleName = $request->getModule();
          Severity: Minor
          Found in modules/FInvoice/dashboards/SummationByMonths.php - About 1 hr to fix

            Method helpDeskNewCommentOwner has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static function helpDeskNewCommentOwner(Vtiger_Record_Model $recordModel)
                {
                    \App\Log::trace('Entering helpDeskNewCommentOwner');
                    $relatedToId = $recordModel->get('related_to');
                    $result = (new \App\Db\Query())->select(['smownerid'])->from('vtiger_crmentity')->where(['deleted' => 0, 'crmid' => $relatedToId])->scalar();
            Severity: Minor
            Found in modules/HelpDesk/workflows/HelpDeskWorkflow.php - About 1 hr to fix

              Method transformInventoryForImport has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function transformInventoryForImport($inventoryData)
                  {
                      $inventoryModel = Vtiger_Inventory_Model::getInstance($this->module);
                      $inventoryFields = $inventoryModel->getFields();
                      $maps = $inventoryModel->getAutoCompleteFields();
              Severity: Minor
              Found in modules/Import/actions/Data.php - About 1 hr to fix

                Method getById has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getById($id)
                    {
                        $this->getStatuses();
                        $projects = $this->getProject($id);
                        $title = '';
                Severity: Minor
                Found in modules/Project/models/Gantt.php - About 1 hr to fix

                  Method createQuery has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function createQuery(): void
                      {
                          $this->isUserPermissions = \Api\WebservicePremium\Privilege::USER_PERMISSIONS === $this->getPermissionType();
                          if ($this->isUserPermissions) {
                              parent::createQuery();
                  Severity: Minor
                  Found in api/webservice/WebservicePremium/Products/RecordsTree.php - About 1 hr to fix

                    Method post has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function post()
                        {
                            $relatedModule = 'Approvals';
                            $referenceFieldModel = null;
                            $queryGenerator = (new \App\QueryGenerator($this->controller->request->getModule()));
                    Severity: Minor
                    Found in api/webservice/ManageConsents/BaseModule/GetConsentsForEntry.php - About 1 hr to fix

                      Function reActivateHiddenFields has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              reActivateHiddenFields: function (blockId, fields) {
                                  let progressIndicatorElement = $.progressIndicator({
                                          position: 'html',
                                          blockInfo: {
                                              enabled: true

                        Function registerStep1 has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                registerStep1(container, blockId) {
                                    const thisInstance = this;
                                    container.find('.js-next-button').on('click', (e) => {
                                        let selectedModule = this.container.find('[name="layoutEditorModules"]').val();
                                        let type = container.find('select.type').val();

                          Function registerAllStatuses has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  registerAllStatuses: function (content) {
                                      var thisInstance = this;
                                      content.find('button.all-statuses').on('click', function () {
                                          var status = thisInstance.allStatuses ? 0 : 1;
                                          AppConnector.request({

                            Function saveFieldValues has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    saveFieldValues: function (fieldDetailList) {
                                        var aDeferred = $.Deferred();
                                        var thisInstance = this;
                                        var lock = false;
                                        var recordId = this.getRecordId();
                            Severity: Minor
                            Found in public_html/layouts/basic/modules/Users/resources/Detail.js - About 1 hr to fix

                              Function registerAddSystemFieldEvent has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      registerAddSystemFieldEvent() {
                                          let contents = this.container.find('.contents');
                                          contents.find('.js-add-system-field').on('click', (e) => {
                                              let blockId = $(e.currentTarget).closest('.editFieldsTable').data('blockId');
                                              let selectedModule = this.container.find('[name="layoutEditorModules"]').val();

                                Function initEditLang has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    initEditLang: function (position) {
                                        App.Fields.Picklist.changeSelectElementView($('.LangManagement .layoutContent .active .select2'), 'select2').on(
                                            'change',
                                            function (e) {
                                                e = jQuery(this).closest('.active');

                                  Function registerModalSubmitEvent has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          registerModalSubmitEvent(container) {
                                              let thisInstance = this;
                                              $('form', this.$editModal)
                                                  .add($('form', this.$duplicateModal))
                                                  .on('submit', (e) => {

                                    Function validateName has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            validateName: function (data) {
                                                let thisInstance = this;
                                                let aDeferred = jQuery.Deferred();
                                    
                                                let name = data.name;

                                      Function registerCopyClipboard has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              registerCopyClipboard: function (editViewForm) {
                                                  for (let i in this.clipBoardInstances) {
                                                      this.clipBoardInstances[i].destroy();
                                                  }
                                                  this.clipBoardInstances[0] = new ClipboardJS('#customVariableCopy', {

                                        Function addTaxDetails has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                addTaxDetails: function (details) {
                                                    let container = jQuery('#TaxCalculationsContainer'),
                                                        taxTable;
                                        
                                                    //Based on tax type, we will add the tax details row
                                        Severity: Minor
                                        Found in public_html/layouts/basic/modules/Settings/Vtiger/resources/Tax.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language