YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method addRelation has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function addRelation($sourceRecordId, $destinationRecordId, $params = false)
    {
        $return = false;
        if (!\is_array($destinationRecordId)) {
            $destinationRecordId = [$destinationRecordId];
Severity: Minor
Found in modules/OSSMailView/models/Relation.php - About 1 hr to fix

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

        public function process(App\Request $request)
        {
            $moduleName = $request->getModule();
            $nameFiles = $request->getArray('nameFile', 'Text');
            $ids = [];
    Severity: Minor
    Found in modules/Documents/actions/MassAdd.php - About 1 hr to fix

      Method entityAfterSave has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function entityAfterSave(App\EventHandler $eventHandler)
          {
              $recordModel = $eventHandler->getRecordModel();
              if ($recordModel->isNew()) {
                  (new \App\BatchMethod(['method' => 'Project_Module_Model::updateProgress', 'params' => [$recordModel->get('projectmilestoneid')]]))->save();
      Severity: Minor
      Found in modules/ProjectTask/handlers/ProjectTaskHandler.php - About 1 hr to fix

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

            public function process(App\Request $request)
            {
                $moduleName = $request->getModule();
                $srecord = $request->getInteger('srecord');
                $smodule = $request->getByType('smodule');
        Severity: Minor
        Found in modules/OSSMailView/views/Widget.php - About 1 hr to fix

          Method getSearchViewList has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function getSearchViewList($moduleName, $cvId, $fieldName = 'id'): array
              {
                  $queryGenerator = new App\QueryGenerator($moduleName);
                  $queryGenerator->initForCustomViewById($cvId);
          
          
          Severity: Minor
          Found in modules/Vtiger/uitypes/SharedOwner.php - About 1 hr to fix

            Method getDbConditionBuilderValue has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getDbConditionBuilderValue($value, string $operator)
                {
                    $values = [];
                    if (!\is_array($value)) {
                        $value = $value ? explode('##', $value) : [];
            Severity: Minor
            Found in modules/Vtiger/uitypes/Owner.php - About 1 hr to fix

              Method duplicateValueFromRecord has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function duplicateValueFromRecord(&$value, App\Request $request): bool
                  {
                      $fieldName = $this->getFieldModel()->getName();
                      $recordModel = Vtiger_Record_Model::getInstanceById($request->getInteger('_duplicateRecord'), $request->getModule());
                      $copyValue = $recordModel->get($fieldName);
              Severity: Minor
              Found in modules/Vtiger/uitypes/MultiAttachment.php - About 1 hr to fix

                Method getWatchingUsers has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getWatchingUsers($restrictUsers = [])
                    {
                        if (!$this->watchingUsers) {
                            $users = $this->getModuleUsers();
                            if ($this->has('record')) {
                Severity: Minor
                Found in modules/Vtiger/models/Watchdog.php - About 1 hr to fix

                  Method getRecordsListFromRequest has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getRecordsListFromRequest(App\Request $request)
                      {
                          $cvId = $request->getByType('cvid', 2);
                          $selectedIds = $request->getArray('selected_ids', 2);
                          $excludedIds = $request->getArray('excluded_ids', 2);
                  Severity: Minor
                  Found in modules/Vtiger/views/IndexAjax.php - About 1 hr to fix

                    Method showAdvancedSearch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function showAdvancedSearch(App\Request $request)
                        {
                            if (!\App\User::getCurrentUserModel()->getRoleInstance()->get('globalsearchadv')) {
                                throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);
                            }
                    Severity: Minor
                    Found in modules/Vtiger/views/BasicAjax.php - About 1 hr to fix

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

                          public function process(App\Request $request)
                          {
                              $ajax = $request->isAjax();
                              $moduleName = $request->getModule();
                              $this->viewName = $request->has('viewName') ? $request->getByType('viewName', \App\Purifier::ALNUM) : App\CustomView::getInstance($moduleName)->getViewId();
                      Severity: Minor
                      Found in modules/Vtiger/views/Kanban.php - About 1 hr to fix

                        Method getAdvftCriteria has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getAdvftCriteria(CustomView $cv)
                            {
                                $columnindex = 0;
                                $advft_criteria = [];
                                $i = 1;
                        Severity: Minor
                        Found in modules/Vtiger/filters/Basic.php - About 1 hr to fix

                          Method editViewPreSave has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function editViewPreSave(App\EventHandler $eventHandler)
                              {
                                  $recordModel = $eventHandler->getRecordModel();
                                  $response = ['result' => true];
                                  $values = [];
                          Severity: Minor
                          Found in modules/Contacts/handlers/DuplicateEmail.php - About 1 hr to fix

                            Method debugRequest has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function debugRequest(): void
                                {
                                    if (\App\Config::debug('apiLogAllRequests')) {
                                        $log = '============ Request ' . \App\RequestUtil::requestId() . ' (Controller) ======  ' . date('Y-m-d H:i:s') . "  ======\n";
                                        $log .= 'REQUEST_METHOD: ' . \App\Request::getRequestMethod() . PHP_EOL;
                            Severity: Minor
                            Found in api/webservice/Controller.php - About 1 hr to fix

                              Method getEntity has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getEntity()
                                  {
                                      $dataReader = $this->getQuery()->createCommand()->query();
                                      $result = [];
                                      $moduleModel = Vtiger_Module_Model::getInstance($this->getModuleName());
                              Severity: Minor
                              Found in modules/Reservations/models/Calendar.php - About 1 hr to fix

                                Function updateCustomView has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        updateCustomView: function (target) {
                                            const thisInstance = this;
                                            let params = {},
                                                relatedModule = $(target).closest('.relatedModule'),
                                                progressIndicatorElement = $.progressIndicator({

                                  Function registerGlobalPermissionActionsEvent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      registerGlobalPermissionActionsEvent: function () {
                                          var editAllAction = jQuery('[name="editall"]').filter(':checkbox');
                                          var viewAllAction = jQuery('[name="viewall"]').filter(':checkbox');
                                  
                                          if (editAllAction.is(':checked')) {

                                    Function updateModuleStatus has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            updateModuleStatus: function (currentTarget) {
                                                var aDeferred = jQuery.Deferred();
                                                var forModule = currentTarget.data('module');
                                                var status = currentTarget.is(':checked');
                                    
                                    

                                      Function registerAddModal has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              registerAddModal() {
                                                  $('.js-add-board').on('click', (e) => {
                                                      app.showModalWindow(
                                                          null,
                                                          'index.php?module=Kanban&parent=Settings&view=AddModal&sourceModule=' + this.module,

                                        Function registerBuyModalForms has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            registerBuyModalForms(companyForm, buyForm) {
                                                if (companyForm.validationEngine('validate') === true) {
                                                    let formData = companyForm.serializeFormData();
                                                    const progressIndicatorElement = $.progressIndicator({
                                                        blockInfo: { enabled: true }
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language