librenms/librenms

View on GitHub
lang/zh-CN/settings.php

Summary

Maintainability
F
4 days
Test Coverage

File settings.php has 822 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

return [
    'readonly' => '在 config.php 里被设定成只读,请由 config.php 移除它来启用。',
    'groups' => [
Severity: Major
Found in lang/zh-CN/settings.php - About 1 day to fix

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

            'alert' => [
                'ack_until_clear' => [
                    'description' => '预设认可值到警报解除选项',
                    'help' => '预设认可值到警报解除',
                ],
    Severity: Major
    Found in lang/zh-CN/settings.php and 4 other locations - About 6 hrs to fix
    lang/de/settings.php on lines 69..124
    lang/it/settings.php on lines 131..186
    lang/uk/settings.php on lines 131..186
    lang/zh-TW/settings.php on lines 123..178

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

    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

            'webui' => [
                'availability_map_box_size' => [
                    'description' => '可用性区块宽度',
                    'help' => '输入全视图中盒子大小所需的瓦片宽度(像素)',
                ],
    Severity: Major
    Found in lang/zh-CN/settings.php and 4 other locations - About 4 hrs to fix
    lang/de/settings.php on lines 740..785
    lang/fr/settings.php on lines 1084..1129
    lang/uk/settings.php on lines 1485..1530
    lang/zh-TW/settings.php on lines 931..976

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

    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

            'snmp' => [
                'transports' => [
                    'description' => '传输 (优先级)',
                    'help' => '选择启用的传输方式,并按您希望尝试的顺序排列它们。',
                ],
    Severity: Major
    Found in lang/zh-CN/settings.php and 3 other locations - About 4 hrs to fix
    lang/de/settings.php on lines 645..685
    lang/fr/settings.php on lines 975..1015
    lang/zh-TW/settings.php on lines 814..854

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

    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

            'graylog' => [
                'base_uri' => [
                    'description' => 'Base URI',
                    'help' => '如果您已修改了Graylog的默认设置,此选项可覆盖基本URI。',
                ],
    Severity: Major
    Found in lang/zh-CN/settings.php and 5 other locations - About 3 hrs to fix
    lang/de/settings.php on lines 440..479
    lang/fr/settings.php on lines 610..649
    lang/it/settings.php on lines 750..789
    lang/uk/settings.php on lines 741..780
    lang/zh-TW/settings.php on lines 526..565

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

    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