Showing 971 of 4,218 total issues

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

        if ((defined('FORCE_RESIZE_IMAGE_SIZE') && filesize($photo_path) > FORCE_RESIZE_IMAGE_SIZE)
            || defined('FORCE_RESIZE_WIDTH') && $real_image_info[0] > FORCE_RESIZE_WIDTH
            || defined('FORCE_RESIZE_HEIGHT') && $real_image_info[1] > FORCE_RESIZE_HEIGHT
        ) {
            return common()->make_thumb($photo_path, $photo_path, $LIMIT_X, $LIMIT_Y);
Severity: Major
Found in plugins/common/classes/common/yf_upload_image.class.php and 1 other location - About 1 hr to fix
plugins/common/classes/common/yf_multi_upload_image.class.php on lines 130..135

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

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

        if ((defined('FORCE_RESIZE_IMAGE_SIZE') && filesize($photo_path) > FORCE_RESIZE_IMAGE_SIZE)
            || defined('FORCE_RESIZE_WIDTH') && $real_image_info[0] > FORCE_RESIZE_WIDTH
            || defined('FORCE_RESIZE_HEIGHT') && $real_image_info[1] > FORCE_RESIZE_HEIGHT
        ) {
            return common()->make_thumb($photo_path, $photo_path, $LIMIT_X, $LIMIT_Y);
plugins/common/classes/common/yf_upload_image.class.php on lines 116..121

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

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 key($name = 'public', $value = null)
    {
        if ( ! in_array($name, ['public', 'private', 'private_test'])) {
            return  null;
        }
plugins/payment/classes/payment_provider/ecommpay/EcommPay.php on lines 24..37

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

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

        'email' => [
            'name' => 'email',
            'type' => 'varchar',
            'length' => 50,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 133..148
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 117..132

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

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

        'active' => [
            'name' => 'active',
            'type' => 'tinyint',
            'length' => 1,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 69..84
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 133..148
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 117..132

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

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

        'rental_duration' => [
            'name' => 'rental_duration',
            'type' => 'tinyint',
            'length' => 3,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 69..84
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 133..148
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 117..132

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

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

        'rental_id' => [
            'name' => 'rental_id',
            'type' => 'int',
            'length' => 11,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 69..84
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 133..148
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 117..132

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

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

        'active' => [
            'name' => 'active',
            'type' => 'tinyint',
            'length' => 1,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 69..84
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 133..148
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 85..100

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

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

        'original_language_id' => [
            'name' => 'original_language_id',
            'type' => 'tinyint',
            'length' => 3,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 69..84
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 133..148
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 117..132

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

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

        'address2' => [
            'name' => 'address2',
            'type' => 'varchar',
            'length' => 50,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 69..84
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 133..148
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 117..132

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

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

        'email' => [
            'name' => 'email',
            'type' => 'varchar',
            'length' => 50,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 69..84
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 133..148
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 117..132

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

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

        'release_year' => [
            'name' => 'release_year',
            'type' => 'year',
            'length' => 4,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 69..84
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 133..148
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 117..132

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

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

        'postal_code' => [
            'name' => 'postal_code',
            'type' => 'varchar',
            'length' => 10,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 69..84
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 133..148
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 117..132

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

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

        'length' => [
            'name' => 'length',
            'type' => 'smallint',
            'length' => 5,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_address.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 69..84
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 101..116
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 53..68
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 117..132

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

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 static function setUpBeforeClass() : void
    {
        self::$_bak_settings['REWRITE_MODE'] = $GLOBALS['PROJECT_CONF']['tpl']['REWRITE_MODE'];
        $GLOBALS['PROJECT_CONF']['tpl']['REWRITE_MODE'] = true;
        $_GET = [
Severity: Major
Found in .dev/tests/rewrite/class_rewrite_testing_shared.php and 1 other location - About 1 hr to fix
.dev/tests/rewrite/class_rewrite_testing_admin.php on lines 10..20

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

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

        return table($sql, [
                'caption' => t('Order revisions'),
                'no_records_html' => '',
                'pager_records_on_page' => 5,
                'no_pages' => true,
plugins/shop/admin_modules/manage_shop/yf_manage_shop_hook_side_column.class.php on lines 181..191

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

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

        return table($sql, [
                'caption' => t('Order revisions'),
                'no_records_html' => '',
                'pager_records_on_page' => 5,
                'no_pages' => true,
plugins/shop/admin_modules/manage_shop/yf_manage_shop_hook_side_column.class.php on lines 132..142

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

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

                if (is_numeric($id)) {
                    $id && $user_ids[$id] = $id;
                } elseif (is_array($id)) {
                    foreach ((array) $id as $_id) {
                        $_id && $user_ids[$_id] = $_id;
Severity: Major
Found in plugins/table2/classes/yf_table2.class.php and 1 other location - About 1 hr to fix
plugins/table2/classes/yf_table2.class.php on lines 1352..1363

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

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 static function setUpBeforeClass() : void
    {
        self::$_bak_settings['REWRITE_MODE'] = $GLOBALS['PROJECT_CONF']['tpl']['REWRITE_MODE'];
        $GLOBALS['PROJECT_CONF']['tpl']['REWRITE_MODE'] = true;
        $_GET = [
Severity: Major
Found in .dev/tests/rewrite/class_rewrite_testing_admin.php and 1 other location - About 1 hr to fix
.dev/tests/rewrite/class_rewrite_testing_shared.php on lines 9..19

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

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

            if (is_numeric($id)) {
                $user_ids[$id] = $id;
            } elseif (is_array($id)) {
                foreach ((array) $id as $_id) {
                    $_id && $user_ids[$_id] = $_id;
Severity: Major
Found in plugins/table2/classes/yf_table2.class.php and 1 other location - About 1 hr to fix
plugins/table2/classes/yf_table2.class.php on lines 1326..1337

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

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language