CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

            workflow.state('video-playlist-edit').on( 'update', function( selection ) {
                /**
                 * @this wp.media.editor
                 */
                this.insert( wp.media.playlist.shortcode( selection ).string() );
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/media-editor.js and 2 other locations - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/js/media-editor.js on lines 765..770
Web.Admin/2014/wordpress/wp-includes/js/media-editor.js on lines 772..777

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

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

          this.bowlerHighPOA = bowlerResult.Scores
            .reduce((max, p) => p.POA > max ? p.POA : max, bowlerResult.Scores?.[0]?.POA || 0);
Website/src/app/website/results-page/bowler-results/bowler-results.component.ts on lines 35..36

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

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

          this.bowlerHighScratch = bowlerResult.Scores
            .reduce((max, p) => p.Scratch > max ? p.Scratch : max, bowlerResult.Scores?.[0]?.Scratch || 0);
Website/src/app/website/results-page/bowler-results/bowler-results.component.ts on lines 38..39

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

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

Method get_links has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
            $show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/deprecated.php - About 1 hr to fix

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

                case 'UTF-16BE':
                    for ($i = 0; $i < strlen($string); $i += 2) {
                        $charval = self::BigEndian2Int(substr($string, $i, 2));
                        if (($charval >= 32) && ($charval <= 127)) {
                            $HTMLstring .= chr($charval);
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php and 1 other location - About 1 hr to fix
    Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php on lines 1052..1061

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

    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 quote()
        {
            if ($this->is_linear_whitespace())
            {
                $this->linear_whitespace();
    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/HTTP/Parser.php on lines 385..415

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

    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

            $update_actions =  array(
                'plugins_page' => '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Go to plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>',
                'updates_page' => '<a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Go to WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>'
            );
    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php on lines 374..377

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

    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

        protected function quote()
        {
            if ($this->is_linear_whitespace())
            {
                $this->linear_whitespace();
    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 8223..8253

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

    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

            $update_actions =  array(
                'themes_page' => '<a href="' . self_admin_url('themes.php') . '" title="' . esc_attr__('Go to themes page') . '" target="_parent">' . __('Return to Themes page') . '</a>',
                'updates_page' => '<a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Go to WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>'
            );
    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php on lines 329..332

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

    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 get_latitude()
        {
            if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat'))
            {
                return (float) $return[0]['data'];
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Source.php and 1 other location - About 1 hr to fix
    Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2898..2912

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

    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 get_latitude()
        {
            if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat'))
            {
                return (float) $return[0]['data'];
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 1 other location - About 1 hr to fix
    Web.Admin/2014/wordpress/wp-includes/SimplePie/Source.php on lines 555..569

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

    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

                case 'UTF-16LE':
                    for ($i = 0; $i < strlen($string); $i += 2) {
                        $charval = self::LittleEndian2Int(substr($string, $i, 2));
                        if (($charval >= 32) && ($charval <= 127)) {
                            $HTMLstring .= chr($charval);
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php and 1 other location - About 1 hr to fix
    Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php on lines 1063..1072

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

    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 when has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      this.when = function (what, handler) {
        var redirect, handlerIsString = isString(handler);
        if (isString(what)) what = $urlMatcherFactory.compile(what);
    
        if (!handlerIsString && !isFunction(handler) && !isArray(handler))
    Severity: Minor
    Found in Web.Admin/z-scripts/angular-ui-router.js - About 1 hr to fix

      Function MockXhr has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function MockXhr() {
      
        // hack for testing $http, $httpBackend
        MockXhr.$$lastInstance = this;
      
      
      Severity: Minor
      Found in Web.Admin/z-scripts/angular-mocks.js - About 1 hr to fix

        Function Video has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Video = function( type, id ) {
        
                for( var i=0; i<_video._inst.length; i++ ) {
                    if ( _video._inst[i].id === id && _video._inst[i].type == type ) {
                        return _video._inst[i];
        Severity: Minor
        Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 1 hr to fix

          Function newsController has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var newsController = function ($http, $q, $location, dataService) {
                  var url = $location.absUrl();
                  var lastSlash = url.lastIndexOf('/');
                  var year = url.slice(lastSlash + 1);
          
          
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.news.js - About 1 hr to fix

            Function initCrop has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                initCrop : function(postid, image, parent) {
                    var t = this, selW = $('#imgedit-sel-width-' + postid),
                        selH = $('#imgedit-sel-height-' + postid);
            
                    t.iasapi = $(image).imgAreaSelect({
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js - About 1 hr to fix

              Function add has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  add: function( e, s ) {
                      e = $(e);
              
                      var list = $(this), old = false, _s = { pos: 0, id: 0, oldId: null }, ba, ref, color;
                      if ( 'string' == typeof s ) { s = { what: s }; }
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/js/wp-lists.dev.js - About 1 hr to fix

                Function dfwWidth has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    api.dfwWidth = function( pixels, total ) {
                        var width;
                
                        if ( pixels && pixels.toString().indexOf('%') !== -1 ) {
                            s.$editorContainer.css( 'width', pixels );
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-admin/js/wp-fullscreen.js - About 1 hr to fix

                  Function _wp_Autop has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _wp_Autop : function(pee) {
                          var blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|fieldset|legend';
                  
                          if ( pee.indexOf('<object') != -1 ) {
                              pee = pee.replace(/<object[\s\S]+?<\/object>/g, function(a){
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/js/editor.dev.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language