YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function setCalendarBasicOptions has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    setCalendarBasicOptions() {
        let eventLimit = app.getMainParams('eventLimit'),
            userView = app.getMainParams('activity_view'),
            defaultView = app.moduleCacheGet('defaultView'),
            userTimeFormat = CONFIG.hourFormat;
Severity: Major
Found in public_html/layouts/resources/Calendar.js - About 2 hrs to fix

    Method throwNewException has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function throwNewException($e, $die = true, $messageHeader = 'LBL_ERROR')
        {
            if (!headers_sent() && \App\Config::security('cspHeaderActive')) {
                header("content-security-policy: default-src 'self' 'nonce-" . \App\Session::get('CSP_TOKEN') . "'; object-src 'none';base-uri 'self'; frame-ancestors 'self';");
            }
    Severity: Major
    Found in vtlib/Vtiger/Functions.php - About 2 hrs to fix

      Method getDisplayValueByType has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function getDisplayValueByType($value, \Vtiger_Record_Model $recordModel, \Vtiger_Field_Model $fieldModel, $params)
          {
              switch ($fieldModel->getFieldDataType()) {
                  case 'boolean':
                      $value = (1 === $value) ? 'LBL_YES' : 'LBL_NO';
      Severity: Major
      Found in app/TextParser.php - About 2 hrs to fix

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

            public function process()
            {
                if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
                    return '';
                }
        Severity: Major
        Found in app/TextParser/TableCurrencySummary.php - About 2 hrs to fix

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

              public function process()
              {
                  if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
                      return '';
                  }
          Severity: Major
          Found in app/TextParser/TableCorrectTaxSummary.php - About 2 hrs to fix

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

                public function process(): string
                {
                    $html = '';
                    $moduleName = 'SSalesProcesses';
                    if (!empty($textParserParams = $this->textParser->getParam('textParserParams')) && isset($textParserParams['userId'])) {
            Severity: Major
            Found in app/TextParser/UserSSalesProcesses.php - About 2 hrs to fix

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

                  public function process()
                  {
                      if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
                          return '';
                      }
              Severity: Major
              Found in app/TextParser/TableTaxSummary.php - About 2 hrs to fix

                Method cpu has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private static function cpu(): array
                    {
                        $mathFunctions = self::$mathFunctions;
                        $mathCountGroup = 5000;
                        $mathMaxTime = 0.3;
                Severity: Major
                Found in app/Utils/Benchmarks.php - About 2 hrs to fix

                  Method find has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function find($value): array
                      {
                          $product = \App\YetiForce\Register::getProduct('YetiForceGeocoder');
                          if (empty($value) || !\App\RequestUtil::isNetConnection() || empty($product['params']['login']) || empty($product['params']['pass'])) {
                              return [];
                  Severity: Major
                  Found in app/Map/Address/YetiForceGeocoder.php - About 2 hrs to fix

                    Method getQuickCreateModules has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function getQuickCreateModules($restrictList = false, $tree = false): array
                        {
                            $restrictListString = $restrictList ? 1 : 0;
                            if ($tree) {
                                $userModel = \App\User::getCurrentUserModel();
                    Severity: Major
                    Found in app/Module.php - About 2 hrs to fix

                      Method loadData has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function loadData(): void
                          {
                              if (empty($this->data)) {
                                  return;
                              }
                      Severity: Major
                      Found in app/RecordCollectors/Base.php - About 2 hrs to fix

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

                            public function process(App\Request $request)
                            {
                                $sSingleOrderTabId = \App\Module::getModuleId('SSingleOrders');
                                $fInvoiceTabId = \App\Module::getModuleId('FInvoice');
                                $productCategoryId = \App\Module::getModuleId('ProductCategory');
                        Severity: Major
                        Found in modules/Settings/Magento/actions/Active.php - About 2 hrs to fix

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

                              public function process(App\Request $request)
                              {
                                  $currentUser = Users_Record_Model::getCurrentUserModel();
                                  $moduleName = 'Home';
                                  $page = $request->getInteger('page');
                          Severity: Major
                          Found in modules/Vtiger/dashboards/CreatedNotMineActivities.php - About 2 hrs to fix

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

                                public function process()
                                {
                                    $db = \App\Db::getInstance();
                                    $executed = [];
                                    $limit = 1000;
                            Severity: Major
                            Found in modules/Vtiger/crons/MultiReference.php - About 2 hrs to fix

                              Method createQuery has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function createQuery(): void
                                  {
                                      $moduleName = $this->controller->request->getModule();
                                      $this->queryGenerator = new \App\QueryGenerator($moduleName);
                                      if ($cvId = $this->controller->request->getHeader('x-cv-id')) {
                              Severity: Major
                              Found in api/webservice/WebserviceStandard/BaseModule/RecordsList.php - About 2 hrs to fix

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

                                    public function process()
                                    {
                                        $db = App\Db::getInstance();
                                        $lastUpdatedCrmId = (new App\Db\Query())->select(['crmid'])->from('u_#__openstreetmap_address_updater')->scalar();
                                        if (false !== $lastUpdatedCrmId) {
                                Severity: Major
                                Found in modules/OpenStreetMap/crons/UpdaterCoordinates.php - About 2 hrs to fix

                                  File PublicHoliday.js has 266 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  /* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */
                                  'use strict';
                                  
                                  $.Class(
                                      'Settings_PublicHoliday_Js',

                                    Function deleteUserPermanently has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            deleteUserPermanently: function (userId, e) {
                                                e.stopPropagation();
                                                app.showConfirmModal({
                                                    title: app.vtranslate('JS_DELETE_USER_PERMANENT_CONFIRMATION'),
                                                    confirmedCallback: () => {
                                    Severity: Major
                                    Found in public_html/layouts/basic/modules/Users/resources/List.js - About 2 hrs to fix

                                      Function deleteItemEvent has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              deleteItemEvent: function (id, inst) {
                                                  let self = this,
                                                      aDeferred = jQuery.Deferred(),
                                                      data = inst.get_json();
                                                  $.each(id, function (_index, e) {

                                        Function hideVerticalBarDatalabelsIfNeeded has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                        hideVerticalBarDatalabelsIfNeeded: function (chart) {
                                                            let getDatasetsMeta = function (chart) {
                                                                const datasets = [];
                                                                const data = chart.data;
                                                                if (typeof data !== 'undefined' && typeof data.datasets !== 'undefined' && Array.isArray(data.datasets)) {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language