Showing 971 of 4,218 total issues

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

        'data' => [
            'name' => 'data',
            'type' => 'text',
            'length' => null,
            'decimals' => null,
Severity: Major
Found in plugins/sys/share/db/sql_php/dashboards.sql_php.php and 22 other locations - About 1 hr to fix
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 20..34
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 35..49
plugins/logs/share/db/sql_php/sys_log_admin_exec.sql_php.php on lines 65..79
plugins/logs/share/db/sql_php/sys_log_csrf_errors.sql_php.php on lines 560..574
plugins/logs/share/db/sql_php/sys_log_exec.sql_php.php on lines 185..199
plugins/logs/share/db/sql_php/sys_log_redirects.sql_php.php on lines 302..316
plugins/shop/share/db/sql_php/shop_novaposhta_ua.sql_php.php on lines 155..169
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 80..94
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 50..64
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 110..124
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 155..169
plugins/sys/share/db/sql_php/form_attributes.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/sys_cache.sql_php.php on lines 20..34
plugins/sys/share/db/sql_php/sys_task_manager.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/user.sql_php.php on lines 233..247
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 155..169

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

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

        'value' => [
            'name' => 'value',
            'type' => 'longtext',
            'length' => null,
            'decimals' => null,
Severity: Major
Found in plugins/sys/share/db/sql_php/form_attributes.sql_php.php and 22 other locations - About 1 hr to fix
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 20..34
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 35..49
plugins/logs/share/db/sql_php/sys_log_admin_exec.sql_php.php on lines 65..79
plugins/logs/share/db/sql_php/sys_log_csrf_errors.sql_php.php on lines 560..574
plugins/logs/share/db/sql_php/sys_log_exec.sql_php.php on lines 185..199
plugins/logs/share/db/sql_php/sys_log_redirects.sql_php.php on lines 302..316
plugins/shop/share/db/sql_php/shop_novaposhta_ua.sql_php.php on lines 155..169
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 80..94
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 50..64
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 110..124
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 155..169
plugins/sys/share/db/sql_php/dashboards.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/sys_cache.sql_php.php on lines 20..34
plugins/sys/share/db/sql_php/sys_task_manager.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/user.sql_php.php on lines 233..247
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 155..169

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

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

        'message' => [
            'name' => 'message',
            'type' => 'text',
            'length' => null,
            'decimals' => null,
Severity: Major
Found in plugins/sys/share/db/sql_php/admin_walls.sql_php.php and 22 other locations - About 1 hr to fix
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 20..34
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 35..49
plugins/logs/share/db/sql_php/sys_log_admin_exec.sql_php.php on lines 65..79
plugins/logs/share/db/sql_php/sys_log_csrf_errors.sql_php.php on lines 560..574
plugins/logs/share/db/sql_php/sys_log_exec.sql_php.php on lines 185..199
plugins/logs/share/db/sql_php/sys_log_redirects.sql_php.php on lines 302..316
plugins/shop/share/db/sql_php/shop_novaposhta_ua.sql_php.php on lines 155..169
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 80..94
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 50..64
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 110..124
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 155..169
plugins/sys/share/db/sql_php/dashboards.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/form_attributes.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/sys_cache.sql_php.php on lines 20..34
plugins/sys/share/db/sql_php/sys_task_manager.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/user.sql_php.php on lines 233..247
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 155..169

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

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

        'options' => [
            'name' => 'options',
            'type' => 'text',
            'length' => null,
            'decimals' => null,
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 20..34
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 35..49
plugins/logs/share/db/sql_php/sys_log_admin_exec.sql_php.php on lines 65..79
plugins/logs/share/db/sql_php/sys_log_csrf_errors.sql_php.php on lines 560..574
plugins/logs/share/db/sql_php/sys_log_exec.sql_php.php on lines 185..199
plugins/logs/share/db/sql_php/sys_log_redirects.sql_php.php on lines 302..316
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 80..94
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 50..64
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 110..124
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 155..169
plugins/sys/share/db/sql_php/dashboards.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/form_attributes.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/sys_cache.sql_php.php on lines 20..34
plugins/sys/share/db/sql_php/sys_task_manager.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/user.sql_php.php on lines 233..247
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 155..169

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

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

    public function key($name = 'public', $value = null)
    {
        if ( ! in_array($name, ['public', 'private'])) {
            return  null;
        }
Severity: Major
Found in plugins/payment/classes/payment_provider/liqpay/LiqPay.php and 4 other locations - About 1 hr to fix
plugins/payment/classes/payment_provider/perfectmoney/PerfectMoney.php on lines 33..46
plugins/payment/classes/payment_provider/privat24/Privat24.php on lines 32..45
plugins/payment/classes/payment_provider/webmoney/WebMoney.php on lines 46..59
plugins/payment/classes/payment_provider/yandexmoney/YandexMoney.php on lines 32..45

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

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

        'meta_desc' => [
            'name' => 'meta_desc',
            'type' => 'text',
            'length' => null,
            'decimals' => null,
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 20..34
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 35..49
plugins/logs/share/db/sql_php/sys_log_admin_exec.sql_php.php on lines 65..79
plugins/logs/share/db/sql_php/sys_log_csrf_errors.sql_php.php on lines 560..574
plugins/logs/share/db/sql_php/sys_log_exec.sql_php.php on lines 185..199
plugins/logs/share/db/sql_php/sys_log_redirects.sql_php.php on lines 302..316
plugins/shop/share/db/sql_php/shop_novaposhta_ua.sql_php.php on lines 155..169
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 80..94
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 50..64
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 95..109
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 155..169
plugins/sys/share/db/sql_php/dashboards.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/form_attributes.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/sys_cache.sql_php.php on lines 20..34
plugins/sys/share/db/sql_php/sys_task_manager.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/user.sql_php.php on lines 233..247
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 155..169

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

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

        'meta_keywords' => [
            'name' => 'meta_keywords',
            'type' => 'text',
            'length' => null,
            'decimals' => null,
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 20..34
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 35..49
plugins/logs/share/db/sql_php/sys_log_admin_exec.sql_php.php on lines 65..79
plugins/logs/share/db/sql_php/sys_log_csrf_errors.sql_php.php on lines 560..574
plugins/logs/share/db/sql_php/sys_log_exec.sql_php.php on lines 185..199
plugins/logs/share/db/sql_php/sys_log_redirects.sql_php.php on lines 302..316
plugins/shop/share/db/sql_php/shop_novaposhta_ua.sql_php.php on lines 155..169
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 80..94
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 50..64
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 110..124
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 155..169
plugins/sys/share/db/sql_php/dashboards.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/form_attributes.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/sys_cache.sql_php.php on lines 20..34
plugins/sys/share/db/sql_php/sys_task_manager.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/user.sql_php.php on lines 233..247
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 155..169

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

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

        'time_to' => [
            'name' => 'time_to',
            'type' => 'datetime',
            'length' => null,
            'decimals' => null,
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 20..34
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 35..49
plugins/logs/share/db/sql_php/sys_log_admin_exec.sql_php.php on lines 65..79
plugins/logs/share/db/sql_php/sys_log_csrf_errors.sql_php.php on lines 560..574
plugins/logs/share/db/sql_php/sys_log_exec.sql_php.php on lines 185..199
plugins/logs/share/db/sql_php/sys_log_redirects.sql_php.php on lines 302..316
plugins/shop/share/db/sql_php/shop_novaposhta_ua.sql_php.php on lines 155..169
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 80..94
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 50..64
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 110..124
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 155..169
plugins/sys/share/db/sql_php/dashboards.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/form_attributes.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/sys_cache.sql_php.php on lines 20..34
plugins/sys/share/db/sql_php/sys_task_manager.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/user.sql_php.php on lines 233..247
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 155..169

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

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

                if ($from && $to) {
                    if ($from > $to) {
                        $tmp = $from;
                        $from = $to;
                        $to = $tmp;
Severity: Major
Found in plugins/table2/classes/table2/yf_table2_filter.class.php and 4 other locations - About 1 hr to fix
plugins/table2/classes/table2/yf_table2_filter.class.php on lines 62..73
plugins/table2/classes/table2/yf_table2_filter.class.php on lines 101..112
plugins/table2/classes/table2/yf_table2_filter.class.php on lines 132..143
plugins/table2/classes/table2/yf_table2_filter.class.php on lines 164..175

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

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

        'old_data' => [
            'name' => 'old_data',
            'type' => 'text',
            'length' => null,
            'decimals' => null,
Severity: Major
Found in plugins/sys/share/db/sql_php/user_walls.sql_php.php and 22 other locations - About 1 hr to fix
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 20..34
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 35..49
plugins/logs/share/db/sql_php/sys_log_admin_exec.sql_php.php on lines 65..79
plugins/logs/share/db/sql_php/sys_log_csrf_errors.sql_php.php on lines 560..574
plugins/logs/share/db/sql_php/sys_log_exec.sql_php.php on lines 185..199
plugins/logs/share/db/sql_php/sys_log_redirects.sql_php.php on lines 302..316
plugins/shop/share/db/sql_php/shop_novaposhta_ua.sql_php.php on lines 155..169
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 80..94
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 50..64
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 110..124
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 155..169
plugins/sys/share/db/sql_php/dashboards.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/form_attributes.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/sys_cache.sql_php.php on lines 20..34
plugins/sys/share/db/sql_php/sys_task_manager.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/user.sql_php.php on lines 233..247
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 155..169

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

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

        'exec_time' => [
            'name' => 'exec_time',
            'type' => 'float',
            'length' => null,
            'decimals' => null,
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 20..34
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 35..49
plugins/logs/share/db/sql_php/sys_log_admin_exec.sql_php.php on lines 65..79
plugins/logs/share/db/sql_php/sys_log_csrf_errors.sql_php.php on lines 560..574
plugins/logs/share/db/sql_php/sys_log_exec.sql_php.php on lines 185..199
plugins/shop/share/db/sql_php/shop_novaposhta_ua.sql_php.php on lines 155..169
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 80..94
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 50..64
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 110..124
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 155..169
plugins/sys/share/db/sql_php/dashboards.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/form_attributes.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/sys_cache.sql_php.php on lines 20..34
plugins/sys/share/db/sql_php/sys_task_manager.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/user.sql_php.php on lines 233..247
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 155..169

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

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

    public function key($name = 'public', $value = null)
    {
        if ( ! in_array($name, ['public', 'private'])) {
            return  null;
        }
plugins/payment/classes/payment_provider/liqpay/LiqPay.php on lines 20..33
plugins/payment/classes/payment_provider/perfectmoney/PerfectMoney.php on lines 33..46
plugins/payment/classes/payment_provider/webmoney/WebMoney.php on lines 46..59
plugins/payment/classes/payment_provider/yandexmoney/YandexMoney.php on lines 32..45

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

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

        'php_code' => [
            'name' => 'php_code',
            'type' => 'text',
            'length' => null,
            'decimals' => null,
Severity: Major
Found in plugins/sys/share/db/sql_php/sys_task_manager.sql_php.php and 22 other locations - About 1 hr to fix
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 20..34
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 35..49
plugins/logs/share/db/sql_php/sys_log_admin_exec.sql_php.php on lines 65..79
plugins/logs/share/db/sql_php/sys_log_csrf_errors.sql_php.php on lines 560..574
plugins/logs/share/db/sql_php/sys_log_exec.sql_php.php on lines 185..199
plugins/logs/share/db/sql_php/sys_log_redirects.sql_php.php on lines 302..316
plugins/shop/share/db/sql_php/shop_novaposhta_ua.sql_php.php on lines 155..169
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 80..94
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 50..64
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 110..124
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 155..169
plugins/sys/share/db/sql_php/dashboards.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/form_attributes.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/sys_cache.sql_php.php on lines 20..34
plugins/sys/share/db/sql_php/user.sql_php.php on lines 233..247
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 155..169

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

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

        'value' => [
            'name' => 'value',
            'type' => 'longtext',
            'length' => null,
            'decimals' => null,
Severity: Major
Found in plugins/sys/share/db/sql_php/sys_cache.sql_php.php and 22 other locations - About 1 hr to fix
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 20..34
plugins/geo/share/db/sql_php/zip_data.sql_php.php on lines 35..49
plugins/logs/share/db/sql_php/sys_log_admin_exec.sql_php.php on lines 65..79
plugins/logs/share/db/sql_php/sys_log_csrf_errors.sql_php.php on lines 560..574
plugins/logs/share/db/sql_php/sys_log_exec.sql_php.php on lines 185..199
plugins/logs/share/db/sql_php/sys_log_redirects.sql_php.php on lines 302..316
plugins/shop/share/db/sql_php/shop_novaposhta_ua.sql_php.php on lines 155..169
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 80..94
plugins/shop/share/db/sql_php/shop_price_markup_down.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 50..64
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 95..109
plugins/static_pages/share/db/sql_php/static_pages.sql_php.php on lines 110..124
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/admin_walls.sql_php.php on lines 155..169
plugins/sys/share/db/sql_php/dashboards.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/form_attributes.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/sys_task_manager.sql_php.php on lines 50..64
plugins/sys/share/db/sql_php/user.sql_php.php on lines 233..247
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 35..49
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 140..154
plugins/sys/share/db/sql_php/user_walls.sql_php.php on lines 155..169

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

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

        if ( ! empty($articles_ids)) {
            $Q = db()->query('SELECT id,title FROM ' . db('articles_texts') . ' WHERE id IN(' . implode(',', $articles_ids) . ')');
            while ($A = db()->fetch_assoc($Q)) {
                $titles['articles' . $A['id']] = $A['title'];
            }
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 91..96
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 97..102
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 134..139
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 140..145
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 146..151

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

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

            if (strlen($_info['attributes']) > 3) {
                foreach ((array) unserialize($_info['attributes']) as $_attr_id) {
                    $_attr_info = $products_atts[$_info['product_id']][$_attr_id];
                    $dynamic_atts[$_attr_id] = '- ' . $_attr_info['name'] . ' ' . $_attr_info['value'];
                    $price += $_attr_info['price'];
plugins/shop/admin_modules/manage_shop/yf_manage_shop_orders.class.php on lines 245..251
plugins/shop/modules/shop/yf_shop_order_view.class.php on lines 43..49

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

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

            if (strlen($_info['attributes']) > 3) {
                foreach ((array) unserialize($_info['attributes']) as $_attr_id) {
                    $_attr_info = $products_atts[$_info['product_id']][$_attr_id];
                    $dynamic_atts[$_attr_id] = '- ' . $_attr_info['name'] . ' ' . $_attr_info['value'];
                    $price += $_attr_info['price'];
Severity: Major
Found in plugins/shop/modules/shop/yf_shop_order_view.class.php and 2 other locations - About 1 hr to fix
plugins/shop/admin_modules/manage_shop/yf_manage_shop_orders.class.php on lines 245..251
plugins/shop/modules/shop/yf_shop__order_step_finish.class.php on lines 42..48

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

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

            if (strlen($_info['attributes']) > 3) {
                foreach ((array) unserialize($_info['attributes']) as $_attr_id) {
                    $_attr_info = $products_atts[$_info['product_id']][$_attr_id];
                    $dynamic_atts[$_attr_id] = '- ' . $_attr_info['name'] . ' ' . $_attr_info['value'];
                    $price += $_attr_info['price'];
plugins/shop/modules/shop/yf_shop__order_step_finish.class.php on lines 42..48
plugins/shop/modules/shop/yf_shop_order_view.class.php on lines 43..49

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

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

        if ( ! empty($blog_ids)) {
            $Q = db()->query('SELECT id,title FROM ' . db('blog_posts') . ' WHERE id IN(' . implode(',', $blog_ids) . ')');
            while ($A = db()->fetch_assoc($Q)) {
                $titles['blog' . $A['id']] = $A['title'];
            }
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 85..90
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 91..96
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 134..139
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 140..145
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 146..151

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

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

        if ( ! empty($news_ids)) {
            $Q = db()->query('SELECT id,title FROM ' . db('news') . ' WHERE id IN(' . implode(',', $news_ids) . ')');
            while ($A = db()->fetch_assoc($Q)) {
                $titles['news' . $A['id']] = $A['title'];
            }
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 85..90
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 97..102
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 134..139
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 140..145
plugins/comments/modules/comments/yf_comments_integration.class.php on lines 146..151

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

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