CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Consider simplifying this complex logical expression.
Open

                    if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed))
                    {
                        $feeds[$href] = $feed;
                    }
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Locator.php - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

            if (
                $name === 'iri' ||
                $name === 'uri' ||
                $name === 'iauthority' ||
                $name === 'authority'
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

              if (method_exists($this, 'set_' . $name))
              {
                  call_user_func(array($this, 'set_' . $name), $value);
              }
              elseif (
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                            if ($file->success && ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300)) && strlen($file->body) > 0)
                            {
                                $sniffer =& new $this->content_type_sniffer_class($file);
                                if (substr($sniffer->get_type(), 0, 6) === 'image/')
                                {
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                          if (!in_array($href, $done) && in_array('feed', $rel) || (in_array('alternate', $rel) && !empty($link['attribs']['type']['data']) && in_array(strtolower(SimplePie_Misc::parse_mime($link['attribs']['type']['data'])), array('application/rss+xml', 'application/atom+xml'))) && !isset($feeds[$href]))
                          {
                              $this->checked_feeds++;
                              $feed =& new $this->file_class($href, $this->timeout, 5, null, $this->useragent);
                              if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed))
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                            if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed))
                            {
                                return $feed;
                            }
                            else
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                                  if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed))
                                  {
                                      $feeds[$href] = $feed;
                                  }
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                                if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed))
                                {
                                    return $feed;
                                }
                                else
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() ) )
                              $scheme = 'https';
                          elseif ( ('login' == $scheme) && ( force_ssl_admin() ) )
                              $scheme = 'https';
                          elseif ( ('admin' == $scheme) && force_ssl_admin() )
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                            if ( $r['stream'] ) {
                                if ( ! WP_DEBUG )
                                    $stream_handle = @fopen( $r['filename'], 'w+' );
                                else
                                    $stream_handle = fopen( $r['filename'], 'w+' );
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                              if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {
                                  // Don't 404 for these queries if they matched an object.
                                  if ( ( is_tag() || is_category() || is_author() ) && $wp_query->get_queried_object() ) {
                                      if ( !is_404() )
                                          status_header( 200 );
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/classes.php - About 40 mins to fix

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

                                public void Handle(TeamRemoved e)
                                {            
                                    var contingent = ContingentPracticePlans.SingleOrDefault(x => x.Id == e.Id);
                                    contingent.Teams.RemoveAll(x => x.Id == e.TeamId);
                                }
                        Severity: Minor
                        Found in ReadModels/ContingentPracticePlanQueries.cs and 1 other location - About 40 mins to fix
                        ReadModels/ContingentViewQueries.cs on lines 157..161

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

                        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 void Handle(TeamRemoved e)
                                {
                                    var contingent = Contingents.Single(x => x.Id == e.Id);
                                    contingent.Teams.RemoveAll(x => x.Id == e.TeamId);
                                }
                        Severity: Minor
                        Found in ReadModels/ContingentViewQueries.cs and 1 other location - About 40 mins to fix
                        ReadModels/ContingentPracticePlanQueries.cs on lines 123..127

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

                        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 void Handle(ParticipantDesignatedAsAlternate e)
                                {
                                    var team = Contingents.SelectMany(x => x.Teams)
                                        .Single(x => x.Id == e.TeamId);
                                    team.Alternate = e.Id;
                        Severity: Minor
                        Found in ReadModels/ContingentViewQueries.cs and 1 other location - About 40 mins to fix
                        ReadModels/ContingentViewQueries.cs on lines 196..201

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

                        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 void Handle(CoachAssignedToTeam e)
                                {
                                    var team = Contingents.SelectMany(x => x.Teams)
                                        .Single(x => x.Id == e.TeamId);
                                    team.CoachId = e.Id;
                        Severity: Minor
                        Found in ReadModels/ContingentViewQueries.cs and 1 other location - About 40 mins to fix
                        ReadModels/ContingentViewQueries.cs on lines 189..194

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

                        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 void Apply(TeamPracticeRescheduled e)
                                {
                                    var team = Teams.FirstOrDefault(x => x.Id.Equals(e.TeamId));
                                    if (team == null)
                                        return;
                        Severity: Minor
                        Found in Aggregates/Contingent/ContingentAggregate.cs and 1 other location - About 40 mins to fix
                        Aggregates/Contingent/ContingentAggregate.cs on lines 96..103

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

                        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 void Apply(ParticipantDesignatedAsAlternate e)
                                {
                                    var team = Teams.FirstOrDefault(x => x.Id.Equals(e.TeamId));
                                    if (team == null)
                                        return;
                        Severity: Minor
                        Found in Aggregates/Contingent/ContingentAggregate.cs and 1 other location - About 40 mins to fix
                        Aggregates/Contingent/ContingentAggregate.cs on lines 82..89

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

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

                          $.fn.alert.noConflict = function () {
                            $.fn.alert = old
                            return this
                          }
                        Severity: Major
                        Found in Web.Admin/Content/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 273..276
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 493..496
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 722..725
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 893..896
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 1221..1224
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 2028..2031
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 2182..2185
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 2340..2343

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

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

                          $.fn.button.noConflict = function () {
                            $.fn.button = old
                            return this
                          }
                        Severity: Major
                        Found in Web.Admin/Content/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 161..164
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 493..496
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 722..725
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 893..896
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 1221..1224
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 2028..2031
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 2182..2185
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 2340..2343

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

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

                          $.fn.modal.noConflict = function () {
                            $.fn.modal = old
                            return this
                          }
                        Severity: Major
                        Found in Web.Admin/Content/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 161..164
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 273..276
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 493..496
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 722..725
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 893..896
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 2028..2031
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 2182..2185
                        Web.Admin/Content/bootstrap/js/bootstrap.js on lines 2340..2343

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

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language