Admidio/admidio

View on GitHub
adm_program/system/classes/ComponentUpdateSteps.php

Summary

Maintainability
F
1 wk
Test Coverage

File ComponentUpdateSteps.php has 866 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
use Ramsey\Uuid\Uuid;
use Admidio\Exception;

// this must be declared for backwards compatibility. Can be removed if update scripts don't use it anymore
Severity: Major
Found in adm_program/system/classes/ComponentUpdateSteps.php - About 2 days to fix

    Function updateStep41CategoryReportMigration has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function updateStep41CategoryReportMigration()
        {
            global $gL10n, $gProfileFields;
    
            $sql = 'SELECT org_id FROM ' . TBL_ORGANIZATIONS;
    Severity: Minor
    Found in adm_program/system/classes/ComponentUpdateSteps.php - About 4 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

    ComponentUpdateSteps has 34 functions (exceeds 20 allowed). Consider refactoring.
    Open

    final class ComponentUpdateSteps
    {
        /**
         * @var Database
         */
    Severity: Minor
    Found in adm_program/system/classes/ComponentUpdateSteps.php - About 4 hrs to fix

      Method updateStep41CategoryReportMigration has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function updateStep41CategoryReportMigration()
          {
              global $gL10n, $gProfileFields;
      
              $sql = 'SELECT org_id FROM ' . TBL_ORGANIZATIONS;
      Severity: Major
      Found in adm_program/system/classes/ComponentUpdateSteps.php - About 2 hrs to fix

        Method updateStep41PostgreSqlSetBoolean has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function updateStep41PostgreSqlSetBoolean()
            {
                $updateColumnsBoolean = array(
                    array('table' => TBL_CATEGORIES, 'column' => 'cat_system'),
                    array('table' => TBL_CATEGORIES, 'column' => 'cat_default'),
        Severity: Major
        Found in adm_program/system/classes/ComponentUpdateSteps.php - About 2 hrs to fix

          Method updateStep43AddSocialNetworkProfileFields has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function updateStep43AddSocialNetworkProfileFields()
              {
                  global $gProfileFields;
          
                  $sql = 'SELECT cat_id FROM ' . TBL_CATEGORIES . ' WHERE cat_name_intern = \'SOCIAL_NETWORKS\' ';
          Severity: Minor
          Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr to fix

            Method updateStep33AddDefaultParticipantList has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static function updateStep33AddDefaultParticipantList()
                {
                    global $gL10n;
            
                    // read id of system user from database
            Severity: Minor
            Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr to fix

              Method updateStep32NewDownloadRootFolderName has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function updateStep32NewDownloadRootFolderName()
                  {
                      global $gLogger, $g_organization;
              
                      $sql = 'SELECT org_id, org_shortname FROM ' . TBL_ORGANIZATIONS;
              Severity: Minor
              Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr to fix

                Function updateStep41MigrateMessageRecipients has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                    public static function updateStep41MigrateMessageRecipients()
                    {
                        $sql = 'SELECT msg_id, msg_usr_id_receiver FROM ' . TBL_MESSAGES;
                        $messagesStatement = self::$db->queryPrepared($sql);
                
                
                Severity: Minor
                Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr 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 updateStep32NewDownloadRootFolderName has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                    public static function updateStep32NewDownloadRootFolderName()
                    {
                        global $gLogger, $g_organization;
                
                        $sql = 'SELECT org_id, org_shortname FROM ' . TBL_ORGANIZATIONS;
                Severity: Minor
                Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr 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

                Method updateStep33EventCategory has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function updateStep33EventCategory()
                    {
                        global $g_organization, $gL10n;
                
                        $sql = 'SELECT org_id, org_shortname FROM ' . TBL_ORGANIZATIONS;
                Severity: Minor
                Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr to fix

                  Method updateStep41AddUuid has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function updateStep41AddUuid()
                      {
                          $updateTablesUuid = array(
                              array('table' => TBL_ANNOUNCEMENTS, 'column_id' => 'ann_id', 'column_uuid' => 'ann_uuid'),
                              array('table' => TBL_CATEGORIES, 'column_id' => 'cat_id', 'column_uuid' => 'cat_uuid'),
                  Severity: Minor
                  Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr to fix

                    Method updateStep32MigrateToFolderRights has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function updateStep32MigrateToFolderRights()
                        {
                            global $g_organization;
                    
                            // migrate adm_folder_roles to adm_roles_rights
                    Severity: Minor
                    Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr to fix

                      Method updateStep40RenameDownloadRootFolder has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function updateStep40RenameDownloadRootFolder()
                          {
                              global $gLogger;
                      
                              $sql = 'SELECT org_id, org_shortname FROM ' . TBL_ORGANIZATIONS;
                      Severity: Minor
                      Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr to fix

                        Method updateStep33MigrateDatesRightsToFolderRights has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function updateStep33MigrateDatesRightsToFolderRights()
                            {
                                // migrate adm_folder_roles to adm_roles_rights
                                $sql = 'SELECT ror_id
                                          FROM ' . TBL_ROLES_RIGHTS . '
                        Severity: Minor
                        Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr to fix

                          Method updateStep32AddAnnouncementsCategories has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function updateStep32AddAnnouncementsCategories()
                              {
                                  global $gL10n;
                          
                                  // read id of system user from database
                          Severity: Minor
                          Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr to fix

                            Function updateStep40RenameDownloadRootFolder has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public static function updateStep40RenameDownloadRootFolder()
                                {
                                    global $gLogger;
                            
                                    $sql = 'SELECT org_id, org_shortname FROM ' . TBL_ORGANIZATIONS;
                            Severity: Minor
                            Found in adm_program/system/classes/ComponentUpdateSteps.php - About 1 hr 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 updateStep43AddSocialNetworkProfileFields has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public static function updateStep43AddSocialNetworkProfileFields()
                                {
                                    global $gProfileFields;
                            
                                    $sql = 'SELECT cat_id FROM ' . TBL_CATEGORIES . ' WHERE cat_name_intern = \'SOCIAL_NETWORKS\' ';
                            Severity: Minor
                            Found in adm_program/system/classes/ComponentUpdateSteps.php - About 35 mins 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 updateStep33DownloadOrgFolderName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public static function updateStep33DownloadOrgFolderName()
                                {
                                    global $gLogger;
                            
                                    $sql = 'SELECT org_shortname FROM ' . TBL_ORGANIZATIONS;
                            Severity: Minor
                            Found in adm_program/system/classes/ComponentUpdateSteps.php - About 25 mins 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

                                    $sql = 'INSERT INTO ' . TBL_MENU . '
                                                   (men_com_id, men_men_id_parent, men_node, men_order, men_standard, men_name_intern, men_url, men_icon, men_name, men_description)
                                            VALUES (NULL, NULL, 1, 1, 1, \'modules\', NULL, \'\', \'SYS_MODULES\', \'\')
                                                 , (NULL, NULL, 1, 2, 1, \'administration\', NULL, \'\', \'SYS_ADMINISTRATION\', \'\')
                                                 , (NULL, NULL, 1, 3, 1, \'plugins\', NULL, \'\', \'SYS_PLUGINS\', \'\')
                            Severity: Major
                            Found in adm_program/system/classes/ComponentUpdateSteps.php and 1 other location - About 1 day to fix
                            adm_program/installation/install_steps/start_installation.php on lines 70..85

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

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

                                    foreach ($updateTablesUuid as $tableUuid) {
                                        $sql = 'SELECT ' . $tableUuid['column_id'] . '
                                                  FROM ' . $tableUuid['table'] . '
                                                 WHERE ' . $tableUuid['column_uuid'] . ' IS NULL ';
                                        $statement = self::$db->queryPrepared($sql);
                            Severity: Major
                            Found in adm_program/system/classes/ComponentUpdateSteps.php and 1 other location - About 3 hrs to fix
                            adm_program/system/classes/ComponentUpdateSteps.php on lines 412..425

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

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

                                    foreach ($updateTablesUuid as $tableUuid) {
                                        $sql = 'SELECT ' . $tableUuid['column_id'] . '
                                                  FROM ' . $tableUuid['table'] . '
                                                 WHERE ' . $tableUuid['column_uuid'] . ' IS NULL ';
                                        $statement = self::$db->queryPrepared($sql);
                            Severity: Major
                            Found in adm_program/system/classes/ComponentUpdateSteps.php and 1 other location - About 3 hrs to fix
                            adm_program/system/classes/ComponentUpdateSteps.php on lines 40..53

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

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

                                        if (!array_key_exists('MASTODON', $profileFields)) {
                                            $profileFieldInstagram = new TableUserField(self::$db);
                                            $profileFieldInstagram->saveChangesWithoutRights();
                                            $profileFieldInstagram->setValue('usf_cat_id',(int) $row['cat_id']);
                                            $profileFieldInstagram->setValue('usf_type', 'TEXT');
                            Severity: Major
                            Found in adm_program/system/classes/ComponentUpdateSteps.php and 2 other locations - About 2 hrs to fix
                            adm_program/system/classes/ComponentUpdateSteps.php on lines 94..105
                            adm_program/system/classes/ComponentUpdateSteps.php on lines 107..118

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

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

                                        if (!array_key_exists('LINKEDIN', $profileFields)) {
                                            $profileFieldLinkedIn = new TableUserField(self::$db);
                                            $profileFieldLinkedIn->saveChangesWithoutRights();
                                            $profileFieldLinkedIn->setValue('usf_cat_id',(int) $row['cat_id']);
                                            $profileFieldLinkedIn->setValue('usf_type', 'TEXT');
                            Severity: Major
                            Found in adm_program/system/classes/ComponentUpdateSteps.php and 2 other locations - About 2 hrs to fix
                            adm_program/system/classes/ComponentUpdateSteps.php on lines 107..118
                            adm_program/system/classes/ComponentUpdateSteps.php on lines 120..131

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

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

                                        if (!array_key_exists('INSTAGRAM', $profileFields)) {
                                            $profileFieldInstagram = new TableUserField(self::$db);
                                            $profileFieldInstagram->saveChangesWithoutRights();
                                            $profileFieldInstagram->setValue('usf_cat_id',(int) $row['cat_id']);
                                            $profileFieldInstagram->setValue('usf_type', 'TEXT');
                            Severity: Major
                            Found in adm_program/system/classes/ComponentUpdateSteps.php and 2 other locations - About 2 hrs to fix
                            adm_program/system/classes/ComponentUpdateSteps.php on lines 94..105
                            adm_program/system/classes/ComponentUpdateSteps.php on lines 120..131

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

                            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

                                public static function updateStep41AddSystemmailText()
                                {
                                    global $gL10n;
                            
                                    $sql = 'SELECT org_id, org_shortname FROM ' . TBL_ORGANIZATIONS;
                            Severity: Major
                            Found in adm_program/system/classes/ComponentUpdateSteps.php and 1 other location - About 1 hr to fix
                            adm_program/system/classes/ComponentUpdateSteps.php on lines 140..154

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

                            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

                                public static function updateStep43AddNewNotificationText()
                                {
                                    global $gL10n;
                            
                                    $sql = 'SELECT org_id, org_shortname FROM ' . TBL_ORGANIZATIONS;
                            Severity: Major
                            Found in adm_program/system/classes/ComponentUpdateSteps.php and 1 other location - About 1 hr to fix
                            adm_program/system/classes/ComponentUpdateSteps.php on lines 471..485

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

                            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

                            There are no issues that match your filters.

                            Category
                            Status