CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method parse_iri has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function parse_iri($iri)
    {
        $iri = trim($iri, "\x20\x09\x0A\x0C\x0D");
        if (preg_match('/^((?P<scheme>[^:\/?#]+):)?(\/\/(?P<authority>[^\/?#]*))?(?P<path>[^?#]*)(\?(?P<query>[^#]*))?(#(?P<fragment>.*))?$/', $iri, $match))
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 1 hr to fix

    Method change_encoding_mbstring has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected static function change_encoding_mbstring($data, $input, $output)
        {
            if ($input === 'windows-949')
            {
                $input = 'EUC-KR';
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 1 hr to fix

      Method new_line has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function new_line()
          {
              $this->value = trim($this->value, "\x0D\x20");
              if ($this->name !== '' && $this->value !== '')
              {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/HTTP/Parser.php - About 1 hr to fix

        Method atom_03_construct_type has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function atom_03_construct_type($attribs)
            {
                if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) === 'base64'))
                {
                    $mode = SIMPLEPIE_CONSTRUCT_BASE64;
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 1 hr to fix

          Method image_resize_dimensions has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = false) {
          
              if ($orig_w <= 0 || $orig_h <= 0)
                  return false;
              // at least one of dest_w or dest_h must be specific
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 1 hr to fix

            Method wp_parse_auth_cookie has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function wp_parse_auth_cookie($cookie = '', $scheme = '') {
                if ( empty($cookie) ) {
                    switch ($scheme){
                        case 'auth':
                            $cookie_name = AUTH_COOKIE;
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 1 hr to fix

              Method new_line has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function new_line()
                  {
                      $this->value = trim($this->value, "\x0D\x20");
                      if ($this->name !== '' && $this->value !== '')
                      {
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                Method atom_03_construct_type has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function atom_03_construct_type($attribs)
                    {
                        if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) === 'base64'))
                        {
                            $mode = SIMPLEPIE_CONSTRUCT_BASE64;
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                  Method output_javascript has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function output_javascript()
                      {
                          if (function_exists('ob_gzhandler'))
                          {
                              ob_start('ob_gzhandler');
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                    Method get_iri has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function get_iri()
                        {
                            $iri = '';
                            if ($this->scheme !== null)
                            {
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                      Method wp_cookie_constants has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function wp_cookie_constants() {
                          /**
                           * Used to guarantee unique hash cookies
                           *
                           * @since 1.5.0
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/default-constants.php - About 1 hr to fix

                        Method translate_header has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function translate_header( $header, $value ) {
                                switch ( $header ) {
                                    case 'Name' :
                                        // Cached for sorting reasons.
                                        if ( isset( $this->name_translated ) )
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-includes/class-wp-theme.php - About 1 hr to fix

                          Method the_content_rss has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
                              _deprecated_function(__FUNCTION__, '2.9', 'the_content_feed' );
                              $content = get_the_content($more_link_text, $stripteaser, $more_file);
                              $content = apply_filters('the_content_rss', $content);
                              if ( $cut && !$encode_html )
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/deprecated.php - About 1 hr to fix

                            Method wp_unique_filename has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function wp_unique_filename( $dir, $filename, $unique_filename_callback = null ) {
                                // sanitize the file name before we begin processing
                                $filename = sanitize_file_name($filename);
                            
                                // separate the filename into a name and extension
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 1 hr to fix

                              Method sanitize_file_name has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function sanitize_file_name( $filename ) {
                                  $filename_raw = $filename;
                                  $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr(0));
                                  $special_chars = apply_filters('sanitize_file_name_chars', $special_chars, $filename_raw);
                                  $filename = str_replace($special_chars, '', $filename);
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 1 hr to fix

                                Method Expand has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function Expand($name) {
                                    $this->error = null; # so no confusion is caused
                                
                                    if(!$this->connected()) {
                                      $this->error = array(
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.php - About 1 hr to fix

                                  Method Handle has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          public void Handle(RoomCheckinChanged e)
                                          {
                                              var tournament = GetTournamentFromContingentId(e.Id);
                                  
                                              var contingentRooms = tournament.ContingentRooms.FirstOrDefault(x => x.Id == e.Id);
                                  Severity: Minor
                                  Found in ReadModels/ContingentTravelPlanQueries.cs - About 1 hr to fix

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

                                    Form.Element.Observer = Class.create(Abstract.TimedObserver, {
                                      getValue: function() {
                                        return Form.Element.getValue(this.element);
                                      }
                                    });
                                    Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 3618..3622
                                    Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 3671..3675
                                    Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 3671..3675

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

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

                                    Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
                                      getValue: function() {
                                        return Form.Element.getValue(this.element);
                                      }
                                    });
                                    Severity: Major
                                    Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 3 other locations - About 1 hr to fix
                                    Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 3618..3622
                                    Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 3618..3622
                                    Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 3671..3675

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

                                    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

                                            else if( (completeEndingChars.indexOf('|'+fromChar+'|')!= -1 || completeChars.indexOf('|'+fromChar+'|')!=-1) && CodePress.autocomplete) { // auto complete
                                                if(!CodePress.completeEnding(fromChar))
                                                     CodePress.complete(fromChar);
                                            }
                                            else if(chars.indexOf('|'+charCode+'|')!=-1||keyCode==13) { // syntax highlighting
                                    Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.js on lines 43..49

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

                                    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