YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method getRelatedSummary has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getRelatedSummary(App\Db\Query $query)
    {
        $totalTime = $query->limit(null)->orderBy('')->sum('vtiger_osstimecontrol.sum_time');

        $userTime = [
Severity: Minor
Found in modules/OSSTimeControl/models/Module.php - About 1 hr to fix

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

        public function getLinks(): array
        {
            $relatedLink = parent::getLinks();
            if (!$this->getParentRecordModel()->isReadOnly()) {
                $relationModelInstance = $this->getRelationModel();
    Severity: Minor
    Found in modules/Occurrences/models/RelationListView.php - About 1 hr to fix

      Method send has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function send(App\Request $request)
          {
              $roomType = $request->getByType('roomType');
              $recordId = $request->getInteger('recordId');
              $chat = \App\Chat::getInstance($roomType, $recordId);
      Severity: Minor
      Found in modules/Chat/actions/ChatAjax.php - About 1 hr to fix

        Method moduleHandler has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function moduleHandler($moduleName, $eventType)
            {
                require_once 'include/utils/CommonUtils.php';
                require_once 'include/fields/DateTimeField.php';
                require_once 'include/fields/DateTimeRange.php';
        Severity: Minor
        Found in modules/ApiAddress/ApiAddress.php - About 1 hr to fix

          Method findRecordsById has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function findRecordsById($ids)
              {
                  $return = false;
                  if (!empty($ids)) {
                      $recordModelMailScanner = Vtiger_Record_Model::getCleanInstance('OSSMailScanner');
          Severity: Minor
          Found in modules/OSSMailView/models/Record.php - About 1 hr to fix

            Method getDetailViewLinks has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getDetailViewLinks(array $linkParams): array
                {
                    if ($this->getRecord()->isReadOnly() || \App\RequestUtil::getBrowserInfo()->ie) {
                        return parent::getDetailViewLinks($linkParams);
                    }
            Severity: Minor
            Found in modules/KnowledgeBase/models/DetailView.php - About 1 hr to fix

              Method trackRelation has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function trackRelation($sourceModule, $sourceId, $targetModule, $targetId, $type)
                  {
                      $db = App\Db::getInstance();
                      $currentUser = Users_Record_Model::getCurrentUserModel();
                      $currentTime = date('Y-m-d H:i:s');
              Severity: Minor
              Found in modules/ModTracker/ModTracker.php - About 1 hr to fix

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

                    public function validate($value, $isUserFormat = false)
                    {
                        if (empty($value)) {
                            return;
                        }
                Severity: Minor
                Found in modules/Vtiger/uitypes/MultiCurrency.php - About 1 hr to fix

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

                      public function getApiDisplayValue($value, Vtiger_Record_Model $recordModel, array $params = [])
                      {
                          $return = [];
                          if ($recordModel && !empty($value)) {
                              if ('I' === $recordModel->getValueByField('filelocationtype')) {
                  Severity: Minor
                  Found in modules/Vtiger/uitypes/DocumentsFileUpload.php - About 1 hr to fix

                    Method getValueToExport has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getValueToExport($value, int $recordId)
                        {
                            $multiMode = 'multiImage' === $this->getFieldModel()->getFieldDataType();
                            if (\is_string($value)) {
                                $value = \App\Json::isEmpty($value) ? [] : \App\Json::decode($value);
                    Severity: Minor
                    Found in modules/Vtiger/uitypes/MultiImage.php - About 1 hr to fix

                      Method getProgressHeader has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getProgressHeader(Vtiger_Record_Model $recordModel): array
                          {
                              $fieldModel = $this->getFieldModel();
                              $fieldName = $fieldModel->getName();
                              $moduleName = $fieldModel->getModuleName();
                      Severity: Minor
                      Found in modules/Vtiger/uitypes/Picklist.php - About 1 hr to fix

                        Method checkPwd has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function checkPwd(string $value)
                            {
                                $conf = Settings_Password_Record_Model::getUserPassConfig();
                                $fieldConfig = $this->getFieldModel()->getFieldParams()['validate'] ?? [];
                                $notice = [];
                        Severity: Minor
                        Found in modules/Vtiger/uitypes/Password.php - About 1 hr to fix

                          Method getBasicLinks has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getBasicLinks()
                              {
                                  $basicLinks = [];
                                  $moduleModel = $this->getModule();
                          
                          
                          Severity: Minor
                          Found in modules/Vtiger/models/ListView.php - About 1 hr to fix

                            Method deleteField has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function deleteField(string $fieldName): bool
                                {
                                    $db = \App\Db::getInstance();
                                    $dbCommand = $db->createCommand();
                                    $transaction = $db->beginTransaction();
                            Severity: Minor
                            Found in modules/Vtiger/models/Inventory.php - About 1 hr to fix

                              Method getEntries has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getEntries(): array
                                  {
                                      $entries = [];
                                      $addInventoryData = $this->fullData && $this->moduleInstance->isInventory();
                                      if ($addInventoryData) {
                              Severity: Minor
                              Found in modules/Vtiger/models/ExportToCsv.php - About 1 hr to fix

                                Method processWizard has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function processWizard(App\Request $request)
                                    {
                                        $moduleName = $request->getModule();
                                        $recordModel = $this->record->getRecord();
                                        $processWizardModel = Vtiger_ProcessWizard_Model::getInstance($recordModel);
                                Severity: Minor
                                Found in modules/Vtiger/views/Detail.php - About 1 hr to fix

                                  Method showRecentComments has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function showRecentComments(App\Request $request)
                                      {
                                          if (!\App\Privilege::isPermitted('ModComments')) {
                                              throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);
                                          }
                                  Severity: Minor
                                  Found in modules/Vtiger/views/Detail.php - About 1 hr to fix

                                    Method putDataIntoSpreadsheet has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function putDataIntoSpreadsheet(Vtiger_Field_Model $fieldModel, $value, int $id)
                                        {
                                            switch ($fieldModel->getFieldDataType()) {
                                                case 'integer':
                                                case 'double':
                                    Severity: Minor
                                    Found in modules/Vtiger/models/ExportToSpreadsheet.php - About 1 hr to fix

                                      Method showDiscounts has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function showDiscounts(App\Request $request)
                                          {
                                              $moduleName = $request->getModule();
                                              $discountType = $request->getInteger('discountType');
                                              $currency = $request->getInteger('currency');
                                      Severity: Minor
                                      Found in modules/Vtiger/views/Inventory.php - About 1 hr to fix

                                        Method showRelatedProductsServices has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function showRelatedProductsServices(App\Request $request)
                                            {
                                                $recordId = $request->getInteger('record');
                                                $moduleName = $request->getModule();
                                                $recordModel = $this->record->getRecord();
                                        Severity: Minor
                                        Found in modules/Vtiger/views/Detail.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language