lancew/DojoList

View on GitHub

Showing 388 of 1,940 total issues

Method error_handler_dispatcher has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function error_handler_dispatcher($errno, $errstr, $errfile, $errline)
{
  $back_trace = debug_backtrace();
  while($trace = array_shift($back_trace))
  {
Severity: Minor
Found in lib/limonade.php - About 1 hr to fix

    Method Admin_Create_kml has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Admin_Create_kml() 
    {
        $xml = Find_Dojo_all();
    
        $newKML = '<?xml version="1.0" encoding="UTF-8"?>
    Severity: Minor
    Found in controllers/admin.php - About 1 hr to fix

      Function openBubble has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Marker.prototype.openBubble = function() {
          if(this.mapstraction.loaded[this.api] === false) {
              var my_marker = this;
              this.mapstraction.onload[this.api].push( function() {
                  my_marker.openBubble();
      Severity: Minor
      Found in js/mapstraction.js - About 1 hr to fix

        Method assert_header has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
        {
          test_run_assertion();
          # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
          $headers = preg_split("/^\s*$/ms", $response);
        Severity: Minor
        Found in lib/limonade/assertions.php - About 1 hr to fix

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

            Array.prototype.concat = function() {
              var array = [];
              for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
              for (var i = 0, length = arguments.length; i < length; i++) {
                if (Object.isArray(arguments[i])) {
          Severity: Minor
          Found in js/prototype/prototype-1.6.0.3.js - 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 compileMatcher has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

            compileMatcher: function() {
              var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
                  c = Selector.criteria, le, p, m;
          
              if (Selector._cache[e]) {
          Severity: Minor
          Found in js/prototype/prototype-1.6.0.3.js - 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 stop_and_exit has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

          function stop_and_exit($exit = true)
          {
            call_if_exists('before_exit', $exit);
            $headers = headers_list();
            if(request_is_head())
          Severity: Minor
          Found in lib/limonade.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 getZoom has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Mapstraction.prototype.getZoom = function() {
              if(this.loaded[this.api] === false) {
                  var me = this;
                  return -1;
              }
          Severity: Minor
          Found in js/mapstraction.js - About 1 hr to fix

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

            function ImportNewerFarDojo($file)
            {
                $farxml = LoadFarXML($file);
                $localxml = Load_Xml_data();
                
            Severity: Minor
            Found in lib/sync.model.php - About 1 hr to fix

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

              function KMLparser(path,map){ //path: url to the kml file. map: div where the map is
                 var request = GXmlHttp.create();
                 request.open('GET', path, true);
                 request.onreadystatechange = function(){        
                      if (request.readyState == 4){
              Severity: Minor
              Found in js/KMLparser.js - About 1 hr to fix

                Method Validate_field has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function Validate_field($data, $type)
                {
                    // This function checks fields and returns the number of errors found.
                    // Check if the parameters have been sent.
                    //if(!$data or !$type) { return 1;}
                Severity: Minor
                Found in lib/data.model.php - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
                              submit !== false && (!submit || key == submit) && (submitted = true)))) {
                            if (key in result) {
                              // a key is already present; construct an array of values
                              if (!Object.isArray(result[key])) result[key] = [result[key]];
                  Severity: Critical
                  Found in js/prototype/prototype-1.6.0.3.js - About 1 hr to fix

                    Function polylineCenterAndZoom has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Mapstraction.prototype.polylineCenterAndZoom = function(radius)
                    {
                        if(this.loaded[this.api] == false)
                        {
                            myself = this;
                    Severity: Minor
                    Found in js/mapstraction.js - About 1 hr to fix

                      Function setOpacity has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                        Element.Methods.setOpacity = function(element, value) {
                          function stripAlpha(filter){
                            return filter.replace(/alpha\([^\)]*\)/gi,'');
                          }
                          element = $(element);
                      Severity: Minor
                      Found in js/prototype/prototype-1.6.0.3.js - 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 not has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                            'not': function(m) {
                              var e = m[6], p = Selector.patterns,
                                  x = Selector.xpath, le, v;
                      
                              var exclusion = [];
                      Severity: Minor
                      Found in js/prototype/prototype-1.6.0.3.js - 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 respondToReadyState has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                        respondToReadyState: function(readyState) {
                          var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
                      
                          if (state == 'Complete') {
                            try {
                      Severity: Minor
                      Found in js/prototype/prototype-1.6.0.3.js - 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 viewportOffset has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                        viewportOffset: function(forElement) {
                          var valueT = 0, valueL = 0;
                      
                          var element = forElement;
                          do {
                      Severity: Minor
                      Found in js/prototype/prototype-1.6.0.3.js - 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 compileXPathMatcher has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                        compileXPathMatcher: function() {
                          var e = this.expression, ps = Selector.patterns,
                              x = Selector.xpath, le, m;
                      
                          if (Selector._cache[e]) {
                      Severity: Minor
                      Found in js/prototype/prototype-1.6.0.3.js - 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 addMapTypeControls has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Mapstraction.prototype.addMapTypeControls = function() {
                          if(this.loaded[this.api] === false) {
                              var me = this;
                              this.onload[this.api].push( function() {
                                  me.addMapTypeControls();
                      Severity: Minor
                      Found in js/mapstraction.js - About 1 hr to fix

                        Function request has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          request: function(url) {
                            this.url = url;
                            this.method = this.options.method;
                            var params = Object.clone(this.options.parameters);
                        
                        
                        Severity: Minor
                        Found in js/prototype/prototype-1.6.0.3.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language