YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method testIncrementNumberDay has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testIncrementNumberDay()
    {
        $parts = explode('-', RecordNumber::$dates[0]);
        $actualNumber = 1;
        $prefix = '{{YYYY}}-{{MM}}-{{DD}}/';
Severity: Minor
Found in tests/Base/Z_ResetingRecordNumber.php - About 1 hr to fix

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

        public function process()
        {
            $data = [];
            [$relationId, $fields, $conditions, $limit, $orderBy, $relConditions] = array_pad($this->params, 6, '');
            if (is_numeric($relationId)) {
    Severity: Minor
    Found in app/TextParser/RelatedRecordsData.php - About 1 hr to fix

      Method htmlTruncateByWords has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function htmlTruncateByWords(string $html, int $length = 0, string $ending = '...'): string
          {
              if (!$length) {
                  $length = Config::main('listview_max_textlength');
              }
      Severity: Minor
      Found in app/TextUtils.php - About 1 hr to fix

        Method init has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private static function init(string $type)
            {
                if (\App\Config::main('site_URL')) {
                    static::$crmUrl = \App\Config::main('site_URL');
                } elseif (isset(\App\Process::$requestMode) && 'Install' === \App\Process::$requestMode) {
        Severity: Minor
        Found in app/Utils/ConfReport.php - About 1 hr to fix

          Method getGroups has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getGroups($addBlank = true, $private = '')
              {
                  \App\Log::trace("Entering getGroups($addBlank,$private) method ...");
                  $moduleName = '';
                  if ('Settings' !== \App\Request::_get('parent') && $this->moduleName) {
          Severity: Minor
          Found in app/Fields/Owner.php - About 1 hr to fix

            Method findRecordByEmail has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function findRecordByEmail($value, array $allowedModules = [], array $skipModules = [])
                {
                    $db = \App\Db::getInstance();
                    $rows = $fields = [];
                    $dataReader = (new \App\Db\Query())->select(['vtiger_field.columnname', 'vtiger_field.tablename', 'vtiger_field.fieldlabel', 'vtiger_field.tabid', 'vtiger_tab.name'])
            Severity: Minor
            Found in app/Integrations/Dav/Calendar.php - About 1 hr to fix

              Method setValuesForRecord has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function setValuesForRecord(\Vtiger_Record_Model $record): void
                  {
                      $this->record = $record;
                      if (isset($this->card->N)) {
                          $head = $this->card->N->getParts();
              Severity: Minor
              Found in app/Integrations/Dav/Card.php - About 1 hr to fix

                Method enableOrDisableValuesForRole has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function enableOrDisableValuesForRole($picklistFieldName, $valuesToEnables, $valuesToDisable, $roleIdList)
                    {
                        $db = App\Db::getInstance();
                        $picklistId = (new App\Db\Query())->select(['picklistid'])->from('vtiger_picklist')
                            ->where(['name' => $picklistFieldName])->scalar();
                Severity: Minor
                Found in modules/Settings/Picklist/models/Module.php - About 1 hr to fix

                  Method getListViewEntries has 42 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/WebserviceUsers/models/ListView.php - About 1 hr to fix

                    Method getLastCronIteration has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getLastCronIteration()
                        {
                            $result = [];
                            $totalDiff = $finalLastStart = $finalLastEnd = $finishedTasks = 0;
                            $timedout = false;
                    Severity: Minor
                    Found in modules/Settings/CronTasks/models/Module.php - About 1 hr to fix

                      Method getDefaultUserId has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function getDefaultUserId($widgetModel, $moduleName = false, $owner = false)
                          {
                              \App\Log::trace('Entering ' . __METHOD__);
                              $currentUser = \App\User::getCurrentUserModel();
                              $user = '';
                      Severity: Minor
                      Found in modules/Settings/WidgetsManagement/models/Module.php - About 1 hr to fix

                        Method compare has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function compare(App\Request $request): array
                            {
                                $this->parseCsv->heading = false;
                                $this->parseCsv->auto($this->path);
                                $this->storage = $request->getInteger('storage');
                        Severity: Minor
                        Found in modules/Products/models/Stocktaking.php - About 1 hr to fix

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

                              public function saveToDb()
                              {
                                  $db = \App\Db::getInstance();
                                  $fileNameByField = 'filename';
                                  if ('I' === $this->get('filelocationtype')) {
                          Severity: Minor
                          Found in modules/Documents/models/Record.php - About 1 hr to fix

                            Method getParentSales has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getParentSales($id, &$parentSSalesProcesses, &$encounteredSalesProcesses, $depthBase = 0)
                                {
                                    \App\Log::trace('Entering getParentSales(' . $id . ') method ...');
                            
                                    if ($depthBase == App\Config::module('SSalesProcesses', 'MAX_HIERARCHY_DEPTH')) {
                            Severity: Minor
                            Found in modules/SSalesProcesses/SSalesProcesses.php - About 1 hr to fix

                              Method getLeadsByIndustry has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getLeadsByIndustry($owner, $dateFilter)
                                  {
                                      $query = new \App\Db\Query();
                                      $query->select([
                                          'industryid' => 'vtiger_industry.industryid',
                              Severity: Minor
                              Found in modules/Leads/dashboards/LeadsByIndustry.php - About 1 hr to fix

                                Method getStructure has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function getStructure()
                                    {
                                        if (!empty($this->structuredValues)) {
                                            return $this->structuredValues;
                                        }
                                Severity: Minor
                                Found in modules/Vtiger/models/QuickCreateRecordStructure.php - About 1 hr to fix

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

                                      public function process(App\Request $request)
                                      {
                                          $moduleName = $request->getModule();
                                          $recordIds = self::getRecordsListFromRequest($request);
                                          $skipped = [];
                                  Severity: Minor
                                  Found in modules/Vtiger/actions/MassState.php - About 1 hr to fix

                                    Method getOwners has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function getOwners(App\Request $request): void
                                        {
                                            if (!App\Config::performance('SEARCH_OWNERS_BY_AJAX')) {
                                                throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);
                                            }
                                    Severity: Minor
                                    Found in modules/Vtiger/actions/Fields.php - About 1 hr to fix

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

                                          public function process(App\Request $request, $widget = null)
                                          {
                                              $currentUser = Users_Record_Model::getCurrentUserModel();
                                              $viewer = $this->getViewer($request);
                                              $moduleName = $request->getModule();
                                      Severity: Minor
                                      Found in modules/Vtiger/dashboards/Rss.php - About 1 hr to fix

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

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