lancew/DojoList

View on GitHub

Showing 216 of 1,940 total issues

Avoid too many return statements within this method.
Open

            return 'Contact telephone number: Must be numbers 0-9 only';
Severity: Major
Found in lib/data.model.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return null;
    Severity: Major
    Found in lib/data.model.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return null;
      Severity: Major
      Found in lib/data.model.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return null;
        Severity: Major
        Found in lib/data.model.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

            return $messages;
          Severity: Major
          Found in lib/limonade.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return null;
            Severity: Major
            Found in lib/data.model.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return 'Dojo Address: Must be alphanumeric or a comma, or fullstop only';
              Severity: Major
              Found in lib/data.model.php - About 30 mins to fix

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

                  initialize: function(request){
                    this.request = request;
                    var transport  = this.transport  = request.transport,
                        readyState = this.readyState = transport.readyState;
                
                
                Severity: Minor
                Found in js/prototype/prototype-1.6.0.3.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 clonePosition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  clonePosition: function(element, source) {
                    var options = Object.extend({
                      setLeft:    true,
                      setTop:     true,
                      setWidth:   true,
                Severity: Minor
                Found in js/prototype/prototype-1.6.0.3.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 attrPresence has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                    attrPresence: function(nodes, root, attr, combinator) {
                      if (!nodes) nodes = root.getElementsByTagName("*");
                      if (nodes && combinator) nodes = this[combinator](nodes);
                      var results = [];
                      for (var i = 0, node; node = nodes[i]; i++)
                Severity: Minor
                Found in js/prototype/prototype-1.6.0.3.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 getOffsetParent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  getOffsetParent: function(element) {
                    if (element.offsetParent) return $(element.offsetParent);
                    if (element == document.body) return $(element);
                
                    while ((element = element.parentNode) && element != document.body)
                Severity: Minor
                Found in js/prototype/prototype-1.6.0.3.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 getInputs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  getInputs: function(form, typeName, name) {
                    form = $(form);
                    var inputs = form.getElementsByTagName('input');
                
                    if (!typeName && !name) return $A(inputs).map(Element.extend);
                Severity: Minor
                Found in js/prototype/prototype-1.6.0.3.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 inspect has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  inspect: function(object) {
                    try {
                      if (Object.isUndefined(object)) return 'undefined';
                      if (object === null) return 'null';
                      return object.inspect ? object.inspect() : String(object);
                Severity: Minor
                Found in js/prototype/prototype-1.6.0.3.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 recaptcha_check_answer has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
                {
                    if ($privkey == null || $privkey == '') {
                        die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
                    }
                Severity: Minor
                Found in lib/recaptchalib.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 flash has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                function flash($name = null, $value = null)
                {
                  if(!defined('SID')) trigger_error("Flash messages can't be used because session isn't enabled", E_USER_WARNING);
                  static $messages = array();
                  $args = func_get_args();
                Severity: Minor
                Found in lib/limonade.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 file_read_chunked has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                function file_read_chunked($filename, $retbytes = true)
                {
                  $chunksize = 1*(1024*1024); // how many bytes per chunk
                  $buffer    = '';
                  $cnt       = 0;
                Severity: Minor
                Found in lib/limonade.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

                Severity
                Category
                Status
                Source
                Language