YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method getAdditionalButtons has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getAdditionalButtons(): array
    {
        $return = [];
        if (\App\Security\AdminAccess::isPermitted('RecordCollector')) {
            $return[] = \Vtiger_Link_Model::getInstanceFromValues([
Severity: Minor
Found in app/YetiForce/Shop/Product/YetiForceRcDkCvr.php - About 1 hr to fix

    Method getParticipants has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getParticipants()
        {
            if (empty($this->recordId) || empty($this->roomType)) {
                return [];
            }
    Severity: Minor
    Found in app/Chat.php - About 1 hr to fix

      Method initStorageFileDirectory has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function initStorageFileDirectory($suffix = false)
          {
              if (!$filepath = \App\Config::module($suffix, 'storagePath')) {
                  $filepath = 'storage' . \DIRECTORY_SEPARATOR;
              }
      Severity: Minor
      Found in app/Fields/File.php - About 1 hr to fix

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

            public function process(App\Request $request)
            {
                $qualifiedModuleName = $request->getModule(false);
                if (!$request->isEmpty('record', true)) {
                    $recordModel = Settings_TreesManager_Record_Model::getInstanceById($request->getInteger('record'));
        Severity: Minor
        Found in modules/Settings/TreesManager/actions/Save.php - About 1 hr to fix

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

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

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

                public function save()
                {
                    $ruleId = $this->getId();
                    $db = \App\Db::getInstance();
            
            
            Severity: Minor
            Found in modules/Settings/SharingAccess/models/Rule.php - About 1 hr to fix

              Method getInstance has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function getInstance($qualifiedId)
                  {
                      $idComponents = self::getIdComponentsFromQualifiedId($qualifiedId);
                      $type = $idComponents[0];
                      $memberId = $idComponents[1];
              Severity: Minor
              Found in modules/Settings/SharingAccess/models/RuleMember.php - About 1 hr to fix

                Method getTreeData has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function getTreeData(string $moduleName, array $folders, array $selectedFolders): array
                    {
                        $tree = $tempArray = [];
                        foreach (OSSMailScanner_Record_Model::$mainFolders as $mainFolder) {
                            $treeCategory = [
                Severity: Minor
                Found in modules/Settings/OSSMailScanner/views/Folders.php - About 1 hr to fix

                  Method getMissingSystemFields has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getMissingSystemFields(): array
                      {
                          $fields = $this->getFields();
                          $systemFields = \App\Field::SYSTEM_FIELDS;
                          $missingFields = [];
                  Severity: Minor
                  Found in modules/Settings/LayoutEditor/models/Module.php - About 1 hr to fix

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

                        public function process(App\Request $request)
                        {
                            $moduleName = $request->getModule();
                            $mailModuleActive = \App\Module::getModuleId('OSSMail');
                            $mailScannerRecordModel = Vtiger_Record_Model::getCleanInstance('OSSMailScanner');
                    Severity: Minor
                    Found in modules/Settings/OSSMailScanner/views/Index.php - About 1 hr to fix

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

                          public function validate($value, $isUserFormat = false)
                          {
                              $hashValue = \is_array($value) ? md5(print_r($value, true)) : $value;
                              if (isset($this->validate[$hashValue]) || empty($value)) {
                                  return;
                      Severity: Minor
                      Found in modules/Settings/Media/uitypes/Image.php - About 1 hr to fix

                        Method getHierarchyData has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getHierarchyData($id, $baseInfo, $recordId, &$listviewEntries, $getRawData = false, $getLinks = true)
                            {
                                $moduleName = 'Partners';
                                $currentUser = \App\User::getCurrentUserModel();
                                $hasRecordViewAccess = $currentUser->isAdmin() || \App\Privilege::isPermitted($moduleName, 'DetailView', $recordId);
                        Severity: Minor
                        Found in modules/Partners/Partners.php - About 1 hr to fix

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

                              public function doTask($recordModel)
                              {
                                  $entityId = $recordModel->getId();
                          
                                  $delta = $recordModel->getPreviousValue();
                          Severity: Minor
                          Found in modules/com_vtiger_workflow/tasks/VTUpdateCalendarDates.php - About 1 hr to fix

                            Method getHierarchyData has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getHierarchyData($id, $salesProcessesInfoBase, $salesProcessesId, &$listviewEntries, $getRawData = false, $getLinks = true)
                                {
                                    \App\Log::trace('Entering getHierarchyData(' . $id . ',' . $salesProcessesId . ') method ...');
                            
                                    $currentUser = Users_Privileges_Model::getCurrentUserModel();
                            Severity: Minor
                            Found in modules/SSalesProcesses/SSalesProcesses.php - About 1 hr to fix

                              Method process has 36 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/Leads/dashboards/LeadsBySource.php - About 1 hr to fix

                                Method process has 36 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/Leads/dashboards/LeadsByIndustry.php - About 1 hr to fix

                                  Method process has 36 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/Leads/dashboards/LeadsByStatusConverted.php - About 1 hr to fix

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

                                        public function validate($value, $isUserFormat = false)
                                        {
                                            $hashValue = \is_array($value) ? md5(print_r($value, true)) : $value;
                                            if (isset($this->validate[$hashValue]) || empty($value)) {
                                                return;
                                    Severity: Minor
                                    Found in modules/Vtiger/uitypes/MultiImage.php - About 1 hr to fix

                                      Method loadListViewCondition has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function loadListViewCondition()
                                          {
                                              $queryGenerator = $this->getQueryGenerator();
                                              if ($entityState = $this->get('entityState')) {
                                                  $queryGenerator->setStateCondition($entityState);
                                      Severity: Minor
                                      Found in modules/Vtiger/models/ListView.php - About 1 hr to fix

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

                                            public function setDataFromRequest(App\Request $request)
                                            {
                                                foreach ($this->getEditFields() as $fieldName => $fieldInfo) {
                                                    if ($request->has($fieldName) && !isset($this->customFields[$fieldName])) {
                                                        $value = $request->getByType($fieldName, $fieldInfo['purifyType']);
                                        Severity: Minor
                                        Found in modules/Vtiger/models/Widget.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language