YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

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

    public function process()
    {
        if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
            return '';
        }
Severity: Minor
Found in app/TextParser/TableDiscountSummary.php - About 1 hr to fix

    Method validateValue has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function validateValue(string $fieldName, $value)
        {
            switch ($fieldName) {
                case 'name':
                    $itemPropertyModel = $this->getFieldInstanceByName($fieldName);
    Severity: Minor
    Found in app/Fields/Picklist/Item.php - About 1 hr to fix

      Method getBacktrace has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function getBacktrace($minLevel = 1, $maxLevel = 0, $sep = '#')
          {
              $trace = '';
              foreach (debug_backtrace() as $k => $v) {
                  if ($k < $minLevel) {
      Severity: Minor
      Found in app/Debuger.php - About 1 hr to fix

        Method reloadApprovals has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function reloadApprovals(int $contactId): array
            {
                if (\App\Record::isExists($contactId)) {
                    $moduleName = 'ApprovalsRegister';
                    $relatedModule = 'Approvals';
        Severity: Minor
        Found in modules/ApprovalsRegister/models/Module.php - About 1 hr to fix

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

              public function process(App\Request $request)
              {
                  $recordId = $request->getInteger('id');
                  $pdfModel = Vtiger_PDF_Model::getInstanceById($recordId);
          
          
          Severity: Minor
          Found in modules/Settings/PDF/actions/ExportTemplate.php - About 1 hr to fix

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

                public function process(App\Request $request)
                {
                    $result = false;
                    $fileContent = '';
                    if ($request->isEmpty('type') || $request->isEmpty('libraryName')) {
            Severity: Minor
            Found in modules/Settings/Dependencies/views/LibraryMoreInfo.php - About 1 hr to fix

              Method saveWidget has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function saveWidget($params)
                  {
                      $db = App\Db::getInstance();
                      $tabid = $params['tabid'];
                      $data = $params['data'];
              Severity: Minor
              Found in modules/Settings/Widgets/models/Module.php - About 1 hr to fix

                Method getRecordLinks has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getRecordLinks(): array
                    {
                        $links = [];
                
                        $recordLinks = [
                Severity: Minor
                Found in modules/Settings/Workflows/models/Record.php - About 1 hr to fix

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

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

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

                        public function saveToDb(string $source, int $type, string $content): array
                        {
                            $firstLine = true;
                            $explodedElements = explode($this->delimiter, $content);
                            $db = \App\Db::getInstance('admin');
                    Severity: Minor
                    Found in modules/Settings/MailRbl/actions/UploadList.php - About 1 hr to fix

                      Method getValuesToSave has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function getValuesToSave(array $data): array
                          {
                              $forSave = [];
                              if (!$this->getId()) {
                                  $forSave[$this->getModule()->baseTable][$this->getModule()->baseIndex] = \App\Db::getInstance('admin')->getUniqueId('vtiger_users');
                      Severity: Minor
                      Found in modules/Settings/Groups/models/Record.php - About 1 hr to fix

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

                            public function doTask($recordModel)
                            {
                                $mailerContent = [
                                    'smtp_id' => ($this->smtp) ? $this->smtp : App\Mail::getDefaultSmtp(),
                                ];
                        Severity: Minor
                        Found in modules/com_vtiger_workflow/tasks/VTEmailTask.php - About 1 hr to fix

                          Method delete has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function delete()
                              {
                                  switch ($this->typeSaving) {
                                      case self::UPDATE_ALL_EVENTS:
                                          $records = $this->getRecords($this->recordModel->get('followup'));
                          Severity: Minor
                          Found in modules/Calendar/models/RecuringEvents.php - About 1 hr to fix

                            Method __getChildAccounts has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Method getNotificationByRecipient has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function getNotificationByRecipient($time)
                                  {
                                      $accessibleUsers = \App\Fields\Owner::getInstance()->getAccessibleUsers();
                                      $moduleName = 'Notification';
                                      $listViewUrl = Vtiger_Module_Model::getInstance($moduleName)->getListViewUrl();
                              Severity: Minor
                              Found in modules/Notification/dashboards/NotificationsByRecipient.php - About 1 hr to fix

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

                                    public function process(App\Request $request)
                                    {
                                        $baseModuleName = 'Accounts';
                                        $viewer = $this->getViewer($request);
                                        $filter = $request->has('filter') ? $request->getByType('filter', 'Alnum') : \App\CustomView::getInstance($baseModuleName)->getViewId();
                                Severity: Minor
                                Found in modules/Products/views/TreeRecords.php - About 1 hr to fix

                                  Method getNotificationBySender has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function getNotificationBySender($time)
                                      {
                                          $accessibleUsers = \App\Fields\Owner::getInstance()->getAccessibleUsers();
                                          $moduleName = 'Notification';
                                          $listViewUrl = Vtiger_Module_Model::getInstance($moduleName)->getListViewUrl();
                                  Severity: Minor
                                  Found in modules/Notification/dashboards/NotificationsBySender.php - About 1 hr to fix

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

                                        public function process(App\Request $request)
                                        {
                                            $dates = [];
                                            $moduleName = $request->getModule();
                                            $currentDate = DateTimeField::convertToDBFormat($request->getByType('currentDate', 'DateInUserFormat'));
                                    Severity: Minor
                                    Found in modules/Calendar/views/QuickCreateEvents.php - About 1 hr to fix

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

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

                                        Method searchAccountsToConvert has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function searchAccountsToConvert(Vtiger_Record_Model $recordModel)
                                            {
                                                \App\Log::trace('Start ' . __METHOD__);
                                                if ($recordModel) {
                                                    $mappingFields = Vtiger_Processes_Model::getConfig('marketing', 'conversion', 'mapping');
                                        Severity: Minor
                                        Found in modules/Leads/models/Module.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language