YetiForceCompany/YetiForceCRM

View on GitHub

Showing 306,333 of 306,333 total issues

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                for (i = 0, j = obj.childNodes.length; i < j; i++) {
                    if (
                        obj.childNodes[i] &&
                        obj.childNodes[i].className &&
                        obj.childNodes[i].className.indexOf('jstree-anchor') !== -1
Severity: Major
Found in public_html/layouts/resources/libraries/jstree.category.js and 2 other locations - About 3 hrs to fix
public_html/layouts/resources/libraries/jstree.checkbox.js on lines 521..530
public_html/layouts/resources/libraries/jstree.edit.js on lines 82..91

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 113.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

    createSwitch() {
        let on = app.vtranslate('JS_WORK_DAYS'),
            off = app.vtranslate('JS_ALL'),
            state = this.isSwitchAllDays;
        return `<div class="btn-group btn-group-toggle js-switch c-calendar-switch" data-toggle="buttons">
public_html/layouts/basic/modules/OSSTimeControl/resources/QuickCreate.js on lines 69..81
public_html/layouts/basic/modules/Occurrences/resources/QuickCreate.js on lines 69..81
public_html/layouts/basic/modules/Reservations/resources/QuickCreate.js on lines 69..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 113.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

    createSwitch() {
        let on = app.vtranslate('JS_WORK_DAYS'),
            off = app.vtranslate('JS_ALL'),
            state = this.isSwitchAllDays;
        return `<div class="btn-group btn-group-toggle js-switch c-calendar-switch" data-toggle="buttons">
public_html/layouts/basic/modules/Calendar/resources/CalendarQuickCreate.js on lines 79..91
public_html/layouts/basic/modules/OSSTimeControl/resources/QuickCreate.js on lines 69..81
public_html/layouts/basic/modules/Occurrences/resources/QuickCreate.js on lines 69..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 113.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                for (i = 0, j = obj.childNodes.length; i < j; i++) {
                    if (
                        obj.childNodes[i] &&
                        obj.childNodes[i].className &&
                        obj.childNodes[i].className.indexOf('jstree-anchor') !== -1
Severity: Major
Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 2 other locations - About 3 hrs to fix
public_html/layouts/resources/libraries/jstree.category.js on lines 58..67
public_html/layouts/resources/libraries/jstree.edit.js on lines 82..91

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 113.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                for (i = 0, j = obj.childNodes.length; i < j; i++) {
                    if (
                        obj.childNodes[i] &&
                        obj.childNodes[i].className &&
                        obj.childNodes[i].className.indexOf('jstree-anchor') !== -1
Severity: Major
Found in public_html/layouts/resources/libraries/jstree.edit.js and 2 other locations - About 3 hrs to fix
public_html/layouts/resources/libraries/jstree.category.js on lines 58..67
public_html/layouts/resources/libraries/jstree.checkbox.js on lines 521..530

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 113.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File Index.js has 329 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_RecordNumbering_Index_Js',

    File User.php has 329 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace App;
    
    /**
    Severity: Minor
    Found in app/User.php - About 3 hrs to fix

      File Record.php has 329 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /* +***********************************************************************************
       * The contents of this file are subject to the vtiger CRM Public License Version 1.0
       * ("License"); You may not use this file except in compliance with the License
       * The Original Code is:  vtiger CRM Open Source
      Severity: Minor
      Found in modules/Calendar/models/Record.php - About 3 hrs to fix

        Function getPopUp has 97 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                getPopUp(container) {
                    if (typeof container === 'undefined') {
                        container = this.getContainer();
                    }
                    container.on('click', '.getPopupUi', (e) => {

          Function registerParams has 97 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  registerParams(selectElement, params) {
                      if (typeof params.dropdownParent === 'undefined') {
                          const modalParent = $(selectElement).closest('.modal-body');
                          if (modalParent.length) {
                              params.dropdownParent = modalParent;
          Severity: Major
          Found in public_html/layouts/resources/Fields.js - About 3 hrs to fix

            File Watchdog.php has 328 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            /**
             * Watching Model Class.
             *
            Severity: Minor
            Found in modules/Vtiger/models/Watchdog.php - About 3 hrs to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                                              AppConnector.request({
                                                  module: self.moduleName,
                                                  action: 'Fields',
                                                  mode: 'findAddress',
                                                  type: search.find('.js-select-operator').val(),
              Severity: Major
              Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js and 1 other location - About 3 hrs to fix
              public_html/layouts/basic/modules/OpenStreetMap/resources/Map.js on lines 341..359

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 112.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                                          AppConnector.request({
                                              module: app.getModuleName(),
                                              action: 'Fields',
                                              mode: 'findAddress',
                                              type: operator.val(),
              public_html/layouts/basic/modules/Vtiger/resources/Edit.js on lines 1151..1169

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 112.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Function registerConfirmations has 96 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      registerConfirmations: function (container) {
                          let form = container.find('.js-filter-form');
                          App.Fields.Date.registerRange(form);
                          let table = $('#js-confirm-table');
                          if (table.hasClass('dataTable')) {
              Severity: Major
              Found in public_html/layouts/basic/components/InterestsConflict.js - About 3 hrs to fix

                Method maximumFieldsLength has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function maximumFieldsLength(array $conditions = []): array
                    {
                        $typesNotSupported = ['datetime', 'date', 'year', 'timestamp', 'time'];
                        $uiTypeNotSupported = [30];
                        $updated = $requiresVerification = $typeNotFound = $notSupported = 0;
                Severity: Major
                Found in app/Db/Fixer.php - About 3 hrs to fix

                  Method initMailPart has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      protected static function initMailPart($mbox, $mail, $partStructure, $partNum)
                      {
                          if ($partNum) {
                              \App\Log::beginProfile(__METHOD__ . '|imap_fetchbody', 'Mail|IMAP');
                              $data = $orgData = imap_fetchbody($mbox, $mail['id'], $partNum, FT_UID | FT_PEEK);
                  Severity: Major
                  Found in modules/OSSMail/models/Record.php - About 3 hrs to fix

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                    <?php
                    /**
                     * YetiForce shop YetiForceAutoAssignment file.
                     *
                     * @package App
                    Severity: Major
                    Found in app/YetiForce/Shop/Product/YetiForceAutoAssignment.php and 4 other locations - About 3 hrs to fix
                    app/YetiForce/Shop/Product/YetiForceDav.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForceGeocoder.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForceKanban.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForcePassword.php on lines 1..48

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 159.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                    <?php
                    /**
                     * YetiForce shop YetiForceGeocoder file.
                     *
                     * @package App
                    Severity: Major
                    Found in app/YetiForce/Shop/Product/YetiForceGeocoder.php and 4 other locations - About 3 hrs to fix
                    app/YetiForce/Shop/Product/YetiForceAutoAssignment.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForceDav.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForceKanban.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForcePassword.php on lines 1..48

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 159.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                    <?php
                    /**
                     * YetiForce shop YetiForcePassword file.
                     *
                     * @package App
                    Severity: Major
                    Found in app/YetiForce/Shop/Product/YetiForcePassword.php and 4 other locations - About 3 hrs to fix
                    app/YetiForce/Shop/Product/YetiForceAutoAssignment.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForceDav.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForceGeocoder.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForceKanban.php on lines 1..48

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 159.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                    <?php
                    /**
                     * YetiForce shop YetiForceDav file.
                     *
                     * @package App
                    Severity: Major
                    Found in app/YetiForce/Shop/Product/YetiForceDav.php and 4 other locations - About 3 hrs to fix
                    app/YetiForce/Shop/Product/YetiForceAutoAssignment.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForceGeocoder.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForceKanban.php on lines 1..48
                    app/YetiForce/Shop/Product/YetiForcePassword.php on lines 1..48

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 159.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Severity
                    Category
                    Status
                    Source
                    Language