Showing 449 of 644 total issues
Function maybe_change_settings
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function maybe_change_settings( $args ) {
// Check if we have an option-name defined.
if ( isset( $args['option_name'] ) ) {
if ( isset( $args['settings'] ) && $args['settings'] && false !== strpos( $args['settings'], $args['option_name'] . '[' ) ) {
return $args;
- Read upRead up
- Create a ticketCreate a ticket
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 process_value
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function process_value() {
if ( is_array( $this->value ) && isset( $this->value['url'] ) ) {
$this->value = $this->value['url'];
}
if ( false === strpos( $this->value, 'gradient' ) && false === strpos( $this->value, 'url(' ) ) {
- Read upRead up
- Create a ticketCreate a ticket
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 exports
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
- Create a ticketCreate a ticket
Function FontWatchRunner
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
webfont.FontWatchRunner = function(activeCallback, inactiveCallback, domHelper,
font, opt_timeout, opt_metricCompatibleFonts, opt_fontTestString) {
- Create a ticketCreate a ticket
Method add_setting
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
final function add_setting( $classname, $setting, $default, $type, $capability, $transport, $sanitize_callback ) {
- Create a ticketCreate a ticket
Function exports
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
- Create a ticketCreate a ticket
Function set
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function set(view, bytes, index, conversion, value, isLittleEndian) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if ( 'background-color' === output.property ) {
processedValue = 'unset';
} else if ( 'background-image' === output.property ) {
processedValue = 'none';
}
- Create a ticketCreate a ticket
Function 241
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
},{"107":107}],241:[function(_dereq_,module,exports){
var $export = _dereq_(40);
var toAbsoluteIndex = _dereq_(113);
var fromCharCode = String.fromCharCode;
var $fromCodePoint = String.fromCodePoint;
- Read upRead up
- Create a ticketCreate a ticket
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 mustBeCropped
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
mustBeCropped: function( flexW, flexH, dstW, dstH, imgW, imgH ) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if ( ! _.isUndefined( control.params.fields[ this.label.field ].type ) ) {
if ( 'select' === control.params.fields[ this.label.field ].type ) {
if ( ! _.isUndefined( control.params.fields[ this.label.field ].choices ) && ! _.isUndefined( control.params.fields[ this.label.field ].choices[ rowLabelField.val() ] ) ) {
rowLabel = control.params.fields[ this.label.field ].choices[ rowLabelField.val() ];
}
- Create a ticketCreate a ticket
Function 119
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
},{"35":35}],119:[function(_dereq_,module,exports){
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = _dereq_(57);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
- Read upRead up
- Create a ticketCreate a ticket
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 18
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
},{"113":113,"117":117,"118":118}],18:[function(_dereq_,module,exports){
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
'use strict';
var toObject = _dereq_(118);
var toAbsoluteIndex = _dereq_(113);
- Read upRead up
- Create a ticketCreate a ticket
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 168
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
},{"40":40,"67":67}],168:[function(_dereq_,module,exports){
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
var $export = _dereq_(40);
var abs = Math.abs;
- Read upRead up
- Create a ticketCreate a ticket
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
Avoid deeply nested control flow statements. Open
if ( 'background-color' === property ) {
processedValue = 'unset';
} else if ( 'background-image' === property ) {
processedValue = 'none';
}
- Create a ticketCreate a ticket
Function 108
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
},{"35":35,"40":40,"42":42}],108:[function(_dereq_,module,exports){
// https://github.com/tc39/proposal-string-pad-start-end
var toLength = _dereq_(117);
var repeat = _dereq_(109);
var defined = _dereq_(35);
- Read upRead up
- Create a ticketCreate a ticket
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 109
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
},{"109":109,"117":117,"35":35}],109:[function(_dereq_,module,exports){
'use strict';
var toInteger = _dereq_(115);
var defined = _dereq_(35);
- Read upRead up
- Create a ticketCreate a ticket
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 showKirkiControl
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
showKirkiControl: function( control ) {
var self = this,
show = true,
isOption = (
control.params && // Check if control.params exists.
- Read upRead up
- Create a ticketCreate a ticket
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 getSubstitution
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (byteLength < 0) throw RangeError(WRONG_LENGTH);
- Create a ticketCreate a ticket