mdmsoft/yii2-admin

View on GitHub

Showing 114 of 114 total issues

File jquery-ui.js has 2049 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! jQuery UI - v1.11.4 - 2015-05-31
* http://jqueryui.com
* Includes: core.js, widget.js, position.js, autocomplete.js, menu.js
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */

Severity: Major
Found in assets/jquery-ui.js - About 5 days to fix

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/id/rbac-admin.php and 1 other location - About 1 day to fix
    messages/en/rbac-admin.php on lines 1..83

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/en/rbac-admin.php and 1 other location - About 1 day to fix
    messages/id/rbac-admin.php on lines 1..83

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

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

                if ( data.collisionWidth > outerWidth ) {
                    // element is initially over the left side of within
                    if ( overLeft > 0 && overRight <= 0 ) {
                        newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
                        position.left += overLeft - newOverRight;
    Severity: Major
    Found in assets/jquery-ui.js and 1 other location - About 1 day to fix
    assets/jquery-ui.js on lines 1212..1237

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

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

                if ( data.collisionHeight > outerHeight ) {
                    // element is initially over the top of within
                    if ( overTop > 0 && overBottom <= 0 ) {
                        newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
                        position.top += overTop - newOverBottom;
    Severity: Major
    Found in assets/jquery-ui.js and 1 other location - About 1 day to fix
    assets/jquery-ui.js on lines 1175..1200

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/ru/rbac-admin.php and 1 other location - About 1 day to fix
    messages/uk/rbac-admin.php on lines 1..75

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/uk/rbac-admin.php and 1 other location - About 1 day to fix
    messages/ru/rbac-admin.php on lines 1..75

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

    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

    Function getAssignedMenu has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function getAssignedMenu($userId, $root = null, $callback = null, $refresh = false)
        {
            $config = Configs::instance();
    
            /* @var $manager \yii\rbac\BaseManager */
    Severity: Minor
    Found in components/MenuHelper.php - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    <?php
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
     * It contains the localizable messages extracted from source code.
    Severity: Major
    Found in messages/th/rbac-admin.php and 10 other locations - About 1 day to fix
    messages/de/rbac-admin.php on lines 1..69
    messages/fa-IR/rbac-admin.php on lines 1..69
    messages/fr/rbac-admin.php on lines 1..69
    messages/hr/rbac-admin.php on lines 1..69
    messages/it/rbac-admin.php on lines 1..69
    messages/nl/rbac-admin.php on lines 1..69
    messages/pl/rbac-admin.php on lines 1..69
    messages/pt-BR/rbac-admin.php on lines 1..69
    messages/zh-CN/rbac-admin.php on lines 1..68
    messages/zh-TW/rbac-admin.php on lines 1..69

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/it/rbac-admin.php and 10 other locations - About 1 day to fix
    messages/de/rbac-admin.php on lines 1..69
    messages/fa-IR/rbac-admin.php on lines 1..69
    messages/fr/rbac-admin.php on lines 1..69
    messages/hr/rbac-admin.php on lines 1..69
    messages/nl/rbac-admin.php on lines 1..69
    messages/pl/rbac-admin.php on lines 1..69
    messages/pt-BR/rbac-admin.php on lines 1..69
    messages/th/rbac-admin.php on lines 1..68
    messages/zh-CN/rbac-admin.php on lines 1..68
    messages/zh-TW/rbac-admin.php on lines 1..69

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/fa-IR/rbac-admin.php and 10 other locations - About 1 day to fix
    messages/de/rbac-admin.php on lines 1..69
    messages/fr/rbac-admin.php on lines 1..69
    messages/hr/rbac-admin.php on lines 1..69
    messages/it/rbac-admin.php on lines 1..69
    messages/nl/rbac-admin.php on lines 1..69
    messages/pl/rbac-admin.php on lines 1..69
    messages/pt-BR/rbac-admin.php on lines 1..69
    messages/th/rbac-admin.php on lines 1..68
    messages/zh-CN/rbac-admin.php on lines 1..68
    messages/zh-TW/rbac-admin.php on lines 1..69

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

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

    <?php
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
     * It contains the localizable messages extracted from source code.
    Severity: Major
    Found in messages/zh-CN/rbac-admin.php and 10 other locations - About 1 day to fix
    messages/de/rbac-admin.php on lines 1..69
    messages/fa-IR/rbac-admin.php on lines 1..69
    messages/fr/rbac-admin.php on lines 1..69
    messages/hr/rbac-admin.php on lines 1..69
    messages/it/rbac-admin.php on lines 1..69
    messages/nl/rbac-admin.php on lines 1..69
    messages/pl/rbac-admin.php on lines 1..69
    messages/pt-BR/rbac-admin.php on lines 1..69
    messages/th/rbac-admin.php on lines 1..68
    messages/zh-TW/rbac-admin.php on lines 1..69

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/nl/rbac-admin.php and 10 other locations - About 1 day to fix
    messages/de/rbac-admin.php on lines 1..69
    messages/fa-IR/rbac-admin.php on lines 1..69
    messages/fr/rbac-admin.php on lines 1..69
    messages/hr/rbac-admin.php on lines 1..69
    messages/it/rbac-admin.php on lines 1..69
    messages/pl/rbac-admin.php on lines 1..69
    messages/pt-BR/rbac-admin.php on lines 1..69
    messages/th/rbac-admin.php on lines 1..68
    messages/zh-CN/rbac-admin.php on lines 1..68
    messages/zh-TW/rbac-admin.php on lines 1..69

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/de/rbac-admin.php and 10 other locations - About 1 day to fix
    messages/fa-IR/rbac-admin.php on lines 1..69
    messages/fr/rbac-admin.php on lines 1..69
    messages/hr/rbac-admin.php on lines 1..69
    messages/it/rbac-admin.php on lines 1..69
    messages/nl/rbac-admin.php on lines 1..69
    messages/pl/rbac-admin.php on lines 1..69
    messages/pt-BR/rbac-admin.php on lines 1..69
    messages/th/rbac-admin.php on lines 1..68
    messages/zh-CN/rbac-admin.php on lines 1..68
    messages/zh-TW/rbac-admin.php on lines 1..69

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/zh-TW/rbac-admin.php and 10 other locations - About 1 day to fix
    messages/de/rbac-admin.php on lines 1..69
    messages/fa-IR/rbac-admin.php on lines 1..69
    messages/fr/rbac-admin.php on lines 1..69
    messages/hr/rbac-admin.php on lines 1..69
    messages/it/rbac-admin.php on lines 1..69
    messages/nl/rbac-admin.php on lines 1..69
    messages/pl/rbac-admin.php on lines 1..69
    messages/pt-BR/rbac-admin.php on lines 1..69
    messages/th/rbac-admin.php on lines 1..68
    messages/zh-CN/rbac-admin.php on lines 1..68

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/pt-BR/rbac-admin.php and 10 other locations - About 1 day to fix
    messages/de/rbac-admin.php on lines 1..69
    messages/fa-IR/rbac-admin.php on lines 1..69
    messages/fr/rbac-admin.php on lines 1..69
    messages/hr/rbac-admin.php on lines 1..69
    messages/it/rbac-admin.php on lines 1..69
    messages/nl/rbac-admin.php on lines 1..69
    messages/pl/rbac-admin.php on lines 1..69
    messages/th/rbac-admin.php on lines 1..68
    messages/zh-CN/rbac-admin.php on lines 1..68
    messages/zh-TW/rbac-admin.php on lines 1..69

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/hr/rbac-admin.php and 10 other locations - About 1 day to fix
    messages/de/rbac-admin.php on lines 1..69
    messages/fa-IR/rbac-admin.php on lines 1..69
    messages/fr/rbac-admin.php on lines 1..69
    messages/it/rbac-admin.php on lines 1..69
    messages/nl/rbac-admin.php on lines 1..69
    messages/pl/rbac-admin.php on lines 1..69
    messages/pt-BR/rbac-admin.php on lines 1..69
    messages/th/rbac-admin.php on lines 1..68
    messages/zh-CN/rbac-admin.php on lines 1..68
    messages/zh-TW/rbac-admin.php on lines 1..69

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/fr/rbac-admin.php and 10 other locations - About 1 day to fix
    messages/de/rbac-admin.php on lines 1..69
    messages/fa-IR/rbac-admin.php on lines 1..69
    messages/hr/rbac-admin.php on lines 1..69
    messages/it/rbac-admin.php on lines 1..69
    messages/nl/rbac-admin.php on lines 1..69
    messages/pl/rbac-admin.php on lines 1..69
    messages/pt-BR/rbac-admin.php on lines 1..69
    messages/th/rbac-admin.php on lines 1..68
    messages/zh-CN/rbac-admin.php on lines 1..68
    messages/zh-TW/rbac-admin.php on lines 1..69

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

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

    <?php
    
    /**
     * Message translations for \mdmsoft\yii2-admin.
     *
    Severity: Major
    Found in messages/pl/rbac-admin.php and 10 other locations - About 1 day to fix
    messages/de/rbac-admin.php on lines 1..69
    messages/fa-IR/rbac-admin.php on lines 1..69
    messages/fr/rbac-admin.php on lines 1..69
    messages/hr/rbac-admin.php on lines 1..69
    messages/it/rbac-admin.php on lines 1..69
    messages/nl/rbac-admin.php on lines 1..69
    messages/pt-BR/rbac-admin.php on lines 1..69
    messages/th/rbac-admin.php on lines 1..68
    messages/zh-CN/rbac-admin.php on lines 1..68
    messages/zh-TW/rbac-admin.php on lines 1..69

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

    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

    Function _create has 203 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _create: function() {
            // Some browsers only repeat keydown events, not keypress events,
            // so we use the suppressKeyPress flag to determine if we've already
            // handled the keydown event. #7269
            // Unfortunately the code for & in keypress is the same as the up arrow,
    Severity: Major
    Found in assets/jquery-ui.js - About 1 day to fix
      Severity
      Category
      Status
      Source
      Language