Showing 216 of 1,940 total issues
Function getCenter
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.getCenter = function() {
if(this.loaded[this.api] === false) {
return null;
}
Function removePolyline
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.removePolyline = function(polyline) {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.removePolyline(polyline);
Function removeMarker
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.removeMarker = function(marker) {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.removeMarker(marker);
Function addOverlay
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.addOverlay = function(url, autoCenterAndZoom) {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.addOverlay(georssURL);
Function toYahoo
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Marker.prototype.toYahoo = function() {
var ymarker;
var size;
if(this.iconSize) {
size = new YSize(this.iconSize[0], this.iconSize[1]);
Method env
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
Function setOpacity
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Element.Methods.setOpacity = function(element, value) {
element = $(element);
element.style.opacity = (value == 1 || value === '') ? '' :
(value < 0.00001) ? 0 : 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 match
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
match: function(element) {
this.tokens = [];
var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
var le, p, m;
- 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 Methods
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Event.Methods = (function() {
var isButton;
if (Prototype.Browser.IE) {
var buttonMap = { 0: 1, 1: 4, 2: 2 };
- 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 getStyle
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function(proceed, element, style) {
switch (style) {
case 'left': case 'top': case 'right': case 'bottom':
if (proceed(element, 'position') === 'static') return null;
case 'height': case 'width':
- 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 addData
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Marker.prototype.addData = function(options){
for(var sOptKey in options) {
switch(sOptKey) {
case 'label':
this.setLabel(options.label);
Function addSmallControls
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.addSmallControls = function() {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.addSmallControls();
Function resizeTo
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.resizeTo = function(width,height){
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.resizeTo(width,height);
Function autoCenterAndZoom
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.autoCenterAndZoom = function() {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.autoCenterAndZoom();
Function removeAllMarkers
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.removeAllMarkers = function() {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.removeAllMarkers();
Function addTileLayer
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Mapstraction.prototype.addTileLayer = function(tile_url, opacity, copyright_text, min_zoom, max_zoom) {
if(!tile_url) {
return;
}
if(!this.tileLayers) {
Method render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
Method Admin_importjwm
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Admin_importjwm()
{
set_time_limit();
$ch = curl_init("http://judoworldmap.com/");
Function request
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
request: function(url) {
this.url = url;
this.method = this.options.method;
var params = Object.clone(this.options.parameters);
- 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 extend
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Element.extend = (function() {
if (Prototype.BrowserFeatures.SpecificElementExtensions)
return Prototype.K;
var Methods = { }, ByTag = Element.Methods.ByTag;
- 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"