suitmedia/suitcoda

View on GitHub

Showing 552 of 784 total issues

Avoid too many return statements within this function.
Open

            return sortInput ?
                ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
                0;
Severity: Major
Found in _frontend/dev/js/vendor/jquery.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return false;
    Severity: Major
    Found in _frontend/dev/js/vendor/fastclick.js - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return $this->jsResultReader($match[0] . $this->job->url->id . '/resultJS.json');
      Severity: Major
      Found in app/Supports/ResultReader.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return $this->socialMediaResultReader($match[0] . $this->job->url->id . '/resultSocmed.json');
        Severity: Major
        Found in app/Supports/ResultReader.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return $this->ySlowResultReader($match[0] . $this->job->url->id . '/resultYSlow.json');
          Severity: Major
          Found in app/Supports/ResultReader.php - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return select( selector.replace( rtrim, "$1" ), context, results, seed );
            Severity: Major
            Found in _frontend/dev/js/vendor/jquery.js - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return $this->gPagespeedResultReader($match[0] . $this->job->url->id . '/resultPagespeedDesktop.json');
              Severity: Major
              Found in app/Supports/ResultReader.php - About 30 mins to fix

                Function check has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                function check(url) {
                
                    var Horseman    = require('node-horseman'),
                        horseman    = new Horseman();
                
                
                Severity: Minor
                Found in socmed/opengraph.js - About 25 mins 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 needsClick has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                FastClick.prototype.needsClick = function(target) {
                    'use strict';
                    switch (target.nodeName.toLowerCase()) {
                
                    // Don't send a synthetic click to disabled inputs (issue #62)
                Severity: Minor
                Found in _frontend/assets/js/vendor/fastclick.min.js - About 25 mins 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 generateJobByType has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                    protected function generateJobByType($event, $type)
                    {
                        $urls = $event->project->urls()->active()->byType($type)->get();
                        $scopes = $this->generator->getByType($type);
                        foreach ($scopes as $scope) {
                Severity: Minor
                Found in app/Listeners/JobGenerator.php - About 25 mins 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 generateCommand has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function generateCommand($overallScopes, $name)
                    {
                        $scopeByName = $this->scope->getByName($name);
                
                        $overallScopes = (int)$overallScopes;
                Severity: Minor
                Found in app/Supports/CommandLineGenerator.php - About 25 mins 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 needsClick has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                FastClick.prototype.needsClick = function(target) {
                    'use strict';
                    switch (target.nodeName.toLowerCase()) {
                
                    // Don't send a synthetic click to disabled inputs (issue #62)
                Severity: Minor
                Found in _frontend/dev/js/vendor/fastclick.js - About 25 mins 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