lancew/DojoList

View on GitHub

Showing 216 of 1,940 total issues

File mapstraction.js has 3944 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
   Copyright (c) 2006-8, Tom Carden, Steve Coast, Mikel Maron, Andrew Turner, Henri Bergius, Rob Moran
   All rights reserved.

   Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Severity: Major
Found in js/mapstraction.js - About 1 wk to fix

    File prototype-1.6.0.3.js has 3532 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*  Prototype JavaScript framework, version 1.6.0.3
     *  (c) 2005-2008 Sam Stephenson
     *
     *  Prototype is freely distributable under the terms of an MIT-style license.
     *  For details, see the Prototype web site: http://www.prototypejs.org/
    Severity: Major
    Found in js/prototype/prototype-1.6.0.3.js - About 1 wk to fix

      File limonade.php has 1635 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
                                                                        
      # ============================================================================ #
      
      /**
      Severity: Major
      Found in lib/limonade.php - About 4 days to fix

        Function addAPI has 332 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Mapstraction.prototype.addAPI = function(element,api) {
            this.loaded[api] = false;
            this.onload[api] = [];
            var me = this;
        
        Severity: Major
        Found in js/mapstraction.js - About 1 day to fix

          Function request_uri has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
          Open

          function request_uri($env = null)
          {
            static $uri = null;
            if(is_null($env))
            {
          Severity: Minor
          Found in lib/limonade.php - About 1 day 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

          Methods has 56 functions (exceeds 20 allowed). Consider refactoring.
          Open

          Element.Methods = {
            visible: function(element) {
              return $(element).style.display != 'none';
            },
          
          
          Severity: Major
          Found in js/prototype/prototype-1.6.0.3.js - About 1 day to fix

            Function route_build has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
            Open

            function route_build($method, $path_or_array, $callback, $options = array())
            {
              $method = strtoupper($method);
              if(!in_array($method, request_methods())) 
                trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
            Severity: Minor
            Found in lib/limonade.php - About 7 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 addControls has 167 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Function id has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
              Open

                  id: function(nodes, root, id, combinator) {
                    var targetNode = $(id), h = Selector.handlers;
                    if (!targetNode) return [];
                    if (!nodes && root == document) return [targetNode];
                    if (nodes) {
              Severity: Minor
              Found in js/prototype/prototype-1.6.0.3.js - About 6 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

              Method mime_type has 163 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function mime_type($ext = null)
              {
                $types = array(
                  'ai'      => 'application/postscript',
                  'aif'     => 'audio/x-aiff',
              Severity: Major
              Found in lib/limonade.php - About 6 hrs to fix

                Function addMarker has 132 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Mapstraction.prototype.addMarker = function(marker, old) {
                    var map = this.maps[this.api];
                    marker.mapstraction = this;
                    marker.api = this.api;
                    marker.location.api = this.api;
                Severity: Major
                Found in js/mapstraction.js - About 5 hrs to fix

                  Function addMethods has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Element.addMethods = function(methods) {
                    var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
                  
                    if (!methods) {
                      Object.extend(Form, Form.Methods);
                  Severity: Minor
                  Found in js/prototype/prototype-1.6.0.3.js - About 4 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 run has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function run($env = null)
                  {
                    if(is_null($env)) $env = env();
                     
                    # 0. Set default configuration
                  Severity: Minor
                  Found in lib/limonade.php - About 4 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 Dojo_Editform_end has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function Dojo_Editform_end() 
                  {
                      if (!Validate_form($_POST) ) {
                          $resp = recaptcha_check_answer(
                              option('recaptcha_private_key'),
                  Severity: Minor
                  Found in controllers/dojo.php - About 4 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 env has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function env($reset = null)
                  {
                    static $env = array();
                    if(func_num_args() > 0)
                    {
                  Severity: Minor
                  Found in lib/limonade.php - About 4 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 Create_dojo has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function Create_dojo($dojo, $file = null)
                  {
                      Backup_data();
                      
                      $xml = Load_Xml_data();
                  Severity: Minor
                  Found in lib/dojo.model.php - About 4 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 setMapType has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Function nth has a Cognitive Complexity of 28 (exceeds 5 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 4 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

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

                    <!-- The following Javascript enables jQuery validation -->
                    <script>
                      $(document).ready(function(){
                        $("#dojoform").validate();
                      });
                    Severity: Minor
                    Found in views/dojo/edit_form.html.php - About 4 hrs to fix

                      Method run has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function run($env = null)
                      {
                        if(is_null($env)) $env = env();
                         
                        # 0. Set default configuration
                      Severity: Major
                      Found in lib/limonade.php - About 3 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language