lancew/DojoList

View on GitHub

Showing 216 of 1,940 total issues

Function getCenter has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

    Function removePolyline has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Function removeMarker has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Function addOverlay has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Function toYahoo has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Marker.prototype.toYahoo = function() {
              var ymarker;
              var size;
              if(this.iconSize) {
                  size = new YSize(this.iconSize[0], this.iconSize[1]);
          Severity: Minor
          Found in js/mapstraction.js - About 1 hr to fix

            Method env has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function env($reset = null)
            {
              static $env = array();
              if(func_num_args() > 0)
              {
            Severity: Minor
            Found in lib/limonade.php - About 1 hr to fix

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

                Element.Methods.setOpacity = function(element, value) {
                  element = $(element);
                  element.style.opacity = (value == 1 || value === '') ? '' :
                    (value < 0.00001) ? 0 : value;
              
              
              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 match has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                match: function(element) {
                  this.tokens = [];
              
                  var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
                  var le, p, m;
              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 Methods has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              Event.Methods = (function() {
                var isButton;
              
                if (Prototype.Browser.IE) {
                  var buttonMap = { 0: 1, 1: 4, 2: 2 };
              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 getStyle has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                  function(proceed, element, style) {
                    switch (style) {
                      case 'left': case 'top': case 'right': case 'bottom':
                        if (proceed(element, 'position') === 'static') return null;
                      case 'height': case 'width':
              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 addData has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Marker.prototype.addData = function(options){
                  for(var sOptKey in options) {
                      switch(sOptKey) {
                          case 'label':
                              this.setLabel(options.label);
              Severity: Minor
              Found in js/mapstraction.js - About 1 hr to fix

                Function addSmallControls has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Function resizeTo has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Function autoCenterAndZoom has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      Function removeAllMarkers has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Function addTileLayer has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        Mapstraction.prototype.addTileLayer = function(tile_url, opacity, copyright_text, min_zoom, max_zoom) {
                            if(!tile_url) {
                                return;
                            }
                            if(!this.tileLayers) {
                        Severity: Minor
                        Found in js/mapstraction.js - About 1 hr to fix

                          Method render has 44 lines of code (exceeds 25 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 1 hr to fix

                            Method Admin_importjwm has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function Admin_importjwm() 
                            {
                            
                                set_time_limit();
                                $ch = curl_init("http://judoworldmap.com/");
                            Severity: Minor
                            Found in controllers/admin.php - About 1 hr to fix

                              Function request has a Cognitive Complexity of 14 (exceeds 5 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

                              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 extend has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Element.extend = (function() {
                                if (Prototype.BrowserFeatures.SpecificElementExtensions)
                                  return Prototype.K;
                              
                                var Methods = { }, ByTag = Element.Methods.ByTag;
                              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

                              Severity
                              Category
                              Status
                              Source
                              Language