lancew/DojoList

View on GitHub

Showing 216 of 1,940 total issues

Function Methods has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Event.Methods = (function() {
  var isButton;

  if (Prototype.Browser.IE) {
    var buttonMap = { 0: 1, 1: 4, 2: 2 };
Severity: Major
Found in js/prototype/prototype-1.6.0.3.js - About 2 hrs to fix

    Function setCenter has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Function removeAllPolylines has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Function tagName has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
        Open

            tagName: function(nodes, root, tagName, combinator) {
              var uTagName = tagName.toUpperCase();
              var results = [], h = Selector.handlers;
              if (nodes) {
                if (combinator) {
        Severity: Minor
        Found in js/prototype/prototype-1.6.0.3.js - 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 url_for has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
        Open

        function url_for($params = null)
        {
          $paths  = array();
          $params = func_get_args();
          $GET_params = array();
        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

        Enumerable has 22 functions (exceeds 20 allowed). Consider refactoring.
        Open

        var Enumerable = {
          each: function(iterator, context) {
            var index = 0;
            try {
              this._each(function(value) {
        Severity: Minor
        Found in js/prototype/prototype-1.6.0.3.js - About 2 hrs to fix

          Function toOpenLayers has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Marker.prototype.toOpenLayers = function() {
              var size, anchor, icon;
              if(this.iconSize) {
                  size = new OpenLayers.Size(this.iconSize[0], this.iconSize[1]);
              }
          Severity: Major
          Found in js/mapstraction.js - About 2 hrs to fix

            Function setZoom has 57 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Function route_find has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

              function route_find($method, $path)
              {
                $routes = route();
                $method = strtoupper($method);
                foreach($routes as $route)
              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 addJSON has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Mapstraction.prototype.addJSON = function(json) {
                  var features;
                  if (typeof(json) == "string") {
                      features = eval('(' + json + ')');
                  } else {
              Severity: Major
              Found in js/mapstraction.js - About 2 hrs to fix

                Method http_response_status has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function http_response_status($num = null)
                {
                  $status =  array(
                      100 => 'Continue',
                      101 => 'Switching Protocols',
                Severity: Major
                Found in lib/limonade.php - About 2 hrs to fix

                  File create.html.php has 257 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <script>
                    $(document).ready(function(){
                      $("#dojoform").validate();
                    });
                    </script>
                  Severity: Minor
                  Found in views/dojo/create.html.php - About 2 hrs to fix

                    Function getBounds has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Mapstraction.prototype.getBounds = function () {
                        if(this.loaded[this.api] === false) {
                            return null;
                        }
                    
                    Severity: Major
                    Found in js/mapstraction.js - About 2 hrs to fix

                      Function dragging has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Function addImageOverlay has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        Mapstraction.prototype.addImageOverlay = function(id, src, opacity, west, south, east, north) {
                            if(this.loaded[this.api] === false) {
                                var me = this;
                                this.onload[this.api].push( function() {
                                    me.addImageOverlay(id, src, opacity, west, south, east, north);
                        Severity: Major
                        Found in js/mapstraction.js - About 2 hrs to fix

                          Function addLargeControls has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            Function Hash has a Cognitive Complexity of 16 (exceeds 5 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: Minor
                            Found in js/prototype/prototype-1.6.0.3.js - 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 insert has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                            Open

                              insert: function(element, insertions) {
                                element = $(element);
                            
                                if (Object.isString(insertions) || Object.isNumber(insertions) ||
                                    Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
                            Severity: Minor
                            Found in js/prototype/prototype-1.6.0.3.js - 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 index has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                            Open

                                index: function(parentNode, reverse, ofType) {
                                  parentNode._countedByPrototype = Prototype.emptyFunction;
                                  if (reverse) {
                                    for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
                                      var node = nodes[i];
                            Severity: Minor
                            Found in js/prototype/prototype-1.6.0.3.js - 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 mousePosition has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            Mapstraction.prototype.mousePosition = function(element) {
                                if(this.loaded[this.api] === false) {
                                    var me = this;
                                    this.onload[this.api].push( function() {
                                        me.mousePosition(element);
                            Severity: Major
                            Found in js/mapstraction.js - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language