YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method formatDateIntoStrings has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function formatDateIntoStrings($date, $time = false)
    {
        $currentUser = Users_Record_Model::getCurrentUserModel();
        $dateTimeInUserFormat = App\Fields\DateTime::formatToDisplay($date . ' ' . $time);

Severity: Minor
Found in modules/Vtiger/helpers/Util.php - About 1 hr to fix

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

        public function process(App\Request $request, $widget = null)
        {
            $viewer = $this->getViewer($request);
            $moduleName = $request->getModule();
            if ($widget && !$request->has('widgetid')) {
    Severity: Minor
    Found in modules/Vtiger/dashboards/ChartFilter.php - About 1 hr to fix

      Method getRecordDataFromXMLTemplate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getRecordDataFromXMLTemplate(XMLReader $xmlToImport)
          {
              $recordData = [];
              $recordNum = 0;
              $firstElement = '';
      Severity: Minor
      Found in modules/Import/readers/XmlReader.php - About 1 hr to fix

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

            public function getHierarchyData($id, $iStorageInfoBase, $iStorageId, &$listviewEntries, $getRawData = false, $getLinks = true)
            {
                \App\Log::trace('Entering getHierarchyData(' . $id . ',' . $iStorageId . ') method ...');
        
                $hasRecordViewAccess = \App\Privilege::isPermitted('IStorages', 'DetailView', $iStorageId);
        Severity: Minor
        Found in modules/IStorages/IStorages.php - About 1 hr to fix

          Method getFirstRowData has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getFirstRowData($hasHeader = true)
              {
                  $isInventory = $this->moduleModel->isInventory();
                  $rowData = $headers = $standardData = $inventoryData = [];
                  foreach ($this->data as $currentRow => $data) {
          Severity: Minor
          Found in modules/Import/readers/CSVReader.php - About 1 hr to fix

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

                public function process()
                {
                    $html = '';
                    $relationModuleName = 'Products';
                    $relationListView = \Vtiger_RelationListView_Model::getInstance($this->textParser->recordModel, $relationModuleName);
            Severity: Minor
            Found in modules/IStorages/textparsers/ProductsControlTable.php - About 1 hr to fix

              Method getFieldInstanceByName has 35 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/MultifilterModel.php - About 1 hr to fix

                Method getImportStatusCount has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getImportStatusCount()
                    {
                        $statusCount = ['TOTAL' => 0, 'IMPORTED' => 0, 'FAILED' => 0, 'PENDING' => 0,
                            'CREATED' => 0, 'SKIPPED' => 0, 'UPDATED' => 0, 'MERGED' => 0, ];
                        $tableName = Import_Module_Model::getDbTableName($this->user);
                Severity: Minor
                Found in modules/Import/actions/Data.php - About 1 hr to fix

                  Method entityAfterSave has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function entityAfterSave(App\EventHandler $eventHandler): void
                      {
                          $typeAddressToUpdate = [];
                          $recordModel = $eventHandler->getRecordModel();
                          if (!$recordModel->isNew()) {
                  Severity: Minor
                  Found in modules/OpenStreetMap/handlers/OpenStreetMapHandler.php - About 1 hr to fix

                    Method testNumbers has 11 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public function testNumbers($moduleName, $fieldName, $userFormat, $dbFormat, $decimalSeparator, $groupingSeparator, $groupingPattern, $afterDot, $symbolPlacement, $truncate, $correct = true): void
                    Severity: Major
                    Found in tests/Base/Z_StringFormatting.php - About 1 hr to fix

                      Function registerSubmitForm has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              registerSubmitForm: function () {
                                  var form = this.getForm();
                                  form.on('submit', function (e) {
                                      e.preventDefault();
                                      e.stopPropagation();

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

                                submit() {
                                    var aDeferred = $.Deferred();
                                    var form = this.getContainer();
                                    var formData = form.serializeFormData();
                                    var progressIndicatorElement = $.progressIndicator({
                        Severity: Minor
                        Found in public_html/layouts/basic/modules/Settings/PDF/resources/Edit2.js - About 1 hr to fix

                          Function deleteCustomRule has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  deleteCustomRule: function (deleteElement) {
                                      let deleteUrl = deleteElement.data('url');
                                      let currentRow = deleteElement.closest('.js-custom-rule-entries');
                                      app.showConfirmModal({
                                          title: app.vtranslate('LBL_DELETE_CONFIRMATION'),

                            Function registerBasicEvents has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                registerBasicEvents() {
                                    this.moduleField.on('change', (e) => {
                                        this.changeModule($(e.currentTarget).val());
                                    });
                                    this.picklistContainer.on('change', '.js-picklist-field', (e) => {

                              Function registerDataTable has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      registerDataTable: function (container) {
                                          let table = container.find('.js-data-table');
                                          let form = container.find('.js-filter-form');
                                          let dataTable = app.registerDataTables(table, {
                                              order: [],

                                Function registerDashboardAction has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        registerDashboardAction() {
                                            const thisInstance = this;
                                            $('.editDashboard').on('click', (e) => {
                                                let currentTarget = $(e.currentTarget);
                                                e.stopPropagation();

                                  Function registerConfigModal has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          registerConfigModal: function (container) {
                                              container.find('.js-show-config-modal').on('click', function () {
                                                  const recordCollectorName = this.dataset.name;
                                                  app.showModalWindow(
                                                      null,

                                    Function addDetails has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            addDetails: function (details) {
                                                let container = jQuery('#inventory'),
                                                    currency = jQuery('#currency'),
                                                    symbol = '%',
                                                    table = $('.inventoryTable', container),

                                      Function registerDataTable has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              registerDataTable: function (container) {
                                                  const self = this;
                                                  let form = container.find('.js-filter-form');
                                                  App.Fields.Date.registerRange(form);
                                                  let table = container.find('.js-data-table');

                                        Function registerDeleteHolidayEvent has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                registerDeleteHolidayEvent(container) {
                                                    let thisInstance = this;
                                                    this.$itemsContainer.on('click', '.deleteHoliday', (e) => {
                                                        app.showConfirmModal({
                                                            title: app.vtranslate('JS_DELETE_RECORD_CONFIRMATION'),
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language