Showing 388 of 1,940 total issues
Function closeBubble
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Marker.prototype.closeBubble = function() {
if(this.mapstraction.loaded[this.api] === false) {
var my_marker = this;
this.mapstraction.onload[this.api].push( function() {
my_marker.closeBubble();
Method recaptcha_check_answer
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
{
if ($privkey == null || $privkey == '') {
die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
}
Method route_find
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
Function getPixelRatio
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.getPixelRatio = function()
{
if(this.loaded[this.api] == false)
{
myself = this;
Function show
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Marker.prototype.show = function() {
if (this.api) {
switch (this.api) {
case 'google':
case 'openstreetmap':
Function hide
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Marker.prototype.hide = function() {
if (this.api) {
switch (this.api) {
case 'google':
case 'openstreetmap':
Function onreadystatechange
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
request.onreadystatechange = function(){
if (request.readyState == 4){
var data = request.responseXML;
placemarks = data.documentElement.getElementsByTagName("Placemark");
for(var i=0; i<placemarks.length; i++){
Method ListNewerFarDojo
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ListNewerFarDojo($file)
{
$farxml = LoadFarXML($file);
$localxml = Load_Xml_data();
Function addPolygon
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.addPolygon = function(polygon) {
if(this.loaded[this.api] == false)
{
myself = this;
this.onload[this.api].push(function()
Function nth
has 28 lines of code (exceeds 25 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;
Function extend
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Event.extend = (function() {
var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
m[name] = Event.Methods[name].methodize();
return m;
});
Method NewerFarDojo
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function NewerFarDojo($file)
{
$farxml = LoadFarXML($file);
$localxml = Load_Xml_data();
Function cumulativeOffset
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Element.Methods.cumulativeOffset = function(element) {
var valueT = 0, valueL = 0;
do {
valueT += element.offsetTop || 0;
valueL += element.offsetLeft || 0;
- 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 readAttribute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
readAttribute: function(element, name) {
element = $(element);
if (Prototype.Browser.IE) {
var t = Element._attributeTranslations.read;
if (t.values[name]) return t.values[name](element, 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 nth
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
nth: function(fragment, m) {
var mm, formula = m[6], predicate;
if (formula == 'even') formula = '2n+0';
if (formula == 'odd') formula = '2n+1';
if (mm = formula.match(/^(\d+)$/)) // digit only
- 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 redirect_to
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function redirect_to($params)
{
# [NOTE]: (from php.net) HTTP/1.1 requires an absolute URI as argument to » Location:
# including the scheme, hostname and absolute path, but some clients accept
# relative URIs. You can usually use $_SERVER['HTTP_HOST'],
- 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 array_replace
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function array_replace( array &$array, array &$array1 )
{
$args = func_get_args();
$count = func_num_args();
- 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 ORIGshowAddress
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ORIGshowAddress(address) {
var geocoder = null;
geocoder = new GClientGeocoder();
if (geocoder) {
Function toMultiMap
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Marker.prototype.toMultiMap = function() {
//prepare our markeroptions
var mmmarkeropts = {};
if(this.iconUrl) {
Function toMap24
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Polyline.prototype.toMap24 = function() {
var m24poly;
var m24longs = "";
var m24lats = "";
for (var i=0, length = this.points.length; i<length; i++) {