YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

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

        mapResultsToFields: function (referenceModule, parentRow, responseData) {
            let unit,
                taxParam = [];
            let thisInstance = this;
            let isGroupTax = thisInstance.isGroupTaxMode();
Severity: Major
Found in public_html/layouts/basic/modules/Vtiger/resources/Inventory.js - About 2 hrs to fix

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

                    hideHorizontalBarDatalabelsIfNeeded: function hideHorizontalBarDatalabelsIfNeeded(chart) {
                        let getDatasetsMeta = function (chart) {
                            const datasets = [];
                            const data = chart.data;
                            if (typeof data !== 'undefined' && typeof data.datasets !== 'undefined' && Array.isArray(data.datasets)) {

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

          getDefaultParams() {
              const users = app.moduleCacheGet('calendar-users') || CONFIG.userId,
                  sideBar = this.getSidebarView();
              let filters = [],
                  params = {
      Severity: Major
      Found in public_html/layouts/resources/Calendar.js - About 2 hrs to fix

        File Log.php has 265 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * Logger files.
         *
         * @package App
        Severity: Minor
        Found in app/Log.php - About 2 hrs to fix

          File Z_ResetingRecordNumber.php has 265 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * Reseting record number test class.
           *
           * @package   Tests
          Severity: Minor
          Found in tests/Base/Z_ResetingRecordNumber.php - About 2 hrs to fix

            Method getFooterScripts has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getFooterScripts(\App\Request $request)
                {
                    $jsFileNames = [
                        '~libraries/block-ui/jquery.blockUI.js',
                        '~libraries/select2/dist/js/select2.full.js',
            Severity: Major
            Found in app/Controller/View/Base.php - About 2 hrs to fix

              Method getAdvanceData has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getAdvanceData(array &$response): void
                  {
                      if (isset($response['Typ'], $response['SilosID']) && ($reportName = $this->getReportName($response['Typ'], $response['SilosID']))) {
                          $responseFromGus = $this->getData('DanePobierzPelnyRaport', ['pRegon' => $response['Regon'], 'pNazwaRaportu' => $reportName]);
                          if (empty($responseFromGus)) {
              Severity: Major
              Found in app/RecordCollectors/Helper/GusClient.php - About 2 hrs to fix

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

                    public function getFieldInstanceByName($name, $edit = false)
                    {
                        if (!isset($this->fields[$name])) {
                            $moduleName = $this->getName(true);
                            $params = ['column' => $name, 'name' => $name, 'label' => $this->listFields[$name] ?? '', 'displaytype' => 1, 'typeofdata' => 'V~M', 'presence' => '', 'isEditableReadOnly' => false, 'maximumlength' => '255', 'sort' => true];
                Severity: Major
                Found in modules/Settings/AdminAccess/models/Module.php - About 2 hrs to fix

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

                      public function process(App\Request $request)
                      {
                          $recordId = $request->getInteger('record');
                          $modules = $request->getArray('modules', 'Alnum');
                          $assignId = $request->getInteger('assigned_user_id');
                  Severity: Major
                  Found in modules/Leads/views/SaveConvertLead.php - About 2 hrs to fix

                    Method performTasks has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function performTasks(App\EventHandler $eventHandler, $condition = [])
                        {
                            $recordModel = $eventHandler->getRecordModel();
                            $moduleName = $eventHandler->getModuleName();
                            if (!isset($this->workflows[$moduleName])) {
                    Severity: Major
                    Found in modules/Vtiger/handlers/Workflow.php - About 2 hrs to fix

                      Method getListViewHeaders has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getListViewHeaders()
                          {
                              $headerFieldModels = [];
                              if ($this->isEmpty('viewId')) {
                                  $queryGenerator = $this->getQueryGenerator();
                      Severity: Major
                      Found in modules/Vtiger/models/ListView.php - About 2 hrs to fix

                        Method setRecordFieldValues has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function setRecordFieldValues($parentRecordModel)
                            {
                                $mfInstance = Vtiger_MappedFields_Model::getInstanceByModules($parentRecordModel->getModule()->getId(), $this->getModule()->getId());
                                if ($mfInstance) {
                                    $defaultInvRow = [];
                        Severity: Major
                        Found in modules/Vtiger/models/Record.php - About 2 hrs to fix

                          File Records.php has 264 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          /**
                           * Abstract base view controller file.
                           *
                           * @package   Export
                          Severity: Minor
                          Found in app/Export/Records.php - About 2 hrs to fix

                            ImportJs has 22 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                                var ImportJs = {
                                    toogleMergeConfiguration: function () {
                                        var mergeChecked = jQuery('#auto_merge').is(':checked');
                                        var duplicateMergeConfiguration = jQuery('#duplicates_merge_configuration');
                                        if (mergeChecked) {
                            Severity: Minor
                            Found in public_html/layouts/basic/modules/Import/resources/Import.js - About 2 hrs to fix

                              EventHandler has 22 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class EventHandler
                              {
                                  /**
                                   * Table name.
                                   *
                              Severity: Minor
                              Found in app/EventHandler.php - About 2 hrs to fix

                                BaseField has 22 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class BaseField
                                {
                                    /**
                                     * @var \Vtiger_Record_Model
                                     */
                                Severity: Minor
                                Found in app/Conditions/RecordFields/BaseField.php - About 2 hrs to fix

                                  ServiceContracts has 22 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class ServiceContracts
                                  {
                                      /**
                                       * Fields map.
                                       *
                                  Severity: Minor
                                  Found in app/Utils/ServiceContracts.php - About 2 hrs to fix

                                    Settings_LayoutEditor_Field_Model has 22 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class Settings_LayoutEditor_Field_Model extends Settings_Vtiger_Field_Model
                                    {
                                        /** @var Settings_Vtiger_Field_Model[] Item field models */
                                        private $items = [];
                                        /** @var Vtiger_Field_Model|null Source field model */
                                    Severity: Minor
                                    Found in modules/Settings/LayoutEditor/models/Field.php - About 2 hrs to fix

                                      Settings_Workflows_TaskRecord_Model has 22 functions (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      class Settings_Workflows_TaskRecord_Model extends Settings_Vtiger_Record_Model
                                      {
                                          /**
                                           * Task status active.
                                           *
                                      Severity: Minor
                                      Found in modules/Settings/Workflows/models/TaskRecord.php - About 2 hrs to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                if (('updateWidgetConfig' === $mode && $request->has('widgetid') && $widget->get('active'))
                                                    || (('remove' === $mode || 'removeWidgetFromList' === $mode) && !$widget->isDefault() && \App\Privilege::isPermitted($moduleName))
                                                    || (('positions' === $mode || 'clear' === $mode) && \App\Privilege::isPermitted($moduleName))
                                                    || 'add' === $mode) {
                                                    return true;
                                        Severity: Critical
                                        Found in modules/Vtiger/actions/Widget.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language