lancew/DojoList

View on GitHub

Showing 230 of 2,219 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 1461 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
                                                                        
      // ============================================================================ #
      
      /**
      Severity: Major
      Found in lib/limonade.php - About 3 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 Autocompleter has 273 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          $.Autocompleter = function(input, options) {
          
              var KEY = {
                  UP: 38,
                  DOWN: 40,
          Severity: Major
          Found in bugs/static/prophet/jquery/js/jquery-autocomplete.js - About 1 day to fix

            File jquery-autocomplete.js has 618 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             * Autocomplete - jQuery plugin 1.0.2
             *
             * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer
             *
            Severity: Major
            Found in bugs/static/prophet/jquery/js/jquery-autocomplete.js - About 1 day to fix

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

                function request_uri($env = null)
                {
                    static $uri = null;
                    if(is_null($env)) {
                        if(!is_null($uri)) { return $uri;
                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 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 Select has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                $.Autocompleter.Select = function (options, input, select, config) {
                    var CLASSES = {
                        ACTIVE: "ac_over"
                    };
                    
                Severity: Major
                Found in bugs/static/prophet/jquery/js/jquery-autocomplete.js - About 6 hrs to fix

                  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 161 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();
                            }
                           
                        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 29 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function env($reset = null)
                        {
                            static $env = array();
                            if(func_num_args() > 0) {
                                $args = func_get_args();
                        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
                          Severity
                          Category
                          Status
                          Source
                          Language