YetiForceCompany/YetiForceCRM

View on GitHub

Showing 306,333 of 306,333 total issues

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

<?php
/**
 * YetiForce shop YetiForceRcPlCeidg file.
 *
 * @see App\RecordCollectors\PlCeidg
Severity: Major
Found in app/YetiForce/Shop/Product/YetiForceRcPlCeidg.php and 13 other locations - About 7 hrs to fix
app/YetiForce/Shop/Product/YetiForcePlGus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcBrReceitaWsCnpj.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcChZefix.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcDkCvr.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcFrEnterpriseGouv.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNoBrregEnhetsreg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNorthData.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlKrs.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkCompaniesHouse.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUsaEdgar.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcVatifyEu.php on lines 1..61

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 232.

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 14 locations. Consider refactoring.
Open

<?php
/**
 * YetiForce shop YetiForceRcDkCvr file.
 *
 * @see App\RecordCollectors\DkCvr
Severity: Major
Found in app/YetiForce/Shop/Product/YetiForceRcDkCvr.php and 13 other locations - About 7 hrs to fix
app/YetiForce/Shop/Product/YetiForcePlGus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcBrReceitaWsCnpj.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcChZefix.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcFrEnterpriseGouv.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNoBrregEnhetsreg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNorthData.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlCeidg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlKrs.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkCompaniesHouse.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUsaEdgar.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcVatifyEu.php on lines 1..61

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 232.

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 14 locations. Consider refactoring.
Open

<?php
/**
 * YetiForce shop YetiForceRcUkCompaniesHouse file.
 *
 * @see App\RecordCollectors\UkCompaniesHouse
Severity: Major
Found in app/YetiForce/Shop/Product/YetiForceRcUkCompaniesHouse.php and 13 other locations - About 7 hrs to fix
app/YetiForce/Shop/Product/YetiForcePlGus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcBrReceitaWsCnpj.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcChZefix.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcDkCvr.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcFrEnterpriseGouv.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNoBrregEnhetsreg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNorthData.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlCeidg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlKrs.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUsaEdgar.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcVatifyEu.php on lines 1..61

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 232.

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 14 locations. Consider refactoring.
Open

<?php
/**
 * YetiForce shop YetiForcePlGus file.
 *
 * @see App\RecordCollectors\Gus
Severity: Major
Found in app/YetiForce/Shop/Product/YetiForcePlGus.php and 13 other locations - About 7 hrs to fix
app/YetiForce/Shop/Product/YetiForceRcBrReceitaWsCnpj.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcChZefix.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcDkCvr.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcFrEnterpriseGouv.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNoBrregEnhetsreg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNorthData.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlCeidg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlKrs.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkCompaniesHouse.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUsaEdgar.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcVatifyEu.php on lines 1..61

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 232.

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 14 locations. Consider refactoring.
Open

<?php
/**
 * YetiForce shop YetiForceRcPlVatPayerStatus file.
 *
 * @see App\RecordCollectors\PlVatPayerStatusVerification
Severity: Major
Found in app/YetiForce/Shop/Product/YetiForceRcPlVatPayerStatus.php and 13 other locations - About 7 hrs to fix
app/YetiForce/Shop/Product/YetiForcePlGus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcBrReceitaWsCnpj.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcChZefix.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcDkCvr.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcFrEnterpriseGouv.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNoBrregEnhetsreg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNorthData.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlCeidg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlKrs.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkCompaniesHouse.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUsaEdgar.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcVatifyEu.php on lines 1..61

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 232.

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 14 locations. Consider refactoring.
Open

<?php
/**
 * YetiForce shop YetiForceRcUkVatPayerStatus file.
 *
 * @see App\RecordCollectors\UkVatPayerStatusVerification
Severity: Major
Found in app/YetiForce/Shop/Product/YetiForceRcUkVatPayerStatus.php and 13 other locations - About 7 hrs to fix
app/YetiForce/Shop/Product/YetiForcePlGus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcBrReceitaWsCnpj.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcChZefix.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcDkCvr.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcFrEnterpriseGouv.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNoBrregEnhetsreg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNorthData.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlCeidg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlKrs.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkCompaniesHouse.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUsaEdgar.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcVatifyEu.php on lines 1..61

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 232.

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 14 locations. Consider refactoring.
Open

<?php
/**
 * YetiForce shop YetiForceRcChZefix file.
 *
 * @see App\RecordCollectors\ChZefix
Severity: Major
Found in app/YetiForce/Shop/Product/YetiForceRcChZefix.php and 13 other locations - About 7 hrs to fix
app/YetiForce/Shop/Product/YetiForcePlGus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcBrReceitaWsCnpj.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcDkCvr.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcFrEnterpriseGouv.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNoBrregEnhetsreg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcNorthData.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlCeidg.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlKrs.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcPlVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkCompaniesHouse.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUkVatPayerStatus.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcUsaEdgar.php on lines 1..61
app/YetiForce/Shop/Product/YetiForceRcVatifyEu.php on lines 1..61

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 232.

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 Mailer.php has 472 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace App;

/**
Severity: Minor
Found in app/Mailer.php - About 7 hrs to fix

    Similar blocks of code found in 2 locations. 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
    modules/SMSTemplates/SMSTemplates.php on lines 1..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 231.

    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

    <?php
    /**
     * Main module file.
     *
     * @package CRMEntity
    Severity: Major
    Found in modules/SMSTemplates/SMSTemplates.php and 1 other location - About 7 hrs to fix
    vtlib/ModuleDir/BaseModule/modules/_ModuleName_/_ModuleName_.php on lines 1..78

    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 231.

    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 populateSharingPrivileges has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function populateSharingPrivileges($enttype, $userId, $module, $pertype, $varArr = false)
        {
            $tabId = Module::getModuleId($module);
            $dbCommand = \App\Db::getInstance()->createCommand();
            if (empty($varArr)) {
    Severity: Minor
    Found in app/UserPrivilegesFile.php - About 7 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function populateRelatedSharingPrivileges has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function populateRelatedSharingPrivileges($enttype, $userId, $module, $relmodule, $pertype, $varArr = false)
        {
            $dbCommand = \App\Db::getInstance()->createCommand();
            $tabId = Module::getModuleId($module);
            $relTabId = Module::getModuleId($relmodule);
    Severity: Minor
    Found in app/UserPrivilegesFile.php - About 7 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function getValueFromImport has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getValueFromImport($value, $defaultValue = null)
        {
            if (empty($value)) {
                return '';
            }
    Severity: Minor
    Found in modules/Vtiger/uitypes/Reference.php - About 7 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    Vtiger_TreeRecords_Js(
        'Products_TreeRecords_Js',
        {},
        {
            getRecordsParams: function (container) {
    public_html/layouts/basic/modules/Services/resources/TreeRecords.js on lines 4..27

    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 179.

    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

    Vtiger_Base_Validator_Js(
        'Vtiger_AlphaNumericWithSlashesCurlyBraces_Validator_Js',
        {
            /**
             *Function which invokes field validation
    Severity: Major
    Found in public_html/layouts/resources/validator/FieldValidator.js and 1 other location - About 7 hrs to fix
    public_html/layouts/resources/validator/FieldValidator.js on lines 1433..1468

    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 179.

    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

                if (dom && dom.length) {
                    let item = dom.children('.jstree-anchor').find('.jstree-category');
                    item.removeClass(options.checkClass).removeClass(options.undeterminedClass);
                    if (obj.category.checked === false) {
                        item.addClass(options.uncheckClass);
    Severity: Major
    Found in public_html/layouts/resources/libraries/jstree.category.js and 1 other location - About 7 hrs to fix
    public_html/layouts/resources/libraries/jstree.category.js on lines 213..227

    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 179.

    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

    Vtiger_Base_Validator_Js(
        'Vtiger_AlphaNumeric_Validator_Js',
        {
            /**
             *Function which invokes field validation
    Severity: Major
    Found in public_html/layouts/resources/validator/FieldValidator.js and 1 other location - About 7 hrs to fix
    public_html/layouts/resources/validator/FieldValidator.js on lines 1469..1504

    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 179.

    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

    Vtiger_TreeRecords_Js(
        'Services_TreeRecords_Js',
        {},
        {
            getRecordsParams: function (container) {
    public_html/layouts/basic/modules/Products/resources/TreeRecords.js on lines 4..27

    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 179.

    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

                if (dom && dom.length) {
                    let item = dom.children('.jstree-anchor').find('.jstree-category');
                    item.removeClass(options.uncheckClass).removeClass(options.undeterminedClass);
                    if (obj.category.checked === true) {
                        item.addClass(options.checkClass);
    Severity: Major
    Found in public_html/layouts/resources/libraries/jstree.category.js and 1 other location - About 7 hrs to fix
    public_html/layouts/resources/libraries/jstree.category.js on lines 259..273

    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 179.

    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

    PackageImport has 51 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class PackageImport extends PackageExport
    {
        /**
         * Module Meta XML File (Parsed).
         */
    Severity: Major
    Found in vtlib/Vtiger/PackageImport.php - About 7 hrs to fix
      Severity
      Category
      Status
      Source
      Language