Showing 321 of 611 total issues
Function showHide
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function showHide( elements, show ) {
var display, elem, hidden,
values = [],
index = 0,
length = elements.length;
Function on
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function on( elem, types, selector, data, fn, one ) {
var origFn, type;
// Types can be a map of types/handlers
if ( typeof types === "object" ) {
Function addCombinator
has 40 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 handleKey
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
handleKey:function handleKey(t,i,n){var s,a,o,l=r[i],c=this.parseKey(t);if(!l)return console.warn("Component not defined!");if(true!==t.zfIsKeyHandled){s="undefined"===typeof l.ltr?l:rtl()?e.extend({},l.ltr,l.rtl):e.extend({},l.rtl,l.ltr);a=s[c];o=n[a];if(o&&"function"===typeof o){var h=o.apply();t.zfIsKeyHandled=true;(n.handled||"function"===typeof n.handled)&&n.handled(h)}else(n.unhandled||"function"===typeof n.unhandled)&&n.unhandled()}},
- 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 access
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
var i = 0,
length = elems.length,
bulk = key == null;
Function AttachmentView
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
i = e.makeElement, t2 = e.config.css, e.AttachmentView = function(r2) {
function s() {
s.__super__.constructor.apply(this, arguments), this.attachment = this.object, this.attachment.uploadProgressDelegate = this, this.attachmentPiece = this.options.piece;
}
var a;
Function when
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
when: function( subordinate /* , ..., subordinateN */ ) {
var i = 0,
resolveValues = slice.call( arguments ),
length = resolveValues.length,
Function toggleClass
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggleClass: function( value, stateVal ) {
var type = typeof value;
if ( typeof stateVal === "boolean" && type === "string" ) {
return stateVal ? this.addClass( value ) : this.removeClass( value );
Function ajaxHandleResponses
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ajaxHandleResponses( s, jqXHR, responses ) {
var firstDataType, ct, finalDataType, type,
contents = s.contents,
dataTypes = s.dataTypes;
Function style
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
style: function( elem, name, value, extra ) {
// Don't set styles on text and comment nodes
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
return;
Function computeStyles
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function computeStyles(_ref5) {
var state = _ref5.state, options = _ref5.options;
var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
if (true) {
var transitionProperty = getComputedStyle2(state.elements.popper).transitionProperty || "";
Function show
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show() {
if (this._element.style.display === "none") {
throw new Error("Please use show on visible elements");
}
if (!(this._isWithContent() && this._isEnabled)) {
Function clone
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var destElements, node, clone, i, srcElements,
inPage = jQuery.contains( elem.ownerDocument, elem );
if ( support.html5Clone || jQuery.isXMLDoc( elem ) ||
Function dispatch
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
dispatch: function( event ) {
// Make a writable jQuery.Event from the native event object
event = jQuery.event.fix( event );
Function show
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show() {
if (this._isTransitioning || this._isShown()) {
return;
}
let activeChildren = [];
Function effect
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function effect(_ref2) {
var state = _ref2.state;
var initialStyles = {
popper: {
position: state.options.strategy,
Function setOptions
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setOptions: function setOptions(setOptionsAction) {
var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
cleanupModifierEffects();
state.options = Object.assign({}, defaultOptions, state.options, options2);
state.scrollParents = {
Function _getPopperConfig
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_getPopperConfig(attachment) {
const defaultBsPopperConfig = {
placement: attachment,
modifiers: [{
name: "flip",
Function load
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.fn.load = function( url, params, callback ) {
if ( typeof url !== "string" && _load ) {
return _load.apply( this, arguments );
}
Function adjustCSS
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function adjustCSS( elem, prop, valueParts, tween ) {
var adjusted,
scale = 1,
maxIterations = 20,
currentValue = tween ?