Showing 216 of 1,940 total issues
Function doFilter
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.doFilter = function(showCallback, hideCallback) {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.doFilter(showCallback, hideCallback);
Method url_for
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
Function visibleCenterAndZoom
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.visibleCenterAndZoom = function()
{
if(this.loaded[this.api] == false)
{
myself = this;
Function setRequestHeaders
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
setRequestHeaders: function() {
var headers = {
'X-Requested-With': 'XMLHttpRequest',
'X-Prototype-Version': Prototype.Version,
'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
- 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 getElementsByClassName
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
function iter(name) {
return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
}
- 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 setStyle
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
setStyle: function(element, styles) {
element = $(element);
var elementStyle = element.style, match;
if (Object.isString(styles)) {
element.style.cssText += ';' + styles;
- 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 select
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
select: function(element, value) {
if (Object.isUndefined(value))
return this[element.type == 'select-one' ?
'selectOne' : 'selectMany'](element);
else {
- 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 Validate_form
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function Validate_form($post = null)
{
// echo '<pre>';
// print_r($_POST);
// echo '</pre>';
- 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 getZoomLevelForBoundingBox
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.getZoomLevelForBoundingBox = function( bbox ) {
if(this.loaded[this.api] === false) {
var me = this;
return -1;
}
Method error_handler_dispatcher
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function error_handler_dispatcher($errno, $errstr, $errfile, $errline)
{
$back_trace = debug_backtrace();
while($trace = array_shift($back_trace))
{
Method Admin_Create_kml
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Admin_Create_kml()
{
$xml = Find_Dojo_all();
$newKML = '<?xml version="1.0" encoding="UTF-8"?>
Function openBubble
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Marker.prototype.openBubble = function() {
if(this.mapstraction.loaded[this.api] === false) {
var my_marker = this;
this.mapstraction.onload[this.api].push( function() {
my_marker.openBubble();
Method assert_header
has 36 lines of code (exceeds 25 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);
Function compileMatcher
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
compileMatcher: function() {
var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
c = Selector.criteria, le, p, m;
if (Selector._cache[e]) {
- 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 concat
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Array.prototype.concat = function() {
var array = [];
for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
for (var i = 0, length = arguments.length; i < length; i++) {
if (Object.isArray(arguments[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 stop_and_exit
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function stop_and_exit($exit = true)
{
call_if_exists('before_exit', $exit);
$headers = headers_list();
if(request_is_head())
- 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 getZoom
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.getZoom = function() {
if(this.loaded[this.api] === false) {
var me = this;
return -1;
}
Method ImportNewerFarDojo
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ImportNewerFarDojo($file)
{
$farxml = LoadFarXML($file);
$localxml = Load_Xml_data();
Function KMLparser
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function KMLparser(path,map){ //path: url to the kml file. map: div where the map is
var request = GXmlHttp.create();
request.open('GET', path, true);
request.onreadystatechange = function(){
if (request.readyState == 4){
Method Validate_field
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Validate_field($data, $type)
{
// This function checks fields and returns the number of errors found.
// Check if the parameters have been sent.
//if(!$data or !$type) { return 1;}