YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

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

    public function row(App\Request $request): void
    {
        $sourceModuleName = $request->getByType('sourceModuleName', \App\Purifier::ALNUM);
        $sourceField = $request->getByType('sourceField', \App\Purifier::ALNUM);
        $sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModuleName);
Severity: Minor
Found in modules/Settings/PickListDependency/views/ConditionBuilder.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)
        {
            $fields = Settings_MailIntegration_ConfigForm_Model::getFields($request->getModule(false));
            $field = $request->getByType('updateField');
            if (!isset($fields[$field])) {
    Severity: Minor
    Found in modules/Settings/MailIntegration/actions/SaveConfigForm.php - About 1 hr to fix

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

          public function getNextTriggerTimeForMonthlyByDate($scheduledDayOfMonth, $scheduledTime)
          {
              $currentDayOfMonth = date('j', time());
              if ($scheduledDayOfMonth) {
                  $scheduledDaysOfMonth = \App\Json::decode($scheduledDayOfMonth);
      Severity: Minor
      Found in modules/com_vtiger_workflow/Workflow.php - About 1 hr to fix

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

            public static function getCalendarState($data = [])
            {
                if ($data) {
                    $activityStatus = $data['activitystatus'];
                    if (\in_array($activityStatus, self::getComponentActivityStateLabel('history'))) {
        Severity: Minor
        Found in modules/Calendar/models/Module.php - About 1 hr to fix

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

              public static function getExternalUrl($moduleName = false, $record = false, $view = false, $type = false): string
              {
                  $url = 'mailto:';
                  $request = new App\Request([]);
                  if ($moduleName) {
          Severity: Minor
          Found in modules/OSSMail/models/Module.php - About 1 hr to fix

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

                public function getChatConfig(App\Request $request)
                {
                    $userRealID = \App\User::getCurrentUserRealId();
                    $userRoomPin = \App\Config::module('Chat', 'userRoomPin');
                    if (!$userRoomPin) {
            Severity: Minor
            Found in modules/Chat/actions/ChatAjax.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)
                  {
                      $viewer = $this->getViewer($request);
                      $moduleName = $request->getModule();
                      $widget = Vtiger_Widget_Model::getInstance($request->getInteger('linkid'), \App\User::getCurrentUserId());
              Severity: Minor
              Found in modules/ProjectTask/dashboards/CompletedProjectTasks.php - About 1 hr to fix

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

                    public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
                    {
                        if (empty($value)) {
                            return '';
                        }
                Severity: Minor
                Found in modules/Vtiger/uitypes/Multiowner.php - About 1 hr to fix

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

                      public function getApiDisplayValue($value, Vtiger_Record_Model $recordModel, array $params = [])
                      {
                          $value = \App\Json::decode($value);
                          if (!$value || !\is_array($value)) {
                              return [];
                  Severity: Minor
                  Found in modules/Vtiger/uitypes/MultiAttachment.php - About 1 hr to fix

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

                        protected function normalizeData()
                        {
                            foreach ($this->data as &$dividing) {
                                foreach ($dividing as $groupValueKey => &$values) {
                                    // iterate data one more time to search other group values
                    Severity: Minor
                    Found in modules/Vtiger/models/ChartFilter.php - About 1 hr to fix

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

                          public function getAddRelationLinks(): array
                          {
                              $relationModelInstance = $this->getRelationModel();
                              if (!$relationModelInstance->isAddActionSupported() || $this->getParentRecordModel()->isReadOnly()) {
                                  return [];
                      Severity: Minor
                      Found in modules/Vtiger/models/RelationListView.php - About 1 hr to fix

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

                            public function save()
                            {
                                $eventHandler = $this->getEventHandler();
                                if ($this->getHandlerExceptions()) {
                                    $eventHandler->setExceptions($this->getHandlerExceptions());
                        Severity: Minor
                        Found in modules/Vtiger/models/Record.php - About 1 hr to fix

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

                              public function getImage()
                              {
                                  $image = [];
                                  if (!$this->isEmpty('imagename') && \App\Json::isJson($this->get('imagename')) && !\App\Json::isEmpty($this->get('imagename'))) {
                                      $image = \App\Json::decode($this->get('imagename'));
                          Severity: Minor
                          Found in modules/Vtiger/models/Record.php - About 1 hr to fix

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

                                public function sanitizeInventoryValue($value, $columnName): string
                                {
                                    if ($field = $this->inventoryFields[$columnName] ?? false) {
                                        if (\in_array($field->getType(), ['Name', 'Reference'])) {
                                            $value = trim($value);
                            Severity: Minor
                            Found in modules/Vtiger/models/ExportToXml.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 = $this->record->getModuleName();
                                      $dateTime = $request->getByType('dateTime', 'dateTimeInUserFormat');
                                      $dateTime = \App\Fields\DateTime::formatToDb($dateTime);
                              Severity: Minor
                              Found in modules/Vtiger/views/RecordActivity.php - About 1 hr to fix

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

                                    protected function convert(array $entries): array
                                    {
                                        $columns = array_keys($this->columns);
                                        $fieldName = $this->fieldModel->getName();
                                        $columnCounter = $records = $sum = [];
                                Severity: Minor
                                Found in modules/Vtiger/views/Kanban.php - About 1 hr to fix

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

                                      public function setDataFromRequest(App\Request $request)
                                      {
                                          if ($request->has('xmlExportType')) {
                                              $this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
                                          }
                                  Severity: Minor
                                  Found in modules/Vtiger/actions/QuickExportData.php - About 1 hr to fix

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

                                        public function getRelationPagination(App\Request $request)
                                        {
                                            $viewer = $this->getViewer($request);
                                            $pageNumber = $request->getInteger('page');
                                            $moduleName = $request->getModule();
                                    Severity: Minor
                                    Found in modules/Vtiger/views/Pagination.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)
                                          {
                                              $records = $request->getArray('records', 'Integer');
                                              $moduleName = $request->getModule();
                                              $template = $request->getInteger('template');
                                      Severity: Minor
                                      Found in modules/Vtiger/actions/GenerateRecords.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();
                                                $viewId = $entityState = false;
                                                $selectedIds = $request->getArray('selected_ids', 2);
                                        Severity: Minor
                                        Found in modules/Vtiger/views/Export.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language