kuasha/cosmos

View on GitHub
samples/adminpanel/app/bower_components/jquery-ui/ui/effect-clip.js

Summary

Maintainability
D
2 days
Test Coverage

Function clip has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

return $.effects.effect.clip = function( o, done ) {
    // Create element
    var el = $( this ),
        props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
        mode = $.effects.setMode( el, o.mode || "hide" ),
Severity: Minor
Found in samples/adminpanel/app/bower_components/jquery-ui/ui/effect-clip.js - About 1 hr to fix

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

    return $.effects.effect.clip = function( o, done ) {
        // Create element
        var el = $( this ),
            props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
            mode = $.effects.setMode( el, o.mode || "hide" ),
    samples/adminpanel/app/bower_components/jquery-ui/jquery-ui.js on lines 15217..15266
    samples/adminpanel/app/lib/js/jquery-ui.js on lines 10603..10652

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

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

    (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
    
            // AMD. Register as an anonymous module.
            define([
    samples/adminpanel/app/bower_components/jquery-ui/ui/datepicker.js on lines 11..2073
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-blind.js on lines 11..90
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-bounce.js on lines 11..123
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-drop.js on lines 11..75
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-explode.js on lines 11..107
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-fade.js on lines 11..40
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-fold.js on lines 11..86
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-highlight.js on lines 11..60
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-pulsate.js on lines 11..73
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-shake.js on lines 11..84
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-size.js on lines 11..233
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-slide.js on lines 11..74
    samples/adminpanel/app/bower_components/jquery-ui/ui/effect-transfer.js on lines 11..57
    samples/adminpanel/app/bower_components/jquery-ui/ui/mouse.js on lines 11..187

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

    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