YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method getSummary has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getSummary(array $modules, array $actions, array $dateRange, ?int $owner, ?int $historyOwner): array
    {
        $updates = $usedActions = [];
        $query = (new \App\Db\Query())
            ->select(['vtiger_modtracker_basic.module'])
Severity: Minor
Found in modules/ModTracker/helpers/Updates.php - About 1 hr to fix

    Method getApiDisplayValue has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getApiDisplayValue($value, Vtiger_Record_Model $recordModel, array $params = [])
        {
            $value = \App\Json::decode($value);
            if (!$value || !\is_array($value)) {
                return [];
    Severity: Minor
    Found in modules/Vtiger/uitypes/MultiImage.php - About 1 hr to fix

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

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

        Method getTreeList has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function getTreeList()
            {
                $trees = [];
                $isDeletable = $this->getRelationModel()->privilegeToTreeDelete();
                $lastId = 0;
        Severity: Minor
        Found in modules/Vtiger/models/TreeCategoryModal.php - About 1 hr to fix

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

              public function process(App\Request $request)
              {
                  $viewer = $this->getViewer($request);
                  $moduleName = $request->getModule();
          
          
          Severity: Minor
          Found in modules/Vtiger/views/MiniListWizard.php - About 1 hr to fix

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

                public function process(App\Request $request)
                {
                    $currentUser = Users_Record_Model::getCurrentUserModel();
                    $viewer = $this->getViewer($request);
                    $moduleName = $request->getModule();
            Severity: Minor
            Found in modules/Vtiger/dashboards/AssignedOverdueProjectsTasks.php - About 1 hr to fix

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

                  public function getFieldInstanceByName($name)
                  {
                      if (!isset($this->fieldForChartModal[$name]) || isset($this->getEditFields()[$name])) {
                          return parent::getFieldInstanceByName($name);
                      }
              Severity: Minor
              Found in modules/Vtiger/dashboards/ChartFilterModel.php - About 1 hr to fix

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

                    public function process(App\Request $request)
                    {
                        $currentUser = Users_Record_Model::getCurrentUserModel();
                        $viewer = $this->getViewer($request);
                        $moduleName = $request->getModule();
                Severity: Minor
                Found in modules/Vtiger/dashboards/AssignedUpcomingProjectsTasks.php - About 1 hr to fix

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

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

                    Method returnData has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        protected function returnData(): array
                        {
                            \App\User::setCurrentUserId($this->getUserData('user_id'));
                            $userModel = \App\User::getCurrentUserModel();
                            $data = [
                    Severity: Minor
                    Found in api/webservice/WebserviceStandard/Users/Login.php - About 1 hr to fix

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

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

                        Function submit has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                submit: function () {
                                    var aDeferred = jQuery.Deferred();
                                    this.calculateValues();
                                    var form = this.getContainer();
                                    var formData = form.serializeFormData();

                          Function registerEvents has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  registerEvents: function (e) {
                                      var thisInstance = this;
                                      var container = jQuery('#moduleManagerContents');
                                      container.find('.createModule').on('click', thisInstance.createModule);
                                      var scrollbar = container.find('.js-scrollbar');

                            Function registerSaveEvent has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    registerSaveEvent: function () {
                                        var thisInstance = this;
                                        jQuery('#cronJobSaveAjax').on('submit', function (e) {
                                            var form = jQuery(e.currentTarget);
                                            var validationResult = form.validationEngine('validate');

                              Function registerImportTemplate has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      registerImportTemplate: function (container) {
                                          var thisInstance = this;
                                          jQuery('#importButton', container).on('click', function (e) {
                                              var currentElement = jQuery(e.currentTarget);
                                              var url = currentElement.data('url');

                                Function registerConfig has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        registerConfig: function (container) {
                                            let form = container.find('.js-filter-form');
                                            form.validationEngine(app.validationEngineOptionsForRecord);
                                            form.find('.js-save').click(function (e) {
                                                if (form.validationEngine('validate')) {

                                  Function registerEvents has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          registerEvents: function () {
                                              var thisInstance = this;
                                              thisInstance.registerSwitchEvents();
                                              var forms = thisInstance.getContainer().find('form');
                                              forms.on('submit', function (e) {

                                    Function updateCheckbox has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            updateCheckbox: function (currentTarget) {
                                                let aDeferred = jQuery.Deferred();
                                    
                                                let currentTrElement = currentTarget.closest('tr');
                                                let id = currentTrElement.data('id');

                                      Function submit has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              submit: function () {
                                                  var aDeferred = jQuery.Deferred();
                                                  var form = this.getContainer();
                                                  this.calculateValues();
                                                  var formData = form.serializeFormData();

                                        Function vtImageLoader has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            var vtImageLoader = function (element, options) {
                                                var thisInstance = this;
                                                this.defaults = {
                                                    position: 'append',
                                                    mode: 'show'
                                        Severity: Minor
                                        Found in public_html/layouts/basic/modules/Vtiger/resources/ImageHandler.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language