Showing 288 of 320 total issues
Function load
has 32 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 __construct
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false)
{
$cfgValue = ini_get($cfgName);
if (is_callable($evaluation)) {
- 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 show
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Collapse.prototype.show = function () {
if (this.transitioning || this.$element.hasClass('in')) return
var startEvent = $.Event('show.bs.collapse')
this.$element.trigger(startEvent)
Function show
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Collapse.prototype.show = function () {
if (this.transitioning || this.$element.hasClass('in')) return
var startEvent = $.Event('show.bs.collapse')
this.$element.trigger(startEvent)
Function promise
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.ready.promise = function( obj ) {
if ( !readyList ) {
readyList = jQuery.Deferred();
Function backdrop
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
Function attr
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
attr: function( elem, name, value ) {
var hooks, ret,
nType = elem.nodeType;
// don't get/set attributes on text, comment and attribute nodes
Function handlers
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handlers: function( event, handlers ) {
var sel, handleObj, matches, i,
handlerQueue = [],
delegateCount = handlers.delegateCount,
cur = event.target;
Function backdrop
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
Function attr
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
attr: function( elem, name, value ) {
var hooks, ret,
nType = elem.nodeType;
// don't get/set attributes on text, comment and attribute nodes
Function promise
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.ready.promise = function( obj ) {
if ( !readyList ) {
readyList = jQuery.Deferred();
Function handlers
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handlers: function( event, handlers ) {
var sel, handleObj, matches, i,
handlerQueue = [],
delegateCount = handlers.delegateCount,
cur = event.target;
Function show
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
Function toggleClass
has 29 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 html
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
html: function( value ) {
return access( this, function( value ) {
var elem = this[ 0 ] || {},
i = 0,
l = this.length;
Function show
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
Function toggleClass
has 29 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 html
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
html: function( value ) {
return access( this, function( value ) {
var elem = this[ 0 ] || {},
i = 0,
l = this.length;
Function fix
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fix: function( event ) {
if ( event[ jQuery.expando ] ) {
return event;
}
Function finish
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
finish: function( type ) {
if ( type !== false ) {
type = type || "fx";
}
return this.each(function() {