plugins/shop/share/db/sql_php/shop_products.sql_php.php

Summary

Maintainability
D
2 days
Test Coverage

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

<?php

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

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

            'meta_keywords' => [
                'name' => 'meta_keywords',
                'type' => 'text',
                'length' => null,
                'decimals' => null,
    Severity: Major
    Found in plugins/shop/share/db/sql_php/shop_products.sql_php.php and 7 other locations - About 55 mins to fix
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 95..109
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 110..124
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 65..79
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 80..94
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 110..124
    plugins/sys/share/db/sql_php/sys_category_items.sql_php.php on lines 80..94
    plugins/sys/share/db/sql_php/sys_category_items.sql_php.php on lines 95..109

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

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

            'meta_desc' => [
                'name' => 'meta_desc',
                'type' => 'text',
                'length' => null,
                'decimals' => null,
    Severity: Major
    Found in plugins/shop/share/db/sql_php/shop_products.sql_php.php and 7 other locations - About 55 mins to fix
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 95..109
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 110..124
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 65..79
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 80..94
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 95..109
    plugins/sys/share/db/sql_php/sys_category_items.sql_php.php on lines 80..94
    plugins/sys/share/db/sql_php/sys_category_items.sql_php.php on lines 95..109

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

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

            'features' => [
                'name' => 'features',
                'type' => 'text',
                'length' => null,
                'decimals' => null,
    Severity: Major
    Found in plugins/shop/share/db/sql_php/shop_products.sql_php.php and 7 other locations - About 55 mins to fix
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 95..109
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 110..124
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 65..79
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 95..109
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 110..124
    plugins/sys/share/db/sql_php/sys_category_items.sql_php.php on lines 80..94
    plugins/sys/share/db/sql_php/sys_category_items.sql_php.php on lines 95..109

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

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

            'description' => [
                'name' => 'description',
                'type' => 'text',
                'length' => null,
                'decimals' => null,
    Severity: Major
    Found in plugins/shop/share/db/sql_php/shop_products.sql_php.php and 7 other locations - About 55 mins to fix
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 95..109
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 110..124
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 80..94
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 95..109
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 110..124
    plugins/sys/share/db/sql_php/sys_category_items.sql_php.php on lines 80..94
    plugins/sys/share/db/sql_php/sys_category_items.sql_php.php on lines 95..109

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

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

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

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

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

    Refactorings

    Further Reading

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

            'model' => [
                'name' => 'model',
                'type' => 'varchar',
                'length' => 64,
                'decimals' => null,
    Severity: Major
    Found in plugins/shop/share/db/sql_php/shop_products.sql_php.php and 4 other locations - About 45 mins to fix
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 50..64
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 65..79
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 80..94
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 170..184

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

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

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

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

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

    Refactorings

    Further Reading

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

            'sku' => [
                'name' => 'sku',
                'type' => 'varchar',
                'length' => 64,
                'decimals' => null,
    Severity: Major
    Found in plugins/shop/share/db/sql_php/shop_products.sql_php.php and 4 other locations - About 45 mins to fix
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 50..64
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 65..79
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 80..94
    plugins/shop/share/db/sql_php/shop_products.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 95.

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

            'url' => [
                'name' => 'url',
                'type' => 'varchar',
                'length' => 255,
                'decimals' => null,
    Severity: Major
    Found in plugins/shop/share/db/sql_php/shop_products.sql_php.php and 3 other locations - About 35 mins to fix
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 35..49
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 20..34
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 125..139

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

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

            'name' => [
                'name' => 'name',
                'type' => 'varchar',
                'length' => 255,
                'decimals' => null,
    Severity: Major
    Found in plugins/shop/share/db/sql_php/shop_products.sql_php.php and 3 other locations - About 35 mins to fix
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 35..49
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 35..49
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 125..139

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

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

            'external_url' => [
                'name' => 'external_url',
                'type' => 'varchar',
                'length' => 255,
                'decimals' => null,
    Severity: Major
    Found in plugins/shop/share/db/sql_php/shop_products.sql_php.php and 3 other locations - About 35 mins to fix
    plugins/shop/share/db/sql_php/shop_manufacturers.sql_php.php on lines 35..49
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 20..34
    plugins/shop/share/db/sql_php/shop_products.sql_php.php on lines 35..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 92.

    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