suitmedia/suitcoda

View on GitHub

Showing 552 of 784 total issues

Method testRunPageSpeedResultReader has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testRunPageSpeedResultReader()
    {
        $json = json_encode([
            'id' => 'https://example.com/',
            'formattedResults' => [
Severity: Minor
Found in tests/Supports/ResultReaderTest.php - About 1 hr to fix

    Method testDoRequestHtmlWithoutTag has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Function countAlphaImageLoaderFilter has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                          countAlphaImageLoaderFilter: function(v) {
                              var t, u, s, w, r = 0,
                                  x = 0,
                                  q = {};
                              t = v.indexOf("filter:");
      Severity: Minor
      Found in performance/yslow.js - About 1 hr to fix

        Function toggleClass has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            toggleClass: function( value, stateVal ) {
                var type = typeof value;
        
                if ( typeof stateVal === "boolean" && type === "string" ) {
                    return stateVal ? this.addClass( value ) : this.removeClass( value );
        Severity: Minor
        Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

          Function html has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              html: function( value ) {
                  return access( this, function( value ) {
                      var elem = this[ 0 ] || {},
                          i = 0,
                          l = this.length;
          Severity: Minor
          Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

            Function html has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                html: function( value ) {
                    return access( this, function( value ) {
                        var elem = this[ 0 ] || {},
                            i = 0,
                            l = this.length;
            Severity: Minor
            Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

              Function toggleClass has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  toggleClass: function( value, stateVal ) {
                      var type = typeof value;
              
                      if ( typeof stateVal === "boolean" && type === "string" ) {
                          return stateVal ? this.addClass( value ) : this.removeClass( value );
              Severity: Minor
              Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

                Function onTouchStart has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                FastClick.prototype.onTouchStart = function(event) {
                    'use strict';
                    var targetElement, touch, selection;
                
                    // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
                Severity: Minor
                Found in _frontend/assets/js/vendor/fastclick.min.js - About 1 hr to fix

                  Function onTouchStart has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  FastClick.prototype.onTouchStart = function(event) {
                      'use strict';
                      var targetElement, touch, selection;
                  
                      // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
                  Severity: Minor
                  Found in _frontend/dev/js/vendor/fastclick.js - About 1 hr to fix

                    Function openSaveAsDialog has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                        openSaveAsDialog: function(s, r) {
                                            var q = '<label>Save ruleset as: <input type="text" id="saveas-name" class="text-input" name="saveas-name" length="100" maxlength="100"></label>',
                                                t = "Save",
                                                u = function(B) {
                                                    var y, w, v, z, x, A = YSLOW.util.getCurrentTarget(B).ownerDocument;
                    Severity: Minor
                    Found in performance/yslow.js - About 1 hr to fix

                      Function fix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          fix: function( event ) {
                              if ( event[ jQuery.expando ] ) {
                                  return event;
                              }
                      
                      
                      Severity: Minor
                      Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

                        Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            finish: function( type ) {
                                if ( type !== false ) {
                                    type = type || "fx";
                                }
                                return this.each(function() {
                        Severity: Minor
                        Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

                          Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              finish: function( type ) {
                                  if ( type !== false ) {
                                      type = type || "fx";
                                  }
                                  return this.each(function() {
                          Severity: Minor
                          Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

                            Function drawGraph has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                            function drawGraph ( graph, dataTitle, dataSeries, dataXAxis) {
                                                var option = {
                                                    title: {
                                                        text: dataTitle,
                                                        align: 'center'
                            Severity: Minor
                            Found in _frontend/assets/js/main.min.js - About 1 hr to fix

                              Function fix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  fix: function( event ) {
                                      if ( event[ jQuery.expando ] ) {
                                          return event;
                                      }
                              
                              
                              Severity: Minor
                              Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

                                Function drawGraph has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                                function drawGraph ( graph, dataTitle, dataSeries, dataXAxis) {
                                                    var option = {
                                                        title: {
                                                            text: dataTitle,
                                                            align: 'center'
                                Severity: Minor
                                Found in _frontend/dev/js/main.js - About 1 hr to fix

                                  Function doRequest has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function doRequest($url, $try = null)
                                      {
                                          if (is_null($try)) {
                                              $try = $this->retry;
                                          }
                                  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 handle has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function handle()
                                      {
                                          $unhandledJob = $this->job->getUnhandledJob()->first();
                                          if ($unhandledJob) {
                                              $this->updateJob($unhandledJob, 1);
                                  Severity: Minor
                                  Found in app/Console/Commands/WorkerCommand.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 plotOne has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                                      plotOne: function(A, t, z, y) {
                                                          var s, u, C, r, x, q, w, D, v, B = A.getElementsByTagName("canvas");
                                                          for (u = 0; u < B.length; u += 1) {
                                                              if (B[u].id === y) {
                                                                  s = B[u]
                                  Severity: Minor
                                  Found in performance/yslow.js - About 1 hr to fix

                                    Function reportcardView has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                        reportcardView: function(w) {
                                                            var t, r, y, u = w.getOverallScore(),
                                                                s = YSLOW.util.prettyScore(u),
                                                                x = w.getRulesetApplied(),
                                                                v = w.getResults(),
                                    Severity: Minor
                                    Found in performance/yslow.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language