CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function bind has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        bind: function( elem, value ) {

            // todo: revise if alternative tooltip is needed for mobile devices
            if (Galleria.TOUCH) {
                return;
Severity: Minor
Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 1 hr to fix

    Function backdrop has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Modal.prototype.backdrop = function (callback) {
        var that = this
        var animate = this.$element.hasClass('fade') ? 'fade' : ''
    
        if (this.isShown && this.options.backdrop) {
    Severity: Minor
    Found in Web.Admin/Content/bootstrap/js/bootstrap.js - About 1 hr to fix

      Function raise has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Galleria.raise = function( msg, fatal ) {
      
          var type = fatal ? 'Fatal error' : 'Error',
      
              css = {
      Severity: Minor
      Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 1 hr to fix

        Function show has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          Modal.prototype.show = function (_relatedTarget) {
            var that = this
            var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
        
            this.$element.trigger(e)
        Severity: Minor
        Found in Web.Admin/Content/bootstrap/js/bootstrap.js - About 1 hr to fix

          Method media_upload_image has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function media_upload_image() {
              $errors = array();
              $id = 0;
          
              if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/media.php - About 1 hr to fix

            Method fs_connect has 39 lines of code (exceeds 25 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 1 hr to fix

              Method import_post has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function import_post( $entry ) {
                      global $importing_blog;
              
                      // The old permalink is all Blogger gives us to link comments to their posts.
                      if ( isset( $entry->draft ) )
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/import/blogger.php - About 1 hr to fix

                Method do_core_upgrade has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function do_core_upgrade( $reinstall = false ) {
                    global $wp_filesystem;
                
                    if ( $reinstall )
                        $url = 'update-core.php?action=do-core-reinstall';
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-admin/update-core.php - About 1 hr to fix

                  Method step3 has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function step3() {
                          global $wpdb;
                          set_time_limit( 0 );
                          update_option( 'ljapi_step', 3 );
                  
                  
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/import/livejournal.php - About 1 hr to fix

                    Method twentythirteen_header_style has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function twentythirteen_header_style() {
                        $header_image = get_header_image();
                        $text_color   = get_header_textcolor();
                    
                        // If no custom options for text are set, let's bail.

                      Method date_w3cdtf has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function date_w3cdtf($date)
                          {
                              static $pcre;
                              if (!$pcre)
                              {
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parse/Date.php - About 1 hr to fix

                        Method autodiscovery has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function autodiscovery()
                            {
                                $links = array_merge(SimplePie_Misc::get_element('link', $this->file->body), SimplePie_Misc::get_element('a', $this->file->body), SimplePie_Misc::get_element('area', $this->file->body));
                                $done = array();
                                $feeds = array();
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                          Method get_id has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function get_id($hash = false)
                              {
                                  if (!$hash)
                                  {
                                      if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'id'))
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                            Method date_w3cdtf has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function date_w3cdtf($date)
                                {
                                    static $pcre;
                                    if (!$pcre)
                                    {
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                              Method get_channel_tags has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function get_channel_tags($namespace, $tag)
                                  {
                                      $type = $this->get_type();
                                      if ($type & SIMPLEPIE_TYPE_ATOM_ALL)
                                      {
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                                Method rewrite_rules has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function rewrite_rules() {
                                        $rewrite = array();
                                
                                        if (empty($this->permalink_structure)) {
                                            return $rewrite;
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/rewrite.php - About 1 hr to fix

                                  Method comments_template has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function comments_template( $file = '/comments.php', $separate_comments = false ) {
                                      global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
                                  
                                      if ( !(is_single() || is_page() || $withcomments) || empty($post) )
                                          return;
                                  Severity: Minor
                                  Found in Web.Admin/2014/wordpress/wp-includes/comment-template.php - About 1 hr to fix

                                    Method BuildTables has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            public static void BuildTables()
                                            {
                                                using (var con = new SqlConnection(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString))
                                                {
                                                    con.Open();
                                    Severity: Minor
                                    Found in UITestsFramework/Database/Initialization.cs - About 1 hr to fix

                                      Method SaveEventsFor has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              public void SaveEventsFor<TAggregate>(Guid? id, int eventsLoaded, ArrayList newEvents)
                                              {
                                                  // Establish the aggregate ID to save the events under and ensure they
                                                  // all have the correct ID.
                                                  if (newEvents.Count == 0)
                                      Severity: Minor
                                      Found in Edument.CQRS/SqlEventStore.cs - About 1 hr to fix

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

                                                for(i=0;i<Language.syntax.length;i++) 
                                                    x = x.replace(Language.syntax[i].input,Language.syntax[i].output);
                                        Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.js on lines 134..135
                                        Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 117..118

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

                                        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