YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

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

    public function save($saveMapping = false)
    {
        \App\Log::trace('Entering ' . __METHOD__ . '(' . $saveMapping . ') method ...');
        $db = \App\Db::getInstance();
        $fields = self::$allFields;
Severity: Minor
Found in modules/Settings/MappedFields/models/Module.php - About 1 hr to fix

    Method getFieldInstanceByName has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getFieldInstanceByName($name)
        {
            $moduleName = $this->getModule()->getName(true);
            $fieldsLabel = $this->getEditFields();
            $params = ['uitype' => 1, 'column' => $name, 'name' => $name, 'label' => $fieldsLabel[$name], 'displaytype' => 1, 'typeofdata' => 'V~M', 'presence' => 0, 'isEditableReadOnly' => false];
    Severity: Minor
    Found in modules/Settings/WebserviceUsers/services/ManageConsents.php - About 1 hr to fix

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

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

        Method request has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function request(App\Request $request)
            {
                $rows = [];
                $query = $this->getQuery($request);
                $query->from('s_#__mail_rbl_request')->select(['id', 'status', 'type', 'datetime', 'user', 'header', 'body']);
        Severity: Minor
        Found in modules/Settings/MailRbl/actions/GetData.php - About 1 hr to fix

          Method duplicate has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function duplicate(App\Request $request)
              {
                  $response = new Vtiger_Response();
                  $moduleName = $request->getModule(false);
                  $result = true;
          Severity: Minor
          Found in modules/Settings/PublicHoliday/actions/Holiday.php - About 1 hr to fix

            Method queueScheduledWorkflowTasks has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function queueScheduledWorkflowTasks()
                {
                    $default_timezone = App\Config::main('default_timezone');
                    $vtWorflowManager = new VTWorkflowManager();
                    $taskQueue = new VTTaskQueue();
            Severity: Minor
            Found in modules/com_vtiger_workflow/WorkFlowScheduler.php - About 1 hr to fix

              Method getNextTriggerTimeForWeekly has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getNextTriggerTimeForWeekly($scheduledDaysOfWeek, $scheduledTime)
                  {
                      $weekDays = ['1' => 'Monday', '2' => 'Tuesday', '3' => 'Wednesday', '4' => 'Thursday', '5' => 'Friday', '6' => 'Saturday', '7' => 'Sunday'];
                      $currentTime = time();
                      $currentWeekDay = date('N', $currentTime);
              Severity: Minor
              Found in modules/com_vtiger_workflow/Workflow.php - About 1 hr to fix

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

                    public function doTask($recordModel)
                    {
                        if (empty($this->url) || empty($this->format) || empty($this->typedata)) {
                            return;
                        }
                Severity: Minor
                Found in modules/com_vtiger_workflow/tasks/Webhook.php - About 1 hr to fix

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

                      public function save()
                      {
                          $db = \App\Db::getInstance();
                          $currentUserModel = Users_Record_Model::getCurrentUserModel();
                  
                  
                  Severity: Minor
                  Found in modules/CustomView/models/Record.php - About 1 hr to fix

                    Method getChildSales has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      Method entityChangeState has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function entityChangeState(App\EventHandler $eventHandler)
                          {
                              if (!ModTracker::isTrackingEnabledForModule($eventHandler->getModuleName())) {
                                  return false;
                              }
                      Severity: Minor
                      Found in modules/ModTracker/handlers/ModTrackerHandler.php - About 1 hr to fix

                        Method getTreeWorkflows has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                             public static function getTreeWorkflows(string $moduleName, int $recordId): array
                             {
                                 \Vtiger_Loader::includeOnce('~~modules/com_vtiger_workflow/include.php');
                                 $tree = [];
                                 $workflowModuleName = 'Settings:Workflows';
                        Severity: Minor
                        Found in modules/Vtiger/models/WorkflowTrigger.php - About 1 hr to fix

                          Method add has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function add(App\Request $request)
                              {
                                  $moduleName = $request->getByType('sourceModule', \App\Purifier::ALNUM);
                                  $data = $request->getMultiDimensionArray('form', [
                                      'data' => 'Text',
                          Severity: Minor
                          Found in modules/Vtiger/actions/Widget.php - About 1 hr to fix

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

                                public function process(App\Request $request)
                                {
                                    $moduleName = $request->getModule();
                                    $detailModel = Vtiger_DetailView_Model::getInstance($moduleName, $request->getInteger('record'));
                                    $recordModel = $detailModel->getRecord();
                            Severity: Minor
                            Found in modules/Vtiger/views/QuickDetailModal.php - About 1 hr to fix

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

                                  public static function getHistory()
                                  {
                                      $results = (new \App\Db\Query())->from('u_#__browsinghistory')
                                          ->where(['userid' => App\User::getCurrentUserId()])
                                          ->orderBy(['id' => SORT_DESC])
                              Severity: Minor
                              Found in modules/Vtiger/helpers/BrowsingHistory.php - About 1 hr to fix

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

                                    public function process()
                                    {
                                        $this->loadConfig();
                                        $recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\Gus', $this->config['moduleName']);
                                        if (!$recordCollector->isActive()) {
                                Severity: Minor
                                Found in modules/Vtiger/crons/IntegrationPLGusRegon.php - About 1 hr to fix

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

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

                                    Method getWidgetData has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function getWidgetData($moduleName, $widgetParam, $time)
                                        {
                                            $currentUserId = \App\User::getCurrentUserId();
                                            $s = new \yii\db\Expression('sum(sum_gross)');
                                            $queryGenerator = new \App\QueryGenerator($moduleName);
                                    Severity: Minor
                                    Found in modules/FInvoice/dashboards/SummationByUser.php - About 1 hr to fix

                                      Method read has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function read()
                                          {
                                              $defaultCharset = App\Config::main('default_charset');
                                      
                                              $filePath = $this->getFilePath();
                                      Severity: Minor
                                      Found in modules/Import/readers/VCardReader.php - About 1 hr to fix

                                        Function modalFormEdit has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                modalFormEdit(wizardContainer) {
                                                    const thisInstance = this;
                                                    $('#massEditHeader.modal-title').text(app.vtranslate('JS_EDIT_WIDGET'));
                                                    app.showPopoverElementView(wizardContainer.find('.js-help-info'));
                                                    let type = thisInstance.getType();
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language