YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method testAttachImageToRecord has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testAttachImageToRecord($module, $field, $file): void
    {
        switch ($module) {
            case 'Users':
                $record = self::$cache['Users'] ?? \App\User::getUserIdByName('admin');
Severity: Minor
Found in tests/Base/Z_MultiImage.php - About 1 hr to fix

    Method resetAllPasswords has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function resetAllPasswords(): void
        {
            $this->climate->arguments->add([
                'confirmation' => [
                    'prefix' => 'c',
    Severity: Minor
    Found in app/Cli/Users.php - About 1 hr to fix

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

          public function saveToDb(): bool
          {
              $db = \App\Db::getInstance();
              $result = false;
              $fieldName = $this->fieldModel->getName();
      Severity: Minor
      Found in app/Fields/Picklist/Item.php - About 1 hr to fix

        Method parse has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function parse($rows)
            {
                $address = [];
                foreach ($rows as $row) {
                    switch ($row['types'][0]) {
        Severity: Minor
        Found in app/Map/Address/GoogleGeocode.php - About 1 hr to fix

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

              public static function getLinks(\Vtiger_Record_Model $recordModel, string $source): ?\Vtiger_Link_Model
              {
                  $fields = $recordModel->getModule()->getFieldsByType('serverAccess', true);
                  $isActive = 0;
                  foreach ($fields as $fieldName => $fieldModel) {
          Severity: Minor
          Found in app/Fields/ServerAccess.php - About 1 hr to fix

            Method getInventory has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function getInventory(): array
                {
                    $currencyId = $this->getBaseCurrency()['currencyId'];
                    if (!empty($this->row['DOK_WAL'])) {
                        $currencyId = $this->convertCurrency($this->row['SYM_WAL'], []);
            Severity: Minor
            Found in app/Integrations/Wapro/Synchronizer/Invoice.php - About 1 hr to fix

              Method getEmployeeHierarchy has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getEmployeeHierarchy($id)
                  {
                      \App\Log::trace('Entering getEmployeeHierarchy(' . $id . ') method ...');
              
                      $listViewHeader = [];
              Severity: Minor
              Found in modules/OSSEmployees/OSSEmployees.php - About 1 hr to fix

                Method getModulePermissions has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getModulePermissions()
                    {
                        if (!isset($this->module_permissions)) {
                            $allModules = Vtiger_Module_Model::getAll([0], Settings_Profiles_Module_Model::getNonVisibleModulesList());
                            $profileTabPermissions = $this->getProfileTabPermissions();
                Severity: Minor
                Found in modules/Settings/Profiles/models/Record.php - About 1 hr to fix

                  Method transferListSearchParamsToFilterCondition has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function transferListSearchParamsToFilterCondition($searchParams, Settings_Vtiger_Module_Model $moduleModel)
                      {
                          if (empty($searchParams)) {
                              return [];
                          }
                  Severity: Minor
                  Found in modules/Settings/Vtiger/views/Pagination.php - About 1 hr to fix

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

                        public function process(App\Request $request)
                        {
                            $mode = $request->getMode();
                            if (!empty($mode)) {
                                echo $this->invokeExposedMethod($mode, $request);
                    Severity: Minor
                    Found in modules/Settings/Inventory/actions/SaveAjax.php - About 1 hr to fix

                      Method getQuery has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function getQuery(App\Request $request)
                          {
                              $moduleName = $request->getByType('source_module', \App\Purifier::ALNUM);
                              $sourceModule = $request->getModule();
                              $cvId = $request->isEmpty('viewname') ? '' : $request->getByType('viewname', \App\Purifier::ALNUM);
                      Severity: Minor
                      Found in modules/SMSNotifier/actions/MassSMS.php - About 1 hr to fix

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

                            public function process(App\Request $request)
                            {
                                $currentUser = \App\User::getCurrentUserModel();
                                $moduleName = $request->getModule();
                                $linkId = $request->getInteger('linkid');
                        Severity: Minor
                        Found in modules/Accounts/dashboards/NewAccounts.php - About 1 hr to fix

                          Method getAccountsByIndustry has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            Method getParent has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Method getParent has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                Method getAllUser has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public static function getAllUser($type = 0)
                                    {
                                        $db = new App\Db\Query();
                                        if (0 === $type) {
                                            $db->select([
                                Severity: Minor
                                Found in modules/API/models/DAV.php - About 1 hr to fix

                                  Method getLeadsByStatusConverted has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

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

                                    Method process has 44 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/SSalesProcesses/dashboards/TeamsEstimatedSales.php - About 1 hr to fix

                                      Method getDisplayValue has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
                                          {
                                              if (empty($value)) {
                                                  return '';
                                              }
                                      Severity: Minor
                                      Found in modules/Vtiger/uitypes/Owner.php - About 1 hr to fix

                                        Method getOpenTickets has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function getOpenTickets()
                                            {
                                                $ticketStatus = Settings_SupportProcesses_Module_Model::getTicketStatusNotModify();
                                                $moduleName = 'HelpDesk';
                                                $query = new \App\Db\Query();
                                        Severity: Minor
                                        Found in modules/HelpDesk/dashboards/OpenTickets.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language