YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method getRelatedRecords has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getRelatedRecords($record, $hierarchy)
    {
        $moduleName = Record::getType($record);
        $records = $recordsLevel1 = $recordsLevel2 = [];
        if (\in_array(0, $hierarchy)) {
Severity: Minor
Found in app/ModuleHierarchy.php - About 1 hr to fix

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

        public function process(): int
        {
            $query = (new \App\Db\Query())->from('dbo.KONTRAHENT');
            $pauser = \App\Pauser::getInstance('WaproAccountLastId');
            if ($val = $pauser->getValue()) {
    Severity: Minor
    Found in app/Integrations/Wapro/Synchronizer/Accounts.php - About 1 hr to fix

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

          public function process(): int
          {
              $query = (new \App\Db\Query())->from('dbo.KONTAKT');
              $pauser = \App\Pauser::getInstance('WaproContactsLastId');
              if ($val = $pauser->getValue()) {
      Severity: Minor
      Found in app/Integrations/Wapro/Synchronizer/Contacts.php - About 1 hr to fix

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

            public function getListViewEntries($pagingModel)
            {
                $module = $this->getModule();
                $parentModuleName = $module->getParentName();
                if (!empty($parentModuleName)) {
        Severity: Minor
        Found in modules/Settings/MappedFields/models/ListView.php - About 1 hr to fix

          Method download has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function download(string $name): bool
              {
                  $returnVal = true;
                  if (!static::$libraries[$name]) {
                      App\Log::warning('Library does not exist: ' . $name, 'Library');
          Severity: Minor
          Found in modules/Settings/ModuleManager/models/Library.php - About 1 hr to fix

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

                public function process(App\Request $request)
                {
                    $db = \App\Db::getInstance('log');
                    $currentUser = \App\User::getCurrentUserModel();
                    $baseUserId = $currentUser->getId();
            Severity: Minor
            Found in modules/Users/actions/SwitchUsers.php - About 1 hr to fix

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

                  public function save(App\Request $request)
                  {
                      $blockId = $request->get('blockid');
                      $sourceModule = $request->getByType('sourceModule', 2);
                      $modueInstance = Vtiger_Module_Model::getInstance($sourceModule);
              Severity: Minor
              Found in modules/Settings/LayoutEditor/actions/Block.php - About 1 hr to fix

                Method uploadTempFile has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function uploadTempFile(array $files, int $recordId, ?string $hash = null)
                    {
                        $db = \App\Db::getInstance();
                        $attach = [];
                        $maxSize = $this->getFieldInfo()['maxFileSize'];
                Severity: Minor
                Found in modules/Settings/Media/uitypes/Image.php - About 1 hr to fix

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

                      public function process(App\Request $request)
                      {
                          $qualifiedModuleName = $request->getModule(false);
                          $recordId = $request->get('record');
                          $roleName = $request->get('rolename');
                  Severity: Minor
                  Found in modules/Settings/Roles/actions/Save.php - About 1 hr to fix

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

                        public function process()
                        {
                            $config = OSSMailScanner_Record_Model::getConfig('cron');
                            $duration = $config['time'] ?? 0;
                            $email = $config['email'] ?? '';
                    Severity: Minor
                    Found in modules/OSSMailScanner/crons/Verification.php - About 1 hr to fix

                      Method getTypeEmail has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getTypeEmail($returnText = false)
                          {
                              if (isset($this->mailType)) {
                                  if ($returnText) {
                                      $cacheKey = 'Received';
                      Severity: Minor
                      Found in modules/OSSMail/models/Mail.php - About 1 hr to fix

                        Method getProductsServices has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getProductsServices(App\Request $request, Vtiger_Viewer $viewer)
                            {
                                $fromModule = $request->getByType('fromModule', 'Text');
                                $record = $request->getInteger('record');
                                $mod = current($request->getArray('mod', 'Alnum'));
                        Severity: Minor
                        Found in modules/Products/models/SummaryWidget.php - About 1 hr to fix

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

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

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

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

                              Method getEstimatedValue has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function getEstimatedValue($owner = false)
                                  {
                                      $moduleName = 'SSalesProcesses';
                                      $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
                                      $query = (new \App\Db\Query())->select([
                              Severity: Minor
                              Found in modules/SSalesProcesses/dashboards/EstimatedValueByStatus.php - About 1 hr to fix

                                Method setMessagesResult has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

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

                                      public function process(App\Request $request)
                                      {
                                          $moduleName = $request->getModule();
                                          $record = $request->getInteger('record');
                                          $load = $request->get('noloadlibs');
                                  Severity: Minor
                                  Found in modules/OSSMailView/views/Preview.php - About 1 hr to fix

                                    Method getAdvancedFilterOptions has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static function getAdvancedFilterOptions()
                                        {
                                            return [
                                                'is' => 'is',
                                                'is not' => 'is not',
                                    Severity: Minor
                                    Found in modules/Vtiger/helpers/AdvancedFilter.php - About 1 hr to fix

                                      Method getHistory has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public static function getHistory(App\Request $request, Vtiger_Paging_Model $pagingModel)
                                          {
                                              $recordId = $request->getInteger('record');
                                              if ($request->isEmpty('type')) {
                                                  return [];
                                      Severity: Minor
                                      Found in modules/Vtiger/widgets/HistoryRelation.php - About 1 hr to fix

                                        Method getChildIStorages has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function getChildIStorages($id, &$childIStorages, $depthBase)
                                            {
                                                \App\Log::trace('Entering getChildIStorages(' . $id . ',' . $depthBase . ') method ...');
                                        
                                                if (empty($id) || $depthBase === App\Config::module('IStorages', 'MAX_HIERARCHY_DEPTH')) {
                                        Severity: Minor
                                        Found in modules/IStorages/IStorages.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language