.dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php

Summary

Maintainability
F
2 wks
Test Coverage

File class_db_real_utils_pgsql.TODO.php has 807 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

require_once __DIR__ . '/db_real_abstract.php';

/**
Severity: Major
Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php - About 1 day to fix

    class_db_real_utils_pgsql_test has 54 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class class_db_real_utils_pgsql_test extends db_real_abstract
    {
        public static function _need_skip_test($name)
        {
            return false;
    Severity: Major
    Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php - About 7 hrs to fix

      Method test_table_info has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function test_table_info()
          {
              if ($this->_need_skip_test(__FUNCTION__)) {
                  return;
              }
      Severity: Minor
      Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php - About 1 hr to fix

        Method test__parse_column_type has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function test__parse_column_type()
            {
                if ($this->_need_skip_test(__FUNCTION__)) {
                    return;
                }
        Severity: Minor
        Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php - About 1 hr to fix

          Method test_table_get_columns has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function test_table_get_columns()
              {
                  if ($this->_need_skip_test(__FUNCTION__)) {
                      return;
                  }
          Severity: Minor
          Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php - About 1 hr to fix

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

                public function test_foreign_key_info()
                {
                    if ($this->_need_skip_test(__FUNCTION__)) {
                        return;
                    }
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php and 1 other location - About 1 day to fix
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 576..593

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

            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 function test_add_foreign_key()
                {
                    if ($this->_need_skip_test(__FUNCTION__)) {
                        return;
                    }
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php and 1 other location - About 1 day to fix
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 520..537

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

            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

                    $expected = [
                        'id' => [
                            'name' => 'id', 'type' => 'int', 'length' => '10', 'unsigned' => true, 'collate' => null, 'nullable' => false,
                            'default' => null, 'auto_inc' => true, 'primary' => true, 'unique' => false, 'type_raw' => 'int(10) unsigned',
                        ],
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php and 1 other location - About 7 hrs to fix
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 157..170

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

            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

                    $expected_columns = [
                        'id' => [
                            'name' => 'id', 'type' => 'int', 'length' => '10', 'unsigned' => true, 'collate' => null, 'nullable' => false,
                            'default' => null, 'auto_inc' => true, 'primary' => true, 'unique' => false, 'type_raw' => 'int(10) unsigned',
                        ],
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php and 1 other location - About 7 hrs to fix
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 127..140

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

            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

                public function test_create_view()
                {
                    if ($this->_need_skip_test(__FUNCTION__)) {
                        return;
                    }
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php and 2 other locations - About 7 hrs to fix
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 631..644
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 645..658

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

            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

                public function test_view_exists()
                {
                    if ($this->_need_skip_test(__FUNCTION__)) {
                        return;
                    }
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php and 2 other locations - About 7 hrs to fix
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 645..658
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 675..688

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

            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

                public function test_view_info()
                {
                    if ($this->_need_skip_test(__FUNCTION__)) {
                        return;
                    }
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php and 2 other locations - About 7 hrs to fix
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 631..644
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 675..688

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

            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 function test_truncate_database()
                {
                    if ($this->_need_skip_test(__FUNCTION__)) {
                        return;
                    }
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php and 1 other location - About 5 hrs to fix
            .dev/tests/functional/db/class_db_real_utils_mysql_test.Test.php on lines 177..189

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

            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 function test_table_exists()
                {
                    if ($this->_need_skip_test(__FUNCTION__)) {
                        return;
                    }
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php and 1 other location - About 4 hrs to fix
            .dev/tests/functional/db/class_db_real_utils_mysql_test.Test.php on lines 205..216

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

            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 function test_drop_table()
                {
                    if ($this->_need_skip_test(__FUNCTION__)) {
                        return;
                    }
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php and 1 other location - About 4 hrs to fix
            .dev/tests/functional/db/class_db_real_utils_mysql_test.Test.php on lines 217..228

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

            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

                public function test_escape_table_name()
                {
                    if ($this->_need_skip_test(__FUNCTION__)) {
                        return;
                    }
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php and 1 other location - About 1 hr to fix
            .dev/tests/functional/db/class_db_real_utils_mysql_test.Test.php on lines 1316..1324

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

            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

                    $data = [
                        ['name' => 'id', 'type' => 'int', 'length' => 10, 'auto_inc' => true],
                        ['name' => 'name', 'type' => 'varchar', 'length' => 255, 'default' => '', 'not_null' => true],
                        ['name' => 'active', 'type' => 'enum', 'length' => '\'0\',\'1\'', 'default' => '0', 'not_null' => true],
                        ['key' => 'primary', 'key_cols' => 'id'],
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 119..124
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 229..234
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 248..253
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 267..272

            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

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

                    $in = [
                        ['name' => 'id', 'type' => 'int', 'length' => 10, 'auto_inc' => true],
                        ['name' => 'name', 'type' => 'varchar', 'length' => 255, 'default' => '', 'not_null' => true],
                        ['name' => 'active', 'type' => 'enum', 'length' => '\'0\',\'1\'', 'default' => '0', 'not_null' => true],
                        ['key' => 'primary', 'key_cols' => 'id'],
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 119..124
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 149..154
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 229..234
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 267..272

            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

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

                    $data = [
                        ['name' => 'id', 'type' => 'int', 'length' => 10, 'auto_inc' => true],
                        ['name' => 'name', 'type' => 'varchar', 'length' => 255, 'default' => '', 'not_null' => true],
                        ['name' => 'active', 'type' => 'enum', 'length' => '\'0\',\'1\'', 'default' => '0', 'not_null' => true],
                        ['key' => 'primary', 'key_cols' => 'id'],
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 149..154
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 229..234
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 248..253
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 267..272

            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

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

                    $data = [
                        ['name' => 'id', 'type' => 'int', 'length' => 10, 'auto_inc' => true],
                        ['name' => 'name', 'type' => 'varchar', 'length' => 255, 'default' => '', 'not_null' => true],
                        ['name' => 'active', 'type' => 'enum', 'length' => '\'0\',\'1\'', 'default' => '0', 'not_null' => true],
                        ['key' => 'primary', 'key_cols' => 'id'],
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 119..124
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 149..154
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 229..234
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 248..253

            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

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

                    $data = [
                        ['name' => 'id', 'type' => 'int', 'length' => 10, 'auto_inc' => true],
                        ['name' => 'name', 'type' => 'varchar', 'length' => 255, 'default' => '', 'not_null' => true],
                        ['name' => 'active', 'type' => 'enum', 'length' => '\'0\',\'1\'', 'default' => '0', 'not_null' => true],
                        ['key' => 'primary', 'key_cols' => 'id'],
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 119..124
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 149..154
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 248..253
            .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php on lines 267..272

            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

            There are no issues that match your filters.

            Category
            Status