YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function registerMyLocation has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        registerMyLocation: function () {
            const locationBtn = this.container.find('.js-my-location-btn');
            if (!navigator.geolocation) {
                locationBtn.addClass('d-none');
                return;
Severity: Minor
Found in public_html/layouts/basic/modules/OpenStreetMap/resources/Map.js - About 1 hr to fix

    Function getParams has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            getParams() {
                const referenceModule = $('.js-popup-reference-module', this.container).val(),
                    sourceFieldName = this.select.attr('name').slice(0, -2),
                    sourceRecordElement = $('input[name="record"]', this.form),
                    listFilterFieldsJson = this.form.find('input[name="listFilterFields"]').val(),
    Severity: Minor
    Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

      Function init has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              init() {
                  $('.js-multicurrency-event', this.container)
                      .off('click')
                      .on('click', () => {
                          let modal = $('<form>').append(this.container.find('.js-currencies-container .js-currencies-modal').clone());
      Severity: Minor
      Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

        Method register has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function register(string $prefix, string $name = '', ?bool $isDefault = false, bool $isActive = true, int $progress = 0)
            {
                $dbCommand = \App\Db::getInstance()->createCommand();
                $prefix = trim($prefix);
                if ($langInfo = \App\Language::getLangInfo($prefix)) {
        Severity: Minor
        Found in vtlib/Vtiger/LanguageExport.php - About 1 hr to fix

          Function showAlert has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              showAlert: function (text) {
                  return this.showNotify({
                      title: text,
                      type: 'error',
                      closer: false,
          Severity: Minor
          Found in public_html/layouts/resources/app.js - About 1 hr to fix

            Function fetchSearchData has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                fetchSearchData({ commit }, { value, roomData, showMore }) {
                    return new Promise((resolve, reject) => {
                        AppConnector.request(
                            {
                                module: 'Chat',
            Severity: Minor
            Found in public_html/src/layouts/basic/modules/Chat/store/actions.js - About 1 hr to fix

              Method dataValidator has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function dataValidator(): array
                  {
                      return [
                          ['url', true, 'ssl://imap.gmail.com:993'],
                          ['url', true, 'ssl://imap.gmail.com'],
              Severity: Minor
              Found in tests/App/Validator.php - About 1 hr to fix

                Method testGenerateToken has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function testGenerateToken(): void
                    {
                        $moduleName = 'Contacts';
                        $moduleModel = \Vtiger_Module_Model::getInstance($moduleName);
                        if (!($field = current($moduleModel->getFieldsByType('token', true)))) {
                Severity: Minor
                Found in tests/Integrations/ManageConsents.php - About 1 hr to fix

                  Method initTables has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function initTables($basetable = false, $basetableid = false)
                      {
                          $this->basetable = $basetable;
                          $this->basetableid = $basetableid;
                          $db = \App\Db::getInstance();
                  Severity: Minor
                  Found in vtlib/Vtiger/ModuleBasic.php - About 1 hr to fix

                    Method testAddConfiguration has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function testAddConfiguration(): void
                        {
                            $app = \Settings_WebserviceApps_Record_Model::getCleanInstance();
                            $app->set('type', 'ManageConsents');
                            $app->set('status', 1);
                    Severity: Minor
                    Found in tests/Integrations/ManageConsents.php - About 1 hr to fix

                      Method relatedRecordsListPrinter has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function relatedRecordsListPrinter(\Vtiger_RelationListView_Model $relationListView, \Vtiger_Paging_Model $pagingModel, int $maxLength): string
                          {
                              $relatedModuleName = $relationListView->getRelationModel()->getRelationModuleName();
                              $rows = $headers = '';
                              $fields = $relationListView->getRelationModel()->getQueryFields();
                      Severity: Minor
                      Found in app/TextParser.php - About 1 hr to fix

                        Method getRecordVariable has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getRecordVariable($fieldType = false)
                            {
                                $cacheKey = "{$this->moduleName}|$fieldType";
                                if (isset(static::$recordVariable[$cacheKey])) {
                                    return static::$recordVariable[$cacheKey];
                        Severity: Minor
                        Found in app/TextParser.php - About 1 hr to fix

                          Method send has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function send(string $url, string $method, array $option = []): bool
                              {
                                  $this->error = null;
                                  $this->success = false;
                                  $this->basicValidations($url);
                          Severity: Minor
                          Found in app/YetiForce/ApiClient.php - About 1 hr to fix

                            Method getLabel has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function getLabel($mixedId, bool $raw = false)
                                {
                                    $multiMode = \is_array($mixedId);
                                    $ids = array_filter($multiMode ? array_unique($mixedId) : [$mixedId]);
                                    $result = $missing = [];
                            Severity: Minor
                            Found in app/Record.php - About 1 hr to fix

                              Method displayElapseTime has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function displayElapseTime($interval, string $formatIn = 'i', string $formatOut = 'ahi', bool $short = true): string
                                  {
                                      $dateFormat = [];
                                      $multiplier = 1;
                                      switch ($formatIn) {
                              Severity: Minor
                              Found in app/Fields/RangeTime.php - About 1 hr to fix

                                Method getEditFields has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function getEditFields(): array
                                    {
                                        $fields = [];
                                        $editFields = ['name'];
                                        $editFields[] = 'icon';
                                Severity: Minor
                                Found in app/Fields/Picklist/Item.php - About 1 hr to fix

                                  Method import has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function import(): bool
                                      {
                                          $allChecked = false;
                                          try {
                                              if ($categories = $this->getCategoriesFromApi()) {
                                  Severity: Minor
                                  Found in app/Integrations/Magento/Synchronizer/Category.php - About 1 hr to fix

                                    Method createStatus has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function createStatus()
                                        {
                                            $status = $this->record->get('activitystatus');
                                            if ('VEVENT' === (string) $this->vcomponent->name) {
                                                $values = [
                                    Severity: Minor
                                    Found in app/Integrations/Dav/Calendar.php - About 1 hr to fix

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

                                          public function process(): int
                                          {
                                              $dataReader = (new \App\Db\Query())->select(['dbo.RACHUNEK_FIRMY.*', 'dbo.BANKI.SWIFT', 'bankName' => 'dbo.BANKI.NAZWA'])
                                                  ->from('dbo.RACHUNEK_FIRMY')
                                                  ->leftJoin('dbo.BANKI', 'dbo.RACHUNEK_FIRMY.ID_BANKU = dbo.BANKI.ID_BANKU')
                                      Severity: Minor
                                      Found in app/Integrations/Wapro/Synchronizer/BankAccounts.php - About 1 hr to fix

                                        Method getPrivilegesFile has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static function getPrivilegesFile($userId): array
                                            {
                                                if (isset(static::$userPrivilegesCache[$userId])) {
                                                    return self::$userPrivilegesCache[$userId];
                                                }
                                        Severity: Minor
                                        Found in app/User.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language