YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Vtiger_Link_Model has 23 functions (exceeds 20 allowed). Consider refactoring.
Open

class Vtiger_Link_Model extends vtlib\Link
{
    // Class variable to store the child links
    protected $childlinks = [];

Severity: Minor
Found in modules/Vtiger/models/Link.php - About 2 hrs to fix

    Function registerConditionsModal has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            registerConditionsModal(container) {
                container.on('click', '.js-condition-modal', (e) => {
                    let element = $(e.currentTarget);
                    let fieldValue = element.closest('.js-conditions-row').find('[name="fieldname"]').val();
                    let sourceField = container.find('.js-condition-value');

      Function getFiltersData has 62 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              getFiltersData: function (e, params) {
                  let currentElement;
                  if (e.currentTarget) {
                      currentElement = jQuery(e.currentTarget);
                  } else {
      Severity: Major
      Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 2 hrs to fix

        Function sanitizeFieldMapping has 62 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                sanitizeFieldMapping: function () {
                    var fieldsList = jQuery('.fieldIdentifier');
                    var mappedFields = {};
                    var inventoryMappedFields = {};
                    var errorMessage;
        Severity: Major
        Found in public_html/layouts/basic/modules/Import/resources/Import.js - About 2 hrs to fix

          Function postMassEdit has 62 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  postMassEdit: function (massEditContainer) {
                      let thisInstance = this;
                      let editInstance = Vtiger_Edit_Js.getInstance();
                      massEditContainer.find('.selectRow').on('change', function (e) {
                          let element = $(e.currentTarget);
          Severity: Major
          Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 2 hrs to fix

            Method importField has 62 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function importField($blocknode, $blockInstance, $moduleInstance, $fieldnode)
                {
                    $fieldInstance = new Field();
                    $fieldInstance->name = (string) $fieldnode->fieldname;
                    $fieldInstance->label = (string) $fieldnode->fieldlabel;
            Severity: Major
            Found in vtlib/Vtiger/PackageImport.php - About 2 hrs to fix

              Method getBrowserInfo has 62 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function getBrowserInfo(): object
                  {
                      if (empty(self::$browserCache)) {
                          $browserAgent = strtolower(\App\Request::_getServer('HTTP_USER_AGENT', ''));
              
              
              Severity: Major
              Found in app/RequestUtil.php - About 2 hrs to fix

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

                    public function process()
                    {
                        $html = '';
                        $moduleModel = \Vtiger_Module_Model::getInstance($this->textParser->moduleName);
                        $pdf = $this->textParser->getParam('pdf');
                Severity: Major
                Found in app/TextParser/RecordsList.php - About 2 hrs to fix

                  Method validate has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function validate(array $data, bool $throw = true)
                      {
                          $message = null;
                          $code = null;
                          $result = false;
                  Severity: Major
                  Found in modules/Settings/LayoutEditor/models/Module.php - About 2 hrs to fix

                    Method getQuery has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getQuery()
                        {
                            $queryGenerator = new App\QueryGenerator($this->getModuleName());
                            if ($this->has('customFilter')) {
                                $queryGenerator->initForCustomViewById($this->get('customFilter'));
                    Severity: Major
                    Found in modules/OSSTimeControl/models/Calendar.php - About 2 hrs to fix

                      Method createInventoryTables has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function createInventoryTables()
                          {
                              $db = \App\Db::getInstance();
                              $importer = new \App\Db\Importers\Base();
                              $focus = CRMEntity::getInstance($this->getModuleName());
                      Severity: Major
                      Found in modules/Vtiger/models/Inventory.php - About 2 hrs to fix

                        Method getWidgetData has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getWidgetData($moduleName, $owner)
                            {
                                $rawData = $data = $years = [];
                                $dateStart = ((int) date('Y') - 2) . '-01-01';
                                $dateEnd = date('Y-m-d', strtotime('last day of december'));
                        Severity: Major
                        Found in modules/FInvoice/dashboards/SummationByMonths.php - About 2 hrs to fix

                          Method getQuery has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getQuery()
                              {
                                  $queryGenerator = new App\QueryGenerator($this->getModuleName());
                                  if ($this->has('customFilter')) {
                                      $queryGenerator->initForCustomViewById($this->get('customFilter'));
                          Severity: Major
                          Found in modules/Reservations/models/Calendar.php - About 2 hrs to fix

                            File RecordStatus.php has 269 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            /**
                             * Record status service file.
                             *
                             * @package App
                            Severity: Minor
                            Found in app/RecordStatus.php - About 2 hrs to fix

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

                                      submit() {
                                          var aDeferred = jQuery.Deferred();
                                          var form = this.getContainer();
                                          var progressIndicatorElement = jQuery.progressIndicator({
                                              position: 'html',
                              Severity: Major
                              Found in public_html/layouts/basic/modules/Settings/PDF/resources/Edit1.js - About 2 hrs to fix

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

                                        registerEvents: function () {
                                            var thisInstance = this;
                                            var container = this.getContainer();
                                
                                            container.on('change', '#searchModuleList', function (e) {
                                Severity: Major
                                Found in public_html/layouts/basic/modules/Vtiger/resources/AdvanceSearch.js - About 2 hrs to fix

                                  Function addComment has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          addComment: function (currentTarget, data) {
                                              const self = this;
                                              let mode = currentTarget.data('mode'),
                                                  closestAddCommentBlock = currentTarget.closest('.js-add-comment-block'),
                                                  commentTextAreaElement = closestAddCommentBlock.find('.js-comment-content'),
                                  Severity: Major
                                  Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 2 hrs to fix

                                    Function registerSaveRecords has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            registerSaveRecords: function (container) {
                                                const thisInstance = this;
                                                let ord = [],
                                                    ocd = [];
                                                $.each(thisInstance.getRecords(), function (index, value) {

                                      Function registerModal has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          registerModal: function (container) {
                                              if (typeof container === 'undefined') {
                                                  container = $('body');
                                              }
                                              container
                                      Severity: Major
                                      Found in public_html/layouts/resources/app.js - About 2 hrs to fix

                                        Method updateField has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function updateField($blocknode, $blockInstance, $moduleInstance, $fieldnode, $fieldInstance)
                                            {
                                                // strval used because in $fieldnode there is a SimpleXMLElement object
                                                $fieldInstance->name = (string) ($fieldnode->fieldname);
                                                $fieldInstance->label = (string) ($fieldnode->fieldlabel);
                                        Severity: Major
                                        Found in vtlib/Vtiger/PackageUpdate.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language