lancew/DojoList

View on GitHub

Showing 216 of 1,940 total issues

Function addPolyline has 93 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Mapstraction.prototype.addPolyline = function(polyline, old) {

    if(this.loaded[this.api] === false) {
        var me = this;
        this.onload[this.api].push( function() {
Severity: Major
Found in js/mapstraction.js - About 3 hrs to fix

    `` has 30 functions (exceeds 20 allowed). Consider refactoring.
    Open

    Object.extend(String.prototype, {
      gsub: function(pattern, replacement) {
        var result = '', source = this, match;
        replacement = arguments.callee.prepareReplacement(replacement);
    
    
    Severity: Minor
    Found in js/prototype/prototype-1.6.0.3.js - About 3 hrs to fix

      Method Dojo_Editform_end has 89 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function Dojo_Editform_end() 
      {
          if (!Validate_form($_POST) ) {
              $resp = recaptcha_check_answer(
                  option('recaptcha_private_key'),
      Severity: Major
      Found in controllers/dojo.php - About 3 hrs to fix

        Function setBounds has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Mapstraction.prototype.setBounds = function(bounds){
            if(this.loaded[this.api] === false) {
                var me = this;
                this.onload[this.api].push( function() {
                    me.setBounds(bounds);
        Severity: Major
        Found in js/mapstraction.js - About 3 hrs to fix

          Function KMLparser has a Cognitive Complexity of 23 (exceeds 5 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 3 hrs 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 getMapType has 80 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method request_uri has 78 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function request_uri($env = null)
            {
              static $uri = null;
              if(is_null($env))
              {
            Severity: Major
            Found in lib/limonade.php - About 3 hrs to fix

              Method Create_dojo has 78 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function Create_dojo($dojo, $file = null)
              {
                  Backup_data();
                  
                  $xml = Load_Xml_data();
              Severity: Major
              Found in lib/dojo.model.php - About 3 hrs to fix

                Function serializeElements has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                Open

                  serializeElements: function(elements, options) {
                    if (typeof options != 'object') options = { hash: !!options };
                    else if (Object.isUndefined(options.hash)) options.hash = true;
                    var key, value, submitted = false, submit = options.submit;
                
                
                Severity: Minor
                Found in js/prototype/prototype-1.6.0.3.js - About 3 hrs 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 getStyle has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                Open

                  Element.Methods.getStyle = function(element, style) {
                    element = $(element);
                    style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
                    var value = element.style[style];
                    if (!value && element.currentStyle) value = element.currentStyle[style];
                Severity: Minor
                Found in js/prototype/prototype-1.6.0.3.js - About 3 hrs 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 Hash has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var Hash = Class.create(Enumerable, (function() {
                
                  function toQueryPair(key, value) {
                    if (Object.isUndefined(value)) return key;
                    return key + '=' + encodeURIComponent(String.interpret(value));
                Severity: Major
                Found in js/prototype/prototype-1.6.0.3.js - About 2 hrs to fix

                  Method route_build has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function route_build($method, $path_or_array, $callback, $options = array())
                  {
                    $method = strtoupper($method);
                    if(!in_array($method, request_methods())) 
                      trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
                  Severity: Major
                  Found in lib/limonade.php - About 2 hrs to fix

                    Function addMethods has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Element.addMethods = function(methods) {
                      var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
                    
                      if (!methods) {
                        Object.extend(Form, Form.Methods);
                    Severity: Major
                    Found in js/prototype/prototype-1.6.0.3.js - About 2 hrs to fix

                      Function render has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function render($content_or_func, $layout = '', $locals = array())
                      {
                        $args = func_get_args();
                        $content_or_func = array_shift($args);
                        $layout = count($args) > 0 ? array_shift($args) : layout();
                      Severity: Minor
                      Found in lib/limonade.php - About 2 hrs 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 search has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function search() 
                      {
                          $term = params('term');
                          set('term', $term);
                          $term = strtolower($term);
                      Severity: Minor
                      Found in controllers/main.php - About 2 hrs 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 writeInclude has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Mapstraction.writeInclude = function(api, key, version) {
                          var jsfiles = [];
                          var allScriptTags = '';
                          var host = Mapstraction._getScriptLocation() + 'lib/';
                          switch(api) {
                      Severity: Major
                      Found in js/mapstraction.js - About 2 hrs to fix

                        Function toGoogle has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        Marker.prototype.toGoogle = function() {
                            var options = {};
                            if(this.labelText){
                                options.title =  this.labelText;
                            }
                        Severity: Major
                        Found in js/mapstraction.js - About 2 hrs to fix

                          Method search has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function search() 
                          {
                              $term = params('term');
                              set('term', $term);
                              $term = strtolower($term);
                          Severity: Major
                          Found in controllers/main.php - About 2 hrs to fix

                            Function setCenterAndZoom has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            Mapstraction.prototype.setCenterAndZoom = function(point, zoom) {
                                if(this.loaded[this.api] === false) {
                                    var me = this;
                                    this.onload[this.api].push( function() {
                                        me.setCenterAndZoom(point, zoom);
                            Severity: Major
                            Found in js/mapstraction.js - About 2 hrs to fix

                              Function error_handler_dispatcher has a Cognitive Complexity of 19 (exceeds 5 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 2 hrs 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