CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method ScanAssembly has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public void ScanAssembly(Assembly ass)
        {
            // Scan for and register handlers.
            var handlers = 
                from t in ass.GetTypes()
Severity: Minor
Found in Edument.CQRS/MessageDispatcher.cs - About 1 hr to fix

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

            if ($find_handler)
            {
                if (in_array($type, $types_flash))
                {
                    return 'flash';
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 1 hr to fix
    Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php on lines 1347..1377

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

    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

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

            if ( strpos($string, '%') !== false ) {
                $args = func_get_args();
                $args = array_splice($args, 1);
                if ( $args ) {
                    $args = array_map( 'strip_tags', $args );
    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php on lines 79..87

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

    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

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

            if ($find_handler)
            {
                if (in_array($type, $types_flash))
                {
                    return 'flash';
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 7311..7341

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

    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

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

            if ( strpos($string, '%') !== false ) {
                $args = func_get_args();
                $args = array_splice($args, 1);
                if ( $args ) {
                    $args = array_map( 'strip_tags', $args );
    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php on lines 201..209

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

    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

        function import_t2p ( ) {
    
            echo '<div class="narrow">';
            echo '<p><h3>'.__('Adding Tags to Posts&#8230;').'</h3></p>';
    
    
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/import/utw.php and 1 other location - About 1 hr to fix
    Web.Admin/2014/wordpress/wp-admin/import/stp.php on lines 102..115

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

    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

        public function parse()
        {
            while ($this->state && $this->state !== 'emit' && $this->has_data())
            {
                $state = $this->state;
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 13815..13834

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

    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

        function parse()
        {
            while ($this->state && $this->state !== 'emit' && $this->has_data())
            {
                $state = $this->state;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 1 hr to fix
    Web.Admin/2014/wordpress/wp-includes/SimplePie/XML/Declaration/Parser.php on lines 128..147

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

    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

        function import_t2p ( ) {
            echo '<div class="narrow">';
            echo '<p><h3>'.__('Adding Tags to Posts&#8230;').'</h3></p>';
    
            // run that funky magic!
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/import/stp.php and 1 other location - About 1 hr to fix
    Web.Admin/2014/wordpress/wp-admin/import/utw.php on lines 166..182

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

    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 updateModel has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function updateModel($parse, $timeout, scope, ngModel, attr, fileChange, files, rejFiles, evt, noDelay) {
    Severity: Major
    Found in Web.Admin/z-scripts/ng-file-upload.js - About 1 hr to fix

      Function updateModel has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function updateModel($parse, $timeout, scope, ngModel, attr, fileChange, files, rejFiles, evt, noDelay) {
      Severity: Major
      Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 1 hr to fix

        Function renderImageToCanvas has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            api.renderImageToCanvas = function (canvas, img, sx, sy, sw, sh, dx, dy, dw, dh){
        Severity: Major
        Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

          Function renderImageToCanvas has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  canvas,
                  img,
                  sourceX,
                  sourceY,
                  sourceWidth,
          Severity: Major
          Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

            Function compileXPathMatcher has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

              compileXPathMatcher: function() {
                var e = this.expression, ps = Selector.patterns,
                    x = Selector.xpath, le, m;
            
                if (Selector._cache[e]) {
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 1 hr 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

            Function respondToReadyState has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

              respondToReadyState: function(readyState) {
                var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
            
                if (state == 'Complete') {
                  try {
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 1 hr 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

            Function not has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                  'not': function(m) {
                    var e = m[6], p = Selector.patterns,
                        x = Selector.xpath, le, m, v;
            
                    var exclusion = [];
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 1 hr 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

            Function setOpacity has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

              Element.Methods.setOpacity = function(element, value) {
                function stripAlpha(filter){
                  return filter.replace(/alpha\([^\)]*\)/gi,'');
                }
                element = $(element);
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 1 hr 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

            Function updateContent has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

              updateContent: function(responseText) {
                var receiver = this.container[this.success() ? 'success' : 'failure'],
                    options = this.options;
            
                if (!options.evalScripts) responseText = responseText.stripScripts();
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 1 hr 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

            Function update has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                update : function() {
                    var f = document.forms[0], ed = tinyMCEPopup.editor, e, b;
            
                    tinyMCEPopup.restoreSelection();
                    e = ed.dom.getParent(ed.selection.getNode(), 'A');

            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

            Function not has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                  'not': function(m) {
                    var e = m[6], p = Selector.patterns,
                        x = Selector.xpath, le, m, v;
            
                    var exclusion = [];
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 1 hr 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

            Severity
            Category
            Status
            Source
            Language