YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

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

    public function getMapping($editable = false)
    {
        if (empty($this->mapping)) {
            $query = (new \App\Db\Query())->from('vtiger_convertleadmapping');
            if ($editable) {
Severity: Minor
Found in modules/Settings/Leads/models/Mapping.php - About 1 hr to fix

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

        public function getDisplayValue(string $key)
        {
            $value = $this->get($key);
            switch ($key) {
                case 'default':
    Severity: Minor
    Found in modules/Settings/MailSmtp/models/Record.php - About 1 hr to fix

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

          public function createStep2(App\Request $request)
          {
              $viewer = $this->getViewer($request);
              $moduleName = $request->getModule();
              $qualifiedModuleName = $request->getModule(false);
      Severity: Minor
      Found in modules/Settings/Widgets/views/Widget.php - About 1 hr to fix

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

            public function saveToDb()
            {
                $db = \App\Db::getInstance('admin');
                $tablesData = $this->getValuesForSave();
                $transaction = $db->beginTransaction();
        Severity: Minor
        Found in modules/Settings/PickListDependency/models/Record.php - About 1 hr to fix

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

              public function updateMenu(App\Request $request)
              {
                  $data = $request->getMultiDimensionArray('mdata', [
                      'id' => 'Integer',
                      'type' => 'Alnum',
          Severity: Minor
          Found in modules/Settings/Menu/actions/SaveAjax.php - About 1 hr to fix

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

                public static function validate(array $data): array
                {
                    if (isset($data['id'])) {
                        $data['id'] = \App\Purifier::purifyByType($data['id'], 'Integer');
                    }
            Severity: Minor
            Found in modules/Settings/BusinessHours/models/Record.php - About 1 hr to fix

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

                  public function getListViewEntries($pagingModel)
                  {
                      $moduleModel = $this->getModule();
                      $moduleName = $moduleModel->getName();
                      $parentModuleName = $moduleModel->getParentName();
              Severity: Minor
              Found in modules/Settings/BusinessHours/models/ListView.php - About 1 hr to fix

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

                    public function process(App\Request $request)
                    {
                        $supportedModules = Settings_RecordNumbering_Module_Model::getSupportedModules();
                        $sourceModule = $request->getByType('sourceModule', 2);
                        $valueParam = $request->getByType('picklist', \App\Purifier::TEXT);
                Severity: Minor
                Found in modules/Settings/RecordNumbering/views/Advanced.php - About 1 hr to fix

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

                      public static function getAll($moduleName = '')
                      {
                          $query = (new App\Db\Query())->from('com_vtiger_workflow_tasktypes');
                          $dataReader = $query->createCommand()->query();
                          while ($rawData = $dataReader->read()) {
                  Severity: Minor
                  Found in modules/com_vtiger_workflow/VTTaskType.php - About 1 hr to fix

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

                        public function getSideBarLinks($linkParams)
                        {
                            $links = Vtiger_Link_Model::getAllByType($this->getId(), ['SIDEBARLINK', 'SIDEBARWIDGET'], $linkParams);
                            $links['SIDEBARLINK'][] = Vtiger_Link_Model::getInstanceFromValues([
                                'linktype' => 'SIDEBARLINK',
                    Severity: Minor
                    Found in modules/Calendar/models/Module.php - About 1 hr to fix

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

                          public static function getAllParentComments(int $parentId, string $moduleName, array $hierarchy = [], Vtiger_Paging_Model $pagingModel = null)
                          {
                              $queryGenerator = new \App\QueryGenerator('ModComments');
                              $queryGenerator->setFields(array_merge(array_keys(\App\Field::getModuleFieldInfosByPresence('ModComments')), ['id']));
                              $queryGenerator->setSourceRecord($parentId);
                      Severity: Minor
                      Found in modules/ModComments/models/Record.php - About 1 hr to fix

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

                            public function getInventoryChanges()
                            {
                                if (!isset($this->inventoryChanges)) {
                                    $changes = [];
                                    if ($this->isCreate() || $this->isUpdate() || $this->isTransferEdit()) {
                        Severity: Minor
                        Found in modules/ModTracker/models/Record.php - About 1 hr to fix

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

                              public function getQueryByModuleField($sourceModule, $field, $record, App\QueryGenerator $queryGenerator)
                              {
                                  if (!empty($record) && \in_array($sourceModule, ['Campaigns', 'Products', 'Services'])) {
                                      switch ($sourceModule) {
                                          case 'Campaigns':
                          Severity: Minor
                          Found in modules/Leads/models/Module.php - About 1 hr to fix

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

                                public static function getRecurringInfo($value)
                                {
                                    $result = [];
                                    if ($value) {
                                        $values = explode(';', $value);
                            Severity: Minor
                            Found in modules/Vtiger/uitypes/Recurrence.php - About 1 hr to fix

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

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

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

                                    public function saveField(Vtiger_Basic_InventoryField $fieldModel): bool
                                    {
                                        $db = \App\Db::getInstance();
                                        $tableName = $this->getTableName();
                                        if (!$fieldModel->has('sequence')) {
                                Severity: Minor
                                Found in modules/Vtiger/models/Inventory.php - About 1 hr to fix

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

                                      public static function getConfig($process, $type, $procesParam = false)
                                      {
                                          \App\Log::trace('Start ' . __METHOD__ . " | Process: $process, Type: $type");
                                          $processList = [
                                              'marketing' => 'yetiforce_proc_marketing',
                                  Severity: Minor
                                  Found in modules/Vtiger/models/Processes.php - About 1 hr to fix

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

                                        private function getRecords()
                                        {
                                            $selectedRecords = $this->getSelectedRecords();
                                            $isDeletable = $this->isDeletable();
                                            if (2 == $this->getRelationType()) {
                                    Severity: Minor
                                    Found in modules/Vtiger/models/TreeCategoryModal.php - About 1 hr to fix

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

                                          public function showMassEditForm(App\Request $request)
                                          {
                                              $moduleName = $request->getModule();
                                              $viewer = $this->getViewer($request);
                                              $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
                                      Severity: Minor
                                      Found in modules/Vtiger/views/MassActionAjax.php - About 1 hr to fix

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

                                            public function getListViewCount(App\Request $request)
                                            {
                                                $moduleName = $request->getModule();
                                                if (!$this->listViewModel) {
                                                    $cvId = App\CustomView::getInstance($moduleName)->getViewId();
                                        Severity: Minor
                                        Found in modules/Vtiger/views/ListAjax.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language