suitmedia/suitcoda

View on GitHub

Showing 552 of 784 total issues

Function getAllLink has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    protected function getAllLink($currentUrl, $lists, &$siteLink, $recursive = 0)
    {
        foreach ($lists as $list) {
            if (!$list || !$this->checkIfCrawlable($list)) {
                continue;
Severity: Minor
Found in app/Supports/CrawlerUrl.php - About 1 hr 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 onComponentGetInfoStateChange has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                    onComponentGetInfoStateChange: function(t) {
                        var q, s, r;
                        if (t) {
                            if (typeof t.comp !== "undefined") {
                                q = t.comp
Severity: Minor
Found in performance/yslow.js - About 1 hr to fix

    Function setSimpleAfterOnload has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                        setSimpleAfterOnload: function(v, A) {
                            var D, C, G, r, w, x, s, u, q, t, E, F, z, H, B, y;
                            if (A) {
                                z = A.docBody;
                                H = A.doc;
    Severity: Minor
    Found in performance/yslow.js - About 1 hr to fix

      Function getComponentsByType has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                          getComponentsByType: function(D, A, u) {
                              var w, v, B, s, E, y, r, x = this.components,
                                  C = this.component_info,
                                  q = [],
                                  z = {};
      Severity: Minor
      Found in performance/yslow.js - About 1 hr to fix

        Function clone has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                var destElements, node, clone, i, srcElements,
                    inPage = jQuery.contains( elem.ownerDocument, elem );
        
                if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
        Severity: Minor
        Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

          Function showHide has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function showHide( elements, show ) {
              var display, elem, hidden,
                  values = [],
                  index = 0,
                  length = elements.length;
          Severity: Minor
          Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

            Function access has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                var i = 0,
                    length = elems.length,
                    bulk = key == null;
            
            
            Severity: Minor
            Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

              Function dispatch has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  dispatch: function( event ) {
              
                      // Make a writable jQuery.Event from the native event object
                      event = jQuery.event.fix( event );
              
              
              Severity: Minor
              Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

                Function clone has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                        var destElements, node, clone, i, srcElements,
                            inPage = jQuery.contains( elem.ownerDocument, elem );
                
                        if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
                Severity: Minor
                Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

                  Function access has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                      var i = 0,
                          length = elems.length,
                          bulk = key == null;
                  
                  
                  Severity: Minor
                  Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

                    Function dispatch has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        dispatch: function( event ) {
                    
                            // Make a writable jQuery.Event from the native event object
                            event = jQuery.event.fix( event );
                    
                    
                    Severity: Minor
                    Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

                      Function showHide has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function showHide( elements, show ) {
                          var display, elem, hidden,
                              values = [],
                              index = 0,
                              length = elements.length;
                      Severity: Minor
                      Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

                        Method testDoRequestHtmlWithTag has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function testDoRequestHtmlWithTag()
                            {
                                $html = '<!DOCTYPE html>
                                    <html>
                                        <head>
                        Severity: Minor
                        Found in tests/Supports/CrawlerUrlTest.php - About 1 hr to fix

                          Function findComponentsInNode has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                              findComponentsInNode: function(s, q, y) {
                                                  var r = [];
                                                  try {
                                                      r = this.findStyleSheets(s, q)
                                                  } catch (z) {
                          Severity: Minor
                          Found in performance/yslow.js - About 1 hr to fix

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

                                                show: function(r) {
                                                    var s = "html",
                                                        q = "";
                                                    r = r || this.yscontext.defaultview;
                                                    if (this.yscontext.component_set === null) {
                            Severity: Minor
                            Found in performance/yslow.js - About 1 hr to fix

                              Function lint has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                                  lint: function(y, B, r) {
                                                      var t, w, A, u, z = (B.inline && B.inline.styles) || [],
                                                          q = B.getComponentsByType("css"),
                                                          v = [],
                                                          s = 100,
                              Severity: Minor
                              Found in performance/yslow.js - About 1 hr to fix

                                Function webforms has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function webforms() {
                                                                            Modernizr['input'] = (function( props ) {
                                            for ( var i = 0, len = props.length; i < len; i++ ) {
                                                attrs[ props[i] ] = !!(props[i] in inputElem);
                                            }
                                Severity: Minor
                                Found in _frontend/assets/js/vendor/modernizr.min.js - About 1 hr to fix

                                  Function setOffset has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      setOffset: function( elem, options, i ) {
                                          var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
                                              position = jQuery.css( elem, "position" ),
                                              curElem = jQuery( elem ),
                                              props = {};
                                  Severity: Minor
                                  Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

                                    Function cleanData has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        cleanData: function( elems, /* internal */ acceptData ) {
                                            var elem, type, id, data,
                                                i = 0,
                                                internalKey = jQuery.expando,
                                                cache = jQuery.cache,
                                    Severity: Minor
                                    Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

                                      Function style has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          style: function( elem, name, value, extra ) {
                                              // Don't set styles on text and comment nodes
                                              if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                                                  return;
                                              }
                                      Severity: Minor
                                      Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language