CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

        if ( isset($r['headers']['User-Agent']) ) {
            $r['user-agent'] = $r['headers']['User-Agent'];
            unset($r['headers']['User-Agent']);
        } else if ( isset($r['headers']['user-agent']) ) {
            $r['user-agent'] = $r['headers']['user-agent'];
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-http.php and 5 other locations - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/class-http.php on lines 1231..1237
Web.Admin/2014/wordpress/wp-includes/http.php on lines 614..620
Web.Admin/2014/wordpress/wp-includes/http.php on lines 941..947
Web.Admin/2014/wordpress/wp-includes/http.php on lines 1110..1116
Web.Admin/2014/wordpress/wp-includes/http.php on lines 1253..1259

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

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

        if ( isset($r['headers']['User-Agent']) ) {
            $r['user-agent'] = $r['headers']['User-Agent'];
            unset($r['headers']['User-Agent']);
        } else if( isset($r['headers']['user-agent']) ) {
            $r['user-agent'] = $r['headers']['user-agent'];
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/http.php and 5 other locations - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/class-http.php on lines 796..802
Web.Admin/2014/wordpress/wp-includes/class-http.php on lines 1231..1237
Web.Admin/2014/wordpress/wp-includes/http.php on lines 941..947
Web.Admin/2014/wordpress/wp-includes/http.php on lines 1110..1116
Web.Admin/2014/wordpress/wp-includes/http.php on lines 1253..1259

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

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

        if ( isset($r['headers']['User-Agent']) ) {
            $r['user-agent'] = $r['headers']['User-Agent'];
            unset($r['headers']['User-Agent']);
        } else if( isset($r['headers']['user-agent']) ) {
            $r['user-agent'] = $r['headers']['user-agent'];
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/http.php and 5 other locations - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/class-http.php on lines 796..802
Web.Admin/2014/wordpress/wp-includes/class-http.php on lines 1231..1237
Web.Admin/2014/wordpress/wp-includes/http.php on lines 614..620
Web.Admin/2014/wordpress/wp-includes/http.php on lines 941..947
Web.Admin/2014/wordpress/wp-includes/http.php on lines 1110..1116

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

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 ( in_array($post->post_status, array('pending', 'draft')) ) {
            if ( current_user_can('edit_page', $page->ID) )
                $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
        } elseif ( $post->post_status != 'trash' ) {
            $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-admin/includes/template.php on lines 1459..1464

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

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 ( in_array($post->post_status, array('pending', 'draft')) ) {
                if ( current_user_can('edit_post', $post->ID) )
                    $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
            } elseif ( 'trash' != $post->post_status ) {
                $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-admin/includes/template.php on lines 1679..1684

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

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

    } elseif ( isset($_POST['untrash']) && 1 == $_POST['untrash'] ) {
        if ( 'trash' != $status )
            wp_die( time() );
        $r = wp_untrash_comment( $comment->comment_ID );
        if ( ! isset( $_POST['comment_status'] ) || $_POST['comment_status'] != 'trash' ) // undo trash, not in trash
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php on lines 437..443

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

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 static function atom_10_construct_type($attribs)
    {
        if (isset($attribs['']['type']))
        {
            switch (strtolower(trim($attribs['']['type'])))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 10987..11007

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

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 atom_10_construct_type($attribs)
    {
        if (isset($attribs['']['type']))
        {
            switch (strtolower(trim($attribs['']['type'])))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php on lines 1871..1891

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

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

    } elseif ( isset($_POST['unspam']) && 1 == $_POST['unspam'] ) {
        if ( 'spam' != $status )
            wp_die( time() );
        $r = wp_unspam_comment( $comment->comment_ID );
        if ( ! isset( $_POST['comment_status'] ) || $_POST['comment_status'] != 'spam' ) // undo spam, not in spam
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php on lines 427..433

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

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

    function _emit(target, fn, name, res, ext){
Severity: Minor
Found in Web.Admin/z-scripts/FileAPI.js - About 35 mins to fix

    Function validate has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function validate(scope, $parse, attr, file, evt) {
    Severity: Minor
    Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 35 mins to fix

      Function validate has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function validate(scope, $parse, attr, file, evt) {
      Severity: Minor
      Found in Web.Admin/z-scripts/ng-file-upload.js - About 35 mins to fix

        Function ngfFixIE has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            FileAPI.ngfFixIE = function(elem, createFileElemFn, bindAttr, changeFn, resetModel) {
        Severity: Minor
        Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 35 mins to fix

          Function ngfFixIE has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              FileAPI.ngfFixIE = function(elem, createFileElemFn, bindAttr, changeFn, resetModel) {
          Severity: Minor
          Found in Web.Admin/z-scripts/ng-file-upload-shim.js - About 35 mins to fix

            Function isCrossOriginError has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                        Util.isCrossOriginError = function (message, url, lineNumber, columnNumber, error) {
            Severity: Minor
            Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 35 mins to fix

              Function sendPageViewInternal has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                          AppInsights.prototype.sendPageViewInternal = function (name, url, duration, properties, measurements) {
              Severity: Minor
              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 35 mins to fix

                Function changeRoomCheckin has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        function changeRoomCheckin(contingentId, province, roomNumber, checkin, checkout) {
                Severity: Minor
                Found in Web.Admin/AdminApp/Services/service.data.js - About 35 mins to fix

                  Function galleria has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      galleria: function (_, t, b, c, d) {
                  Severity: Minor
                  Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 35 mins to fix

                    Function galleriaOut has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        galleriaOut: function (_, t, b, c, d) {
                    Severity: Minor
                    Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 35 mins to fix

                      Function complete has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              var complete = (function( data, next, active, queue, thumb ) {
                      Severity: Minor
                      Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 35 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language