Showing 216 of 1,940 total issues
Function Methods
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Event.Methods = (function() {
var isButton;
if (Prototype.Browser.IE) {
var buttonMap = { 0: 1, 1: 4, 2: 2 };
Function setCenter
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.setCenter = function(point, options) {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.setCenter(point, options);
Function removeAllPolylines
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.removeAllPolylines = function() {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.removeAllPolylines();
Function tagName
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
tagName: function(nodes, root, tagName, combinator) {
var uTagName = tagName.toUpperCase();
var results = [], h = Selector.handlers;
if (nodes) {
if (combinator) {
- Read upRead up
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 url_for
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
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
Enumerable
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
var Enumerable = {
each: function(iterator, context) {
var index = 0;
try {
this._each(function(value) {
Function toOpenLayers
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Marker.prototype.toOpenLayers = function() {
var size, anchor, icon;
if(this.iconSize) {
size = new OpenLayers.Size(this.iconSize[0], this.iconSize[1]);
}
Function setZoom
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.setZoom = function(zoom) {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.setZoom(zoom);
Function route_find
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
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 addJSON
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.addJSON = function(json) {
var features;
if (typeof(json) == "string") {
features = eval('(' + json + ')');
} else {
Method http_response_status
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function http_response_status($num = null)
{
$status = array(
100 => 'Continue',
101 => 'Switching Protocols',
File create.html.php
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
<script>
$(document).ready(function(){
$("#dojoform").validate();
});
</script>
Function getBounds
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.getBounds = function () {
if(this.loaded[this.api] === false) {
return null;
}
Function dragging
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.dragging = function(on) {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.dragging(on);
Function addImageOverlay
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.addImageOverlay = function(id, src, opacity, west, south, east, north) {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.addImageOverlay(id, src, opacity, west, south, east, north);
Function addLargeControls
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.addLargeControls = function() {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.addLargeControls();
Function Hash
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
var Hash = Class.create(Enumerable, (function() {
function toQueryPair(key, value) {
if (Object.isUndefined(value)) return key;
return key + '=' + encodeURIComponent(String.interpret(value));
- Read upRead up
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 insert
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
insert: function(element, insertions) {
element = $(element);
if (Object.isString(insertions) || Object.isNumber(insertions) ||
Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
- Read upRead up
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 index
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
index: function(parentNode, reverse, ofType) {
parentNode._countedByPrototype = Prototype.emptyFunction;
if (reverse) {
for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
var node = nodes[i];
- Read upRead up
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 mousePosition
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.mousePosition = function(element) {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.mousePosition(element);