YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

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

    public function process(OSSMail_Mail_Model $mail)
    {
        $mailId = $mail->getMailCrmId();
        $returnIds = [];
        if (!$mailId) {
Severity: Minor
Found in modules/OSSMailScanner/scanneractions/BindServiceContracts.php - About 1 hr to fix

    Method updateRecords has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function updateRecords($recordModel, $relatedData, $fieldValue)
        {
            $relatedModuleName = $relatedData[0];
            $relatedFieldName = $relatedData[1];
            $targetModel = Vtiger_RelationListView_Model::getInstance($recordModel, $relatedModuleName);
    Severity: Minor
    Found in modules/com_vtiger_workflow/tasks/VTUpdateRelatedFieldTask.php - About 1 hr to fix

      Method doTask has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function doTask($recordModel)
          {
              [$referenceField, $moduleName, $fieldName] = explode('::', $this->targetField);
              $relationFieldModel = $recordModel->getModule()->getFieldByName($referenceField);
              $ids = [];
      Severity: Minor
      Found in modules/com_vtiger_workflow/tasks/SumFieldFromDependent.php - About 1 hr to fix

        Method showSlaPolicyView has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function showSlaPolicyView(App\Request $request)
            {
                $moduleName = $request->getModule();
                $relatedModuleName = $request->getByType('target', \App\Purifier::ALNUM);
                $rows = \App\Utils\ServiceContracts::getSlaPolicyForServiceContracts($request->getInteger('record'), \App\Module::getModuleId($relatedModuleName));
        Severity: Minor
        Found in modules/ServiceContracts/views/Detail.php - About 1 hr to fix

          Method importICS has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function importICS(string $filePath)
              {
                  $userId = \App\User::getCurrentUserRealId();
                  $lastImport = new ICalLastImport();
                  $lastImport->clearRecords($userId);
          Severity: Minor
          Found in modules/Calendar/models/Module.php - About 1 hr to fix

            Method recordUpdate has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function recordUpdate(Vtiger_Record_Model $record, $cal)
                {
                    \App\Log::trace(__METHOD__ . ' | Start Cal ID:' . $cal['crmid']);
                    $calendar = \App\Integrations\Dav\Calendar::loadFromContent($cal['calendardata'], $record, $cal['uid']);
                    foreach ($calendar->getRecordInstance() as $recordModel) {
            Severity: Minor
            Found in modules/API/models/CalDAV.php - About 1 hr to fix

              Method process has 26 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/OSSTimeControl/dashboards/AllTimeControl.php - About 1 hr to fix

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

                    public function process()
                    {
                        $html = '';
                        $scheduleData = \Vtiger_Watchdog_Model::getWatchingModulesSchedule($this->textParser->getParam('userId'), true);
                        if (!$scheduleData) {
                Severity: Minor
                Found in modules/Notification/textparsers/Notifications.php - About 1 hr to fix

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

                      public function getQueryByModuleField($sourceModule, $field, $record, App\QueryGenerator $queryGenerator)
                      {
                          $supportedModulesList = [$this->getName(), 'Vendors', 'Leads', 'Accounts', 'PriceBooks'];
                          if (\in_array($sourceModule, $supportedModulesList) || Vtiger_Module_Model::getInstance($sourceModule)->isInventory()) {
                              $condition = ['and', ['vtiger_products.discontinued' => 1]];
                  Severity: Minor
                  Found in modules/Products/models/Module.php - About 1 hr to fix

                    Method getLinks has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getLinks(): array
                        {
                            $links = [];
                            if ($this->record->isEditable() && \App\Mail::checkInternalMailClient()) {
                                $links[] = Vtiger_Link_Model::getInstanceFromValues([
                    Severity: Minor
                    Found in modules/Calendar/views/ActivityStateModal.php - About 1 hr to fix

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

                          public function process(App\Request $request)
                          {
                              $moduleName = $request->getModule();
                              $viewer = $this->getViewer($request);
                              if ($request->has('record')) {
                      Severity: Minor
                      Found in modules/Calendar/views/EventForm.php - About 1 hr to fix

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

                            public function process()
                            {
                                \App\Log::trace('Start cron CalDAV');
                                if(!\App\YetiForce\Shop::check('YetiForceDav')){
                                    $this->logs = \App\YetiForce\Shop::checkAlert('YetiForceDav');
                        Severity: Minor
                        Found in modules/Calendar/crons/CalDav.php - About 1 hr to fix

                          Method getQueryGenerator has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function getQueryGenerator(string $moduleName, array $actions, array $dateRange, ?int $owner, ?int $historyOwner, ?Vtiger_Paging_Model $pagingModel = null): App\QueryGenerator
                              {
                                  $queryGenerator = (new \App\QueryGenerator($moduleName))
                                      ->setFields([])
                                      ->addJoin([
                          Severity: Minor
                          Found in modules/ModTracker/helpers/Updates.php - About 1 hr to fix

                            Method loadAnnouncements has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function loadAnnouncements()
                                {
                                    $queryGenerator = new \App\QueryGenerator($this->getName());
                                    $queryGenerator->setFields(['id', 'subject', 'description', 'assigned_user_id', 'createdtime', 'is_mandatory', 'interval']);
                                    $query = $queryGenerator->createQuery();
                            Severity: Minor
                            Found in modules/Announcements/models/Module.php - About 1 hr to fix

                              Method reviewChanges has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function reviewChanges(App\Request $request)
                                  {
                                      $moduleName = $request->getModule();
                                      $sourceModule = $request->getByType('sourceModule', 2);
                                      $request->set('module', $sourceModule);
                              Severity: Minor
                              Found in modules/ModTracker/actions/ChangesReviewedOn.php - About 1 hr to fix

                                Method getConvertLeadMappedField has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function getConvertLeadMappedField($fieldName, $moduleName)
                                    {
                                        $mappingFields = $this->get('mappingFields');
                                
                                        if (!$mappingFields) {
                                Severity: Minor
                                Found in modules/Leads/models/Record.php - About 1 hr to fix

                                  Method getTextParserDisplayValue has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

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

                                    Method getTreeList has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function getTreeList()
                                        {
                                            $tree = [];
                                            $lastId = 0;
                                            $dataReader = (new App\Db\Query())
                                    Severity: Minor
                                    Found in modules/Vtiger/models/TreeView.php - About 1 hr to fix

                                      Method calculateAverage has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          protected function calculateAverage()
                                          {
                                              if ('avg' === $this->valueType) {
                                                  foreach ($this->data as $dividingValue => &$dividing) {
                                                      foreach ($dividing as $groupValue => &$group) {
                                      Severity: Minor
                                      Found in modules/Vtiger/models/ChartFilter.php - About 1 hr to fix

                                        Method loadRowData has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function loadRowData(int $recordId, array $params = []): array
                                            {
                                                $recordModel = Vtiger_Record_Model::getInstanceById($recordId);
                                                $recordModuleName = $recordModel->getModuleName();
                                                $data = [
                                        Severity: Minor
                                        Found in modules/Vtiger/models/Inventory.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language