YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method sanitizeInventoryValues has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function sanitizeInventoryValues(array $inventoryRow, array $inventoryFields): array
    {
        ++$this->invNo;
        $this->workSheet->setCellValueExplicitByColumnAndRow($this->colNo, $this->rowNo, $this->invNo, \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_NUMERIC);
        ++$this->colNo;
Severity: Minor
Found in modules/Vtiger/models/ExportToSpreadsheet.php - About 1 hr to fix

    Method row has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function row(App\Request $request): void
        {
            $relatedModuleSkip = $request->getBoolean('relatedModuleSkip', false);
            $sourceModuleName = $request->getByType('sourceModuleName', \App\Purifier::ALNUM);
            $sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModuleName);
    Severity: Minor
    Found in modules/Vtiger/views/ConditionBuilder.php - About 1 hr to fix

      Method getAdvancedFilterOpsByFieldType has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function getAdvancedFilterOpsByFieldType()
          {
              return [
                  'accountName' => ['is', 'contains', 'does not contain', 'starts with', 'ends with', 'has changed', 'is empty', 'is not empty'],
                  'string' => ['is', 'contains', 'does not contain', 'starts with', 'ends with', 'has changed', 'not has changed', 'is empty', 'is not empty'],
      Severity: Minor
      Found in modules/Vtiger/helpers/AdvancedFilter.php - About 1 hr to fix

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

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

          Method checkPermission has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function checkPermission(): void
              {
                  parent::checkPermission();
                  $moduleName = $this->controller->request->getModule();
                  if ('POST' === $this->controller->method) {
          Severity: Minor
          Found in api/webservice/WebserviceStandard/BaseModule/Record.php - About 1 hr to fix

            Method __construct has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function __construct($message, $code = 500, \Throwable $previous = null)
                {
                    $message = rtrim(str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', $message), PHP_EOL);
                    if (!empty($previous)) {
                        parent::__construct($message, $code, $previous);
            Severity: Minor
            Found in api/webservice/Core/Exception.php - About 1 hr to fix

              Function callBackFunction has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                              var callBackFunction = function (data) {
                                  App.Fields.Picklist.showSelect2ElementView(data.find('select'));
                                  data.find('.relLabel').val(data.find('.target option:selected').val());
                                  data.on('change', '.target', function (e) {
                                      let currentTarget = $(e.currentTarget);

                Function registerEditTaskEvent has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        registerEditTaskEvent: function () {
                            let thisInstance = this,
                                container = this.getContainer();
                            container.on('click', '[data-url]', function (e) {
                                let currentElement = $(e.currentTarget),

                  Function data has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                          data: function (row) {
                                              let action = '';
                                              action += '<div class="o-tab__container--action">';
                                              action += `<button type="button" class="btn btn-secondary btn-xs js-details" data-id="${
                                                  row['id']

                    Function registerUnreviewedCountEvent has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            registerUnreviewedCountEvent: function () {
                                let ids = [];
                                let relatedContent = this.content;
                                let isUnreviewedActive = relatedContent.find('.unreviewed').length;
                                relatedContent.find('tr.listViewEntries').each(function () {
                    Severity: Minor
                    Found in public_html/layouts/basic/modules/Vtiger/resources/RelatedList.js - About 1 hr to fix

                      Function toggleSplit has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              toggleSplit: function (container) {
                                  let commactHeight = container.closest('.commonActionsContainer').height();
                                  let splitsArray = [];
                                  this.split = this.registerSplit(container);
                                  splitsArray.push(this.split);
                      Severity: Minor
                      Found in public_html/layouts/basic/modules/Vtiger/resources/RelatedList.js - About 1 hr to fix

                        Function transferOwnershipSave has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                transferOwnershipSave: function (form) {
                                    let transferOwner = jQuery('#transferOwnerId').val();
                                    let relatedModules = jQuery('#related_modules').val();
                                    let recordId = jQuery('#recordId').val();
                                    let params = {
                        Severity: Minor
                        Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 1 hr to fix

                          Function registerFocusFirstField has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  registerFocusFirstField: function (container, afterTimeout) {
                                      let elementToFocus, elementToFocusTabindex;
                                      if (afterTimeout === undefined && container.closest('.js-modal-container').length) {
                                          setTimeout((_) => {
                                              this.registerFocusFirstField(container, true);
                          Severity: Minor
                          Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 1 hr to fix

                            Function triggerTransferOwnership has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    triggerTransferOwnership: function (massActionUrl) {
                                        let thisInstance = this;
                                        let listInstance = Vtiger_List_Js.getInstance();
                                        let validationResult = listInstance.checkListRecordSelected();
                                        if (validationResult != true) {
                            Severity: Minor
                            Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 1 hr to fix

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

                                      registerEvents: function () {
                                          this.registerRowClickEvent();
                                          this.registerPageNavigationEvents();
                                          this.registerMainCheckBoxClickEvent();
                                          this.registerCheckBoxClickEvent();
                              Severity: Minor
                              Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 1 hr to fix

                                Function registerChangeDiscount has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        registerChangeDiscount: function () {
                                            this.form.on('click', '.js-change-discount', (e) => {
                                                let parentRow;
                                                const element = $(e.currentTarget);
                                                let params = {
                                Severity: Minor
                                Found in public_html/layouts/basic/modules/Vtiger/resources/Inventory.js - About 1 hr to fix

                                  Function postLoadListViewRecordsEvents has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          postLoadListViewRecordsEvents: function (container) {
                                              const self = this;
                                              this.registerPostLoadDesktopEvents(container);
                                              App.Fields.Picklist.showSelect2ElementView(container.find('select.select2'));
                                              App.Fields.Picklist.changeSelectElementView(container);
                                  Severity: Minor
                                  Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 1 hr to fix

                                    Function onPaste has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        onPaste: function (event) {
                                            const self = this,
                                                allowedTypes = 'image/jpeg|image/png|image/gif',
                                                dataTransfer = event.data.dataTransfer,
                                                editor = event.editor,

                                      Function redraw_node has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              this.redraw_node = function (obj, deep, is_callback, force_render) {
                                                  obj = parent.redraw_node.apply(this, arguments);
                                                  if (this.get_node(obj).original.type == 'category') {
                                                      return obj;
                                                  }
                                      Severity: Minor
                                      Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 1 hr to fix

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

                                            public function exportModule()
                                            {
                                                $moduleId = $this->moduleInstance->id;
                                                $row = (new \App\Db\Query())
                                                    ->select(['name', 'tablabel', 'version', 'type', 'premium'])
                                        Severity: Minor
                                        Found in vtlib/Vtiger/PackageExport.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language