antimalware/manul

View on GitHub
src/scanner/classes/Localization.inc.php

Summary

Maintainability
F
1 mo
Test Coverage

File Localization.inc.php has 413 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

define('MANUL_LANG_ID_RU', 'ru');
define('MANUL_LANG_ID_EN', 'en');
define('MANUL_LANG_ID_UA', 'uk');
Severity: Minor
Found in src/scanner/classes/Localization.inc.php - About 5 hrs to fix

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

    if ($currentLang === 'ru') {
        define('PS_SCANNING_FILE', 'Сканируем');
        define('PS_SCANNING_OF', 'из');
        define('PS_SEND_REPORT_BUTTON', 'Отправить отчет');
        define('PS_ERR_NO_TEMP_FOLDER', 'Невозможно создать временные файлы: временный системный каталог и текущий каталог Manul не доступны для записи.');
    Severity: Major
    Found in src/scanner/classes/Localization.inc.php and 3 other locations - About 6 days to fix
    src/scanner/classes/Localization.inc.php on lines 143..237
    src/scanner/classes/Localization.inc.php on lines 240..334
    src/scanner/classes/Localization.inc.php on lines 337..431

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

    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

    if ($currentLang === 'en') {
        define('PS_SCANNING_FILE', 'Scanning');
        define('PS_SCANNING_OF', 'out of');
        define('PS_SEND_REPORT_BUTTON', 'Send report');
        define('PS_ERR_NO_TEMP_FOLDER', 'Temporary files can not be created: the Temp and Manul folders are not available for writing.');
    Severity: Major
    Found in src/scanner/classes/Localization.inc.php and 3 other locations - About 6 days to fix
    src/scanner/classes/Localization.inc.php on lines 46..140
    src/scanner/classes/Localization.inc.php on lines 240..334
    src/scanner/classes/Localization.inc.php on lines 337..431

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

    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

    if ($currentLang === 'tr') {
        define('PS_SCANNING_FILE', 'Taranıyor');
        define('PS_SCANNING_OF', 'Toplam dosyadan taranan dosya sayısı: ');
        define('PS_CHECKER_ROOT_READABLE', 'Ana klasör salt okunur:');
        define('PS_SEND_REPORT_BUTTON', 'Raporu gönder');
    Severity: Major
    Found in src/scanner/classes/Localization.inc.php and 3 other locations - About 6 days to fix
    src/scanner/classes/Localization.inc.php on lines 46..140
    src/scanner/classes/Localization.inc.php on lines 143..237
    src/scanner/classes/Localization.inc.php on lines 337..431

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

    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

    if ($currentLang === 'uk') {
        define('PS_SCANNING_FILE', 'Скануємо');
        define('PS_SCANNING_OF', 'із');
        define('PS_CHECKER_ROOT_READABLE', 'Кореневий каталог доступний для читання:');
        define('PS_SEND_REPORT_BUTTON', 'Надіслати звіт');
    Severity: Major
    Found in src/scanner/classes/Localization.inc.php and 3 other locations - About 6 days to fix
    src/scanner/classes/Localization.inc.php on lines 46..140
    src/scanner/classes/Localization.inc.php on lines 143..237
    src/scanner/classes/Localization.inc.php on lines 240..334

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

    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