BallStateCBER/datacenter-plugin-cakephp3

View on GitHub

Showing 955 of 1,787 total issues

Function imagecopymergealpha has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
Open

    function imagecopymergealpha(&$dst_im, &$src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct = 0) {
        $dst_x = (int) $dst_x;
        $dst_y = (int) $dst_y;
        $src_x = (int) $src_x;
        $src_y = (int) $src_y;
Severity: Minor
Found in webroot/js/tiny_mce/plugins/phpimage/classes/class.upload.php - About 5 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 init has 142 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function init() {
    var pl = "", f, val;
    var type = "flash", fe, i;

    ed = tinyMCEPopup.editor;
Severity: Major
Found in webroot/js/tiny_mce/plugins/media/js/media.js - About 5 hrs to fix

    Consider simplifying this complex logical expression.
    Open

            if ($this->processed) {
                $this->file_dst_path        = $server_path;
    
                // repopulate dst variables from src
                $this->file_dst_name        = $this->file_src_name;
    Severity: Critical
    Found in webroot/js/tiny_mce/plugins/phpimage/classes/class.upload.php - About 5 hrs to fix

      Function _create has 132 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _create: function() {
      
              var n, i, handle, axis, hname,
                  that = this,
                  o = this.options;
      Severity: Major
      Found in webroot/jquery-ui-1.11.3.custom/jquery-ui.js - About 5 hrs to fix

        File advlink.js has 384 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* Functions for the advlink plugin popup */
        
        tinyMCEPopup.requireLangPack();
        
        var templates = {
        Severity: Minor
        Found in webroot/js/tiny_mce/plugins/advlink/js/advlink.js - About 5 hrs to fix

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

                  init : function(s) {
                      var t = this, pl, sl = tinymce.ScriptLoader, c, e, el = [], ed;
          
                      function execCallback(se, n, s) {
                          var f = se[n];
          Severity: Major
          Found in webroot/js/tiny_mce/tiny_mce_src.js - About 5 hrs to fix

            Function _applyInlineStyle has 128 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _applyInlineStyle : function(na, at, op) {
                        var t = this, ed = t.editor, dom = ed.dom, bm, lo = {}, kh, found;
            
                        na = na.toUpperCase();
            
            
            Severity: Major
            Found in webroot/js/tiny_mce/tiny_mce_src.js - About 5 hrs to fix

              Function Callbacks has 128 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jQuery.Callbacks = function( options ) {
              
                  // Convert options from String-formatted to Object-formatted if needed
                  // (we check in cache first)
                  options = typeof options === "string" ?
              Severity: Major
              Found in webroot/jquery-ui-1.11.3.custom/external/jquery/jquery.js - About 5 hrs to fix

                Consider simplifying this complex logical expression.
                Open

                            if ( event.pageX == null && original.clientX != null ) {
                                eventDoc = event.target.ownerDocument || document;
                                doc = eventDoc.documentElement;
                                body = eventDoc.body;
                
                
                Severity: Critical
                Found in webroot/js/jquery-1.7.1.js - About 5 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if ( event.pageX == null && original.clientX != null ) {
                                  eventDoc = event.target.ownerDocument || document;
                                  doc = eventDoc.documentElement;
                                  body = eventDoc.body;
                  
                  
                  Severity: Critical
                  Found in webroot/jquery-ui-1.11.3.custom/external/jquery/jquery.js - About 5 hrs to fix

                    Function _serializeNode has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            _serializeNode : function(n, inn) {
                                var t = this, s = t.settings, w = t.writer, hc, el, cn, i, l, a, at, no, v, nn, ru, ar, iv, closed;
                    
                                if (!s.node_filter || s.node_filter(n)) {
                                    switch (n.nodeType) {
                    Severity: Major
                    Found in webroot/js/tiny_mce/tiny_mce_src.js - About 4 hrs to fix

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

                              init : function() {
                                  var n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re;
                      
                                  EditorManager.add(t);
                      
                      
                      Severity: Major
                      Found in webroot/js/tiny_mce/tiny_mce_src.js - About 4 hrs to fix

                        Function reposition has 121 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        ;PROTOTYPE.reposition = function(event, effect) {
                            if(!this.rendered || this.positioning || this.destroyed) { return this; }
                        
                            // Set positioning flag
                            this.positioning = TRUE;
                        Severity: Major
                        Found in webroot/js/jquery.qtip.js - About 4 hrs to fix

                          Function generateCSS has 120 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function generateCSS() {
                              var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
                          
                              ce.style.cssText = "";
                          
                          
                          Severity: Major
                          Found in webroot/js/tiny_mce/plugins/style/js/props.js - About 4 hrs to fix

                            Function support has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            jQuery.support = (function( support ) {
                            
                                var all, a, input, select, fragment, opt, eventName, isSupported, i,
                                    div = document.createElement("div");
                            
                            
                            Severity: Major
                            Found in webroot/jquery-ui-1.11.3.custom/external/jquery/jquery.js - About 4 hrs to fix

                              Function _init has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  _init : function() {
                                      var t = this, d = document, w = window, na = navigator, ua = na.userAgent, i, nl, n, base, p, v;
                              
                                      t.isOpera = w.opera && opera.buildNumber;
                              
                              
                              Severity: Minor
                              Found in webroot/js/tiny_mce/tiny_mce_src.js - About 4 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 searchNext has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  searchNext : function(a) {
                                      var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
                              
                                      // Get input
                                      f = document.forms[0];
                              Severity: Minor
                              Found in webroot/js/tiny_mce/plugins/searchreplace/js/searchreplace.js - About 4 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 imagecreatefrombmp has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  function imagecreatefrombmp($filename) {
                                      if (! $f1 = fopen($filename,"rb")) return false;
                              
                                      $file = unpack("vfile_type/Vfile_size/Vreserved/Vbitmap_offset", fread($f1,14));
                                      if ($file['file_type'] != 19778) return false;
                              Severity: Minor
                              Found in webroot/js/tiny_mce/plugins/phpimage/classes/class.upload.php - About 4 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 _create has 115 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _create: function() {
                                      this.element.closest( "form" )
                                          .unbind( "reset" + this.eventNamespace )
                                          .bind( "reset" + this.eventNamespace, formResetHandler );
                              
                              
                              Severity: Major
                              Found in webroot/jquery-ui-1.11.3.custom/jquery-ui.js - About 4 hrs to fix

                                Function generatePreview has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function generatePreview(c) {
                                    var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh;
                                
                                    p.innerHTML = '<!-- x --->';
                                
                                
                                Severity: Minor
                                Found in webroot/js/tiny_mce/plugins/media/js/media.js - About 4 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

                                Severity
                                Category
                                Status
                                Source
                                Language