Showing 759 of 1,838 total issues
Function _updateCountdown
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_updateCountdown: function (target, inst) {
var $target = $(target);
inst = inst || $target.data(this.propertyName);
if (!inst) {
return;
Function send
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function (_, completeCallback) {
var message = {
id: 'postmessage-transport-' + (counter += 1)
},
eventName = 'message.' + message.id;
Function success
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
success: function (data) {
var result;
if (embedProvider.yql.xpath && embedProvider.yql.xpath == '//meta|//title|//link') {
var meta = {};
Function val
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
val: function( value ) {
var hooks, ret, isFunction,
elem = this[0];
if ( !arguments.length ) {
Function destroy
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
destroy: function () {
var o = this.options;
this.abort();
Function _mouseDown
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDown: function (event) {
// don't let more than one widget handle mouseStart
// TODO: figure out why we have to use originalEvent
event.originalEvent = event.originalEvent || {};
if (event.originalEvent.mouseHandled) {
Function _setOption
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_setOption: function (key, value) {
var i,
valsLength = 0;
if ($.isArray(this.options.values)) {
Function smallworld_GetModuleOption
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
function smallworld_GetModuleOption($option = null, $repmodule = 'smallworld', $flushFirst = false)
{
static $modOptions = [];
if ($flushFirst) { // clears the 'cache', forces reload of configs
$modOptions = [];
- 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 resizeAndCrop
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
public function resizeAndCrop()
{
// check file extension
switch ($this->imageMimetype) {
case 'image/png':
- 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 _respectSize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_respectSize: function( data ) {
var o = this._vBoundaries,
a = this.axis,
ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width),
Function _optionDatepicker
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_optionDatepicker: function(target, name, value) {
var settings, date, minDate, maxDate,
inst = this._getInst(target);
if (arguments.length === 2 && typeof name === "string") {
Function slide
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, slide: function (type, next) {
var $active = this.$element.find('.item.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
Function intersect
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.ui.intersect = (function() {
function isOverAxis( x, reference, size ) {
return ( x >= reference ) && ( x < ( reference + size ) );
}
Function close
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
close: function( event ) {
var tooltip,
that = this,
target = $( event ? event.currentTarget : this.element ),
tooltipData = this._find( target );
Function addCombinator
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addCombinator( matcher, combinator, base ) {
var dir = combinator.dir,
checkNonElements = base && dir === "parentNode",
doneName = done++;
Function send
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function (data) {
if (data && !this.options.disabled) {
if (data.fileInput && !data.files) {
var that = this,
dfd = $.Deferred(),
Function offsetString
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var offsetString = function (offset) { // e.g. '+2d', '-4w', '+3h +30m'
offset = offset.toLowerCase();
var time = new Date();
var year = time.getFullYear();
var month = time.getMonth();
Function computeStyleTests
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function computeStyleTests() {
// Minified: var b,c,d,j
var div, body, container, contents;
body = document.getElementsByTagName( "body" )[ 0 ];
Function _on
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_on: function( suppressDisabledCheck, element, handlers ) {
var delegateElement,
instance = this;
// no suppressDisabledCheck flag, shuffle arguments
Function _createPlaceholder
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createPlaceholder: function(that) {
that = that || this;
var className,
o = that.options;