Showing 971 of 4,218 total issues

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

        $result = table($_sql, [
                'filter' => $_filter,
                'filter_params' => [
                    'operation_id' => 'in',
                    'title' => 'like',
Severity: Major
Found in plugins/payment/admin_modules/yf_manage_payment.class.php and 6 other locations - About 1 hr to fix
plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 352..413
plugins/payment/admin_modules/yf_manage_payment_operation.class.php on lines 325..419
plugins/payment/admin_modules/yf_manage_payout.class.php on lines 419..515
plugins/payment/admin_modules/yf_manage_payout.class.php on lines 1127..1142
plugins/payment/admin_modules/yf_manage_transfer.class.php on lines 281..355
plugins/payment/admin_modules/yf_manage_transfer.class.php on lines 619..654

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

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

                $sql_array = [
                    'code' => $this->_cleanup_code($_POST['code']),
                    'user_id' => (int) ($_POST['user_id']),
                    'sum' => (int) ($_POST['sum']),
                    'status' => (int) ($_POST['status']),
plugins/shop/admin_modules/manage_shop/yf_manage_shop_coupons.class.php on lines 118..127

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

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

                $sql_array = [
                    'code' => $this->_cleanup_code($_POST['code']),
                    'user_id' => (int) ($_POST['user_id']),
                    'sum' => (int) ($_POST['sum']),
                    'status' => (int) ($_POST['status']),
plugins/shop/admin_modules/manage_shop/yf_manage_shop_coupons.class.php on lines 67..76

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

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, [
                'no_header' => 1,
                'btn_no_text' => 1,
                'no_records_simple' => 1,
                'no_pages' => 1,
plugins/shop/admin_modules/manage_shop/yf_manage_shop_hook_widgets.class.php on lines 23..34

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

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, [
                'no_header' => 1,
                'btn_no_text' => 1,
                'no_records_simple' => 1,
                'no_pages' => 1,
plugins/shop/admin_modules/manage_shop/yf_manage_shop_hook_widgets.class.php on lines 58..69

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

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

            'attributes' => function ($filter_name, $replace) {
                $fields = ['id', 'title', 'add_date'];
                foreach ((array) $fields as $v) {
                    $order_fields[$v] = $v;
                }
plugins/shop/admin_modules/manage_shop/yf_manage_shop_filter.class.php on lines 113..121
plugins/shop/admin_modules/manage_shop/yf_manage_shop_filter.class.php on lines 122..130

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

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

            'suppliers' => function ($filter_name, $replace) {
                $fields = ['id', 'name', 'add_date'];
                foreach ((array) $fields as $v) {
                    $order_fields[$v] = $v;
                }
plugins/shop/admin_modules/manage_shop/yf_manage_shop_filter.class.php on lines 113..121
plugins/shop/admin_modules/manage_shop/yf_manage_shop_filter.class.php on lines 141..149

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

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

            'manufacturers' => function ($filter_name, $replace) {
                $fields = ['id', 'name', 'add_date'];
                foreach ((array) $fields as $v) {
                    $order_fields[$v] = $v;
                }
plugins/shop/admin_modules/manage_shop/yf_manage_shop_filter.class.php on lines 122..130
plugins/shop/admin_modules/manage_shop/yf_manage_shop_filter.class.php on lines 141..149

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

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

        'description' => [
            'name' => 'description',
            'type' => 'text',
            'length' => null,
            'decimals' => null,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 117..132
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_rental.php on lines 21..36
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 69..84

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

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

        'create_date' => [
            'name' => 'create_date',
            'type' => 'datetime',
            'length' => NULL,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film_text.php on lines 38..53
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_rental.php on lines 21..36
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 69..84

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

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

        'description' => [
            'name' => 'description',
            'type' => 'text',
            'length' => NULL,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 117..132
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film_text.php on lines 38..53
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_rental.php on lines 21..36
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 69..84

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

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

        'picture' => [
            'name' => 'picture',
            'type' => 'blob',
            'length' => NULL,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 117..132
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film_text.php on lines 38..53
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_rental.php on lines 21..36

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

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

        'payment_date' => [
            'name' => 'payment_date',
            'type' => 'datetime',
            'length' => NULL,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 117..132
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film_text.php on lines 38..53
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_rental.php on lines 21..36
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 69..84

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

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

        'rental_date' => [
            'name' => 'rental_date',
            'type' => 'datetime',
            'length' => NULL,
            'decimals' => NULL,
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 117..132
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 37..52
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film_text.php on lines 38..53
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 85..100
.dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_staff.php on lines 69..84

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

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

            'visa' => [
                'title' => 'Visa',
                'icon' => 'visa',
                'ps' => '21433878',
                'currency' => [
plugins/payment/classes/yf_payment_api__provider_payeer.class.php on lines 142..166

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

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

    protected function _field_test__price($value, $action)
    {
        $_class_price = $this->_class_price;
        $value = $_class_price->_number_float($value);
        $valid = $value > 0;
plugins/shop/admin_modules/manage_shop/yf_manage_shop_import_products2.class.php on lines 1153..1168

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

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

    protected function _field_test__price_raw($value, $action)
    {
        $_class_price = $this->_class_price;
        $value = $_class_price->_number_float($value);
        $valid = $value > 0;
plugins/shop/admin_modules/manage_shop/yf_manage_shop_import_products2.class.php on lines 1136..1151

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

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

        'sex' => [
            'name' => 'sex',
            'type' => 'enum',
            'length' => null,
            'decimals' => null,
Severity: Major
Found in plugins/sys/share/db/sql_php/user.sql_php.php and 1 other location - About 1 hr to fix
plugins/sys/share/db/sql_php/sys_block_rules.sql_php.php on lines 35..52

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

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

        'rule_type' => [
            'name' => 'rule_type',
            'type' => 'enum',
            'length' => null,
            'decimals' => null,
Severity: Major
Found in plugins/sys/share/db/sql_php/sys_block_rules.sql_php.php and 1 other location - About 1 hr to fix
plugins/sys/share/db/sql_php/user.sql_php.php on lines 200..217

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

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

            'btc-e' => [
                'title' => 'BTC-E',
                'icon' => 'btc-e',
                'ps' => '35228575',
                'currency' => [
plugins/payment/classes/yf_payment_api__provider_payeer.class.php on lines 234..258

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

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