plugins/sys/share/db/sql_php/user.sql_php.php

Summary

Maintainability
D
1 day
Test Coverage

File user.sql_php.php has 658 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

return [
    'fields' => [
        'id' => [
Severity: Major
Found in plugins/sys/share/db/sql_php/user.sql_php.php - About 1 day to fix

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

            'birth_date' => [
                'name' => 'birth_date',
                'type' => 'date',
                'length' => null,
                'decimals' => null,
    Severity: Major
    Found in plugins/sys/share/db/sql_php/user.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_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

    There are no issues that match your filters.

    Category
    Status