lancew/DojoList

View on GitHub

Showing 388 of 1,940 total issues

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

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

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

                    positionedOffset: 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 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 setOpacity has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                    Element.Methods.setOpacity = function(element, value) {
                      element = $(element);
                      element.style.opacity = (value == 1) ? 0.999999 :
                        (value === '') ? '' : (value < 0.00001) ? 0 : value;
                      return element;
                  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 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 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

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

                  function Admin_importjwm() 
                  {
                  
                      set_time_limit();
                      $ch = curl_init("http://judoworldmap.com/");
                  Severity: Minor
                  Found in controllers/admin.php - 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 assert_header has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
                  {
                    test_run_assertion();
                    # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
                    $headers = preg_split("/^\s*$/ms", $response);
                  Severity: Minor
                  Found in lib/limonade/assertions.php - 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 route has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function route()
                  {
                    static $routes = array();
                    $nargs = func_num_args();
                    if( $nargs > 0)
                  Severity: Minor
                  Found in lib/limonade.php - 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 flash_now has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function flash_now($name = null, $value = null)
                  {
                    static $messages = null;
                    if(is_null($messages))
                    {
                  Severity: Minor
                  Found in lib/limonade.php - 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 addImageOverlay has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  Mapstraction.prototype.addImageOverlay = function(id, src, opacity, west, south, east, north) {
                  Severity: Major
                  Found in js/mapstraction.js - About 50 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                          if (element.offsetParent == document.body)
                            if (Element.getStyle(element, 'position') == 'absolute') break;
                    Severity: Major
                    Found in js/prototype/prototype-1.6.0.3.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                              if (value[1]) return parseFloat(value[1]) / 100;
                      Severity: Major
                      Found in js/prototype/prototype-1.6.0.3.js - About 45 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language