Showing 3,976 of 3,976 total issues
Function transfer
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var effectTransfer = $.effects.effect.transfer = function( o, done ) {
var elem = $( this ),
target = $( o.to ),
targetFixed = target.css( "position" ) === "fixed",
body = $("body"),
Function _createOverlay
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createOverlay: function() {
if ( !this.options.modal ) {
return;
}
Function values
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
values: function( index, newValue ) {
var vals,
newValues,
i;
Function _mouseDrag
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
var data, props,
smp = this.originalMousePosition,
a = this.axis,
Function puff
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var effectPuff = $.effects.effect.puff = function( o, done ) {
var elem = $( this ),
mode = $.effects.setMode( elem, o.mode || "hide" ),
hide = mode === "hide",
percent = parseInt( o.percent, 10 ) || 150,
Function _create
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var selectees,
that = this;
this.element.addClass("ui-selectable");
Function _initSource
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_initSource: function() {
var array, url,
that = this;
if ( $.isArray( this.options.source ) ) {
array = this.options.source;
Function _destroy
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_destroy: function() {
// Destroy (sub)menus
this.element
.removeAttr( "aria-activedescendant" )
.find( ".ui-menu" ).addBack()
Function toHaveBeenCalledWith
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
getJasmineRequireObj().toHaveBeenCalledWith = function(j$) {
var getErrorMsg = j$.formatErrorMsg('<toHaveBeenCalledWith>', 'expect(<spyObj>).toHaveBeenCalledWith(...arguments)');
function toHaveBeenCalledWith(util, customEqualityTesters) {
- 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 getJasmineRequireObj
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
var getJasmineRequireObj = (function (jasmineGlobal) {
var jasmineRequire;
if (typeof module !== 'undefined' && module.exports && typeof exports !== 'undefined') {
if (typeof global !== 'undefined') {
- 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
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stop: function(shouldRevert, callback) {
var _this = this;
var revertDuration = this.options.revertDuration;
function complete() { // might be called by .animate(), which might change `this` context
Function propFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
Function handleInteractionStart
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleInteractionStart: function(ev) {
var subjectEl = this.subjectEl;
var subjectRect;
var origPoint;
var point;
Function clone
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var i, l, srcElements, destElements,
clone = elem.cloneNode( true ),
inPage = jQuery.contains( elem.ownerDocument, elem );
Function fix
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fix: function( event ) {
if ( event[ jQuery.expando ] ) {
return event;
}
Function computeRange
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
computeRange: function(date) {
var intervalUnit = computeIntervalUnit(this.intervalDuration);
var intervalStart = date.clone().startOf(intervalUnit);
var intervalEnd = intervalStart.clone().add(this.intervalDuration);
var start, end;
Function animate
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
animate: function(overrideSettings) {
settings = overrideSettings || settings;
if(!module.is.supported()) {
module.error(error.support);
return false;
Function integer
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
integer: function(value, range) {
var
intRegExp = /^\-?\d+$/,
min,
max,
Function propFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
Function clone
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var i, l, srcElements, destElements,
clone = elem.cloneNode( true ),
inPage = jQuery.contains( elem.ownerDocument, elem );