lancew/DojoList

View on GitHub

Showing 1,940 of 1,940 total issues

Method ListNewerFarDojo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
      getValue: function() {
        return Form.Element.getValue(this.element);
      }
    });
    Severity: Major
    Found in js/prototype/prototype-1.6.0.3.js and 1 other location - About 1 hr to fix
    js/prototype/prototype-1.6.0.3.js on lines 3721..3725

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                    this.maps[api].addEventHandler('click', function(eventType, eventTarget, arg1, arg2, arg3){
                        if (arg1) {
                            me.clickHandler(arg1.lat, arg1.lon, me);
                        }
                    });
    Severity: Major
    Found in js/mapstraction.js and 1 other location - About 1 hr to fix
    js/mapstraction.js on lines 678..682

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                    this.maps[api].addEventHandler('onClick', function(eventType, eventTarget, arg1, arg2, arg3){
                        if (arg1) {
                            me.clickHandler(arg1.lat, arg1.lon, me);
                        }
                    });
    Severity: Major
    Found in js/mapstraction.js and 1 other location - About 1 hr to fix
    js/mapstraction.js on lines 531..535

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    Form.Element.Observer = Class.create(Abstract.TimedObserver, {
      getValue: function() {
        return Form.Element.getValue(this.element);
      }
    });
    Severity: Major
    Found in js/prototype/prototype-1.6.0.3.js and 1 other location - About 1 hr to fix
    js/prototype/prototype-1.6.0.3.js on lines 3774..3778

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function nth has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        nth: function(nodes, formula, root, reverse, ofType) {
          if (nodes.length == 0) return [];
          if (formula == 'even') formula = '2n+0';
          if (formula == 'odd')  formula = '2n+1';
          var h = Selector.handlers, results = [], indexed = [], m;
    Severity: Minor
    Found in js/prototype/prototype-1.6.0.3.js - About 1 hr to fix

      Function extend has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Event.extend = (function() {
        var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
          m[name] = Event.Methods[name].methodize();
          return m;
        });
      Severity: Minor
      Found in js/prototype/prototype-1.6.0.3.js - About 1 hr to fix

        Function addPolygon has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method NewerFarDojo has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                                else {
                                    this.maps[this.api].addOverlay(this.tileLayers[f][1]);
                                    this.tileLayers[f][2] = true;
                                }
            Severity: Major
            Found in js/mapstraction.js and 1 other location - About 1 hr to fix
            js/mapstraction.js on lines 3336..3339

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                                if(this.tileLayers[f][2]) {
                                    this.maps[this.api].removeOverlay(this.tileLayers[f][1]);
                                    this.tileLayers[f][2] = false;
                                }
            Severity: Major
            Found in js/mapstraction.js and 1 other location - About 1 hr to fix
            js/mapstraction.js on lines 3340..3343

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Function cumulativeOffset has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

              Element.Methods.cumulativeOffset = function(element) {
                var valueT = 0, valueL = 0;
                do {
                  valueT += element.offsetTop  || 0;
                  valueL += element.offsetLeft || 0;
            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 nth has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                  nth: function(fragment, m) {
                    var mm, formula = m[6], predicate;
                    if (formula == 'even') formula = '2n+0';
                    if (formula == 'odd')  formula = '2n+1';
                    if (mm = formula.match(/^(\d+)$/)) // digit only
            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 readAttribute has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

              readAttribute: function(element, name) {
                element = $(element);
                if (Prototype.Browser.IE) {
                  var t = Element._attributeTranslations.read;
                  if (t.values[name]) return t.values[name](element, name);
            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 array_replace has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

              function array_replace( array &$array, array &$array1 )
              {
                $args  = func_get_args();
                $count = func_num_args();
            
            
            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 redirect_to has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

            function redirect_to($params)
            {
              # [NOTE]: (from php.net) HTTP/1.1 requires an absolute URI as argument to » Location:
              # including the scheme, hostname and absolute path, but some clients accept
              # relative URIs. You can usually use $_SERVER['HTTP_HOST'],
            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 toMap24 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Polyline.prototype.toMap24 = function() {
                var m24poly;
                var m24longs = "";
                var m24lats = "";
                for (var i=0, length = this.points.length; i<length; i++) {
            Severity: Minor
            Found in js/mapstraction.js - About 1 hr to fix

              Function ORIGshowAddress has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function ORIGshowAddress(address) {
                    var geocoder = null;
                    geocoder = new GClientGeocoder();
              
                    if (geocoder) {
              Severity: Minor
              Found in js/dojolist.js - About 1 hr to fix

                Function toMultiMap has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Marker.prototype.toMultiMap = function() {
                    //prepare our markeroptions
                    var mmmarkeropts = {};
                
                    if(this.iconUrl) {
                Severity: Minor
                Found in js/mapstraction.js - About 1 hr to fix

                  Method Delete_dojo has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Delete_dojo($Dojoname)
                  {
                      Backup_data();
                      $xml = Load_Xml_data();
                      $newxml = '<xml>
                  Severity: Minor
                  Found in lib/dojo.model.php - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language