lancew/DojoList

View on GitHub

Showing 216 of 1,940 total issues

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

    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 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 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 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

      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 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

          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

            Function extend has 26 lines of code (exceeds 25 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

              Function toOpenSpace has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Polyline.prototype.toOpenSpace = function() {
                  var ospolyline;
                  var ospoints = [];
                  for (var i = 0, length = this.points.length ; i< length; i++){
                      // convert each point to OpenSpace.MapPoint
              Severity: Minor
              Found in js/mapstraction.js - About 1 hr to fix

                Function clonePosition has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  clonePosition: function(element, source) {
                    var options = Object.extend({
                      setLeft:    true,
                      setTop:     true,
                      setWidth:   true,
                Severity: Minor
                Found in js/prototype/prototype-1.6.0.3.js - About 1 hr to fix

                  Function getElementsByClassName has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
                    function iter(name) {
                      return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
                    }
                  
                  
                  Severity: Minor
                  Found in js/prototype/prototype-1.6.0.3.js - About 1 hr to fix

                    Function setImagePosition has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      Method Add_Rss_item has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function Add_Rss_item($item_array = null)
                      {
                          $new_rss = RSS_header();
                          $item_count = 0;
                          $rss = Load_RSS_data();
                      Severity: Minor
                      Found in lib/rss.php - About 1 hr to fix

                        Method geoAddress has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function geoAddress($address = null)
                        {
                            //Three parts to the querystring: q is address, output is the format (
                            $lat = null;
                            $lng = null;
                        Severity: Minor
                        Found in lib/dojo.model.php - About 1 hr to fix

                          Function writeAttribute has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                            writeAttribute: function(element, name, value) {
                              element = $(element);
                              var attributes = { }, t = Element._attributeTranslations.write;
                          
                              if (typeof name == 'object') attributes = name;
                          Severity: Minor
                          Found in js/prototype/prototype-1.6.0.3.js - About 55 mins 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 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                            getStyle: function(element, style) {
                              element = $(element);
                              style = style == 'float' ? 'cssFloat' : style.camelize();
                              var value = element.style[style];
                              if (!value || value == 'auto') {
                          Severity: Minor
                          Found in js/prototype/prototype-1.6.0.3.js - About 55 mins 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 replace has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                            Element.Methods.replace = function(element, content) {
                              element = $(element);
                          
                              if (content && content.toElement) content = content.toElement();
                              if (Object.isElement(content)) {
                          Severity: Minor
                          Found in js/prototype/prototype-1.6.0.3.js - About 55 mins 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