CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function complete has 90 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        var complete = (function( data, next, active, queue, thumb ) {

            return function() {

                var win;
Severity: Major
Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 3 hrs to fix

    Function serializeParameters has 90 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function serializeParameters() {
        var d = document, f = d.forms[0], s = '';
    
        switch (f.media_type.options[f.media_type.selectedIndex].value) {
            case "flash":

      Function init has 90 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              init : function() {
      
                  if ( lightbox.initialized ) {
                      return;
                  }
      Severity: Major
      Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 3 hrs to fix

        Function complete has 90 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                var complete = (function( data, next, active, queue, thumb ) {
        
                    return function() {
        
                        var win;
        Severity: Major
        Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 3 hrs to fix

          Method add has 90 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function add($p_filelist)
            {
              $v_result=1;
          
              // ----- Reset the error handler
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 3 hrs to fix

            Method replace_invalid_with_pct_encoding has 90 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function replace_invalid_with_pct_encoding($string, $extra_chars, $iprivate = false)
                {
                    // Normalize as many pct-encoded sections as possible
                    $string = preg_replace_callback('/(?:%[A-Fa-f0-9]{2})+/', array($this, 'remove_iunreserved_percent_encoded'), $string);
            
            
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 3 hrs to fix

              Function privReadEndCentralDir has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                function privReadEndCentralDir(&$p_central_dir)
                {
                  $v_result=1;
              
                  // ----- Go to the end of the zip file
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 3 hrs 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 _rows has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$count, $parent = 0, $level = 0 ) {
              
                      $end = $start + $per_page;
              
                      foreach ( $terms as $key => $term ) {

              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 fs_connect has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  function fs_connect( $directories = array() ) {
                      global $wp_filesystem;
              
                      if ( false === ($credentials = $this->skin->request_filesystem_credentials()) )
                          return false;
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php - About 3 hrs 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 wp_dashboard_right_now has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              function wp_dashboard_right_now() {
                  global $wp_registered_sidebars;
              
                  $num_posts = wp_count_posts( 'post' );
                  $num_pages = wp_count_posts( 'page' );
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/includes/dashboard.php - About 3 hrs 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 MPEGaudioFrameLength has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static function MPEGaudioFrameLength(&$bitrate, &$version, &$layer, $padding, &$samplerate) {
                      static $AudioFrameLengthCache = array();
              
                      if (!isset($AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate])) {
                          $AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate] = false;
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 3 hrs 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 get_authors has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function get_authors()
                  {
                      $authors = array();
                      foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author)
                      {
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Source.php - About 3 hrs 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 feed_or_html has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function feed_or_html()
                  {
                      $len = strlen($this->file->body);
                      $pos = strspn($this->file->body, "\x09\x0A\x0D\x20");
              
              

              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 wp_update_nav_menu_item has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item_data = array() ) {
                  $menu_id = (int) $menu_id;
                  $menu_item_db_id = (int) $menu_item_db_id;
              
                  // make sure that we don't convert non-nav_menu_item objects into nav_menu_item objects
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/nav-menu.php - About 3 hrs 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 call_widget_update has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function call_widget_update( $widget_id ) {
                      global $wp_registered_widget_updates, $wp_registered_widget_controls;
              
                      $this->start_capturing_option_updates();
                      $parsed_id   = $this->parse_widget_id( $widget_id );
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-widgets.php - About 3 hrs 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 feed_or_html has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  function feed_or_html()
                  {
                      $len = strlen($this->file->body);
                      $pos = strspn($this->file->body, "\x09\x0A\x0D\x20");
              
              
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 3 hrs 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 get_option has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              function get_option( $option, $default = false ) {
                  global $wpdb;
              
                  $option = trim( $option );
                  if ( empty( $option ) )
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/option.php - About 3 hrs 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 call has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  function call($methodname, $args) {
                      // Make sure it's in an array
                      if ($args && !is_array($args)) {
                          $args = array($args);
                      }
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class-IXR.php - About 3 hrs 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 all_deps has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  function all_deps( $handles, $recursion = false, $group = false ) {
                      if ( !$handles = (array) $handles )
                          return false;
              
                      foreach ( $handles as $handle ) {
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class.wp-dependencies.php - About 3 hrs 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 buildGame has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                buildGame(aShots: string): any {
                  const upperShots = aShots.toUpperCase();
              
                  const game = { frames: [], score: 0, fouls: 0 };
                  const normalizedShots = [];

              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