Showing 449 of 644 total issues
Function loop_controls
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public static function loop_controls( $config_id ) {
// Get an instance of the Generator class.
// This will make sure google fonts and backup fonts are loaded.
Generator::get_instance();
- 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 2
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"10":10,"2":2,"279":279,"280":280,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9}],2:[function(_dereq_,module,exports){
_dereq_(254);
_dereq_(190);
_dereq_(192);
_dereq_(191);
- Create a ticketCreate a ticket
Function exports
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (KEY, BYTES, wrapper, CLAMPED) {
CLAMPED = !!CLAMPED;
var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';
var GETTER = 'get' + KEY;
var SETTER = 'set' + KEY;
- Create a ticketCreate a ticket
Function fromOutput
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
fromOutput: function( output, value, controlType ) {
var styles = '',
mediaQuery = false,
processedValue;
- 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 convertColorForInput
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
const convertColorForInput = (value, pickerComponent, formComponent) => {
let rgba;
let hsv;
let hsva;
let convertedValue;
- 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 convertColorForInput
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
const convertColorForInput = (value, pickerComponent, formComponent) => {
let rgba;
let hsv;
let hsva;
let convertedValue;
- Create a ticketCreate a ticket
Function 223
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
},{"16":16,"40":40,"47":47,"57":57,"75":75,"77":77,"81":81,"92":92}],223:[function(_dereq_,module,exports){
var global = _dereq_(46);
var inheritIfRequired = _dereq_(51);
var dP = _dereq_(75).f;
var gOPN = _dereq_(79).f;
- 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 40
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
},{"80":80,"83":83,"84":84}],40:[function(_dereq_,module,exports){
var global = _dereq_(46);
var core = _dereq_(30);
var hide = _dereq_(48);
var redefine = _dereq_(94);
- 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 apply_pattern_replace
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
protected function apply_pattern_replace( $output, $value ) {
if ( isset( $output['pattern_replace'] ) && is_array( $output['pattern_replace'] ) ) {
$option_type = ( isset( $this->field['option_type'] ) ) ? $this->field['option_type'] : 'theme_mod';
$option_name = ( isset( $this->field['option_name'] ) ) ? $this->field['option_name'] : '';
$options = [];
- 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 27
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],27:[function(_dereq_,module,exports){
'use strict';
var dP = _dereq_(75).f;
var create = _dereq_(74);
var redefineAll = _dereq_(93);
- Create a ticketCreate a ticket
Method init
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init( $args = array() ) {
add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_action( 'customize_preview_init', array( $this, 'enqueue_customize_preview_scripts' ) );
add_filter( 'kirki_output_control_classnames', array( $this, 'output_control_classnames' ) );
- Create a ticketCreate a ticket
Function convertColorForCustomizer
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
const convertColorForCustomizer = (value, pickerComponent, formComponent) => {
let rgba;
let hsv;
let hsva;
let convertedValue;
- 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 evaluate
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
evaluate: function( value1, value2, operator, choice ) {
var found = false;
if ( choice && 'object' === typeof value2 ) {
value2 = value2[ choice ];
- 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 21
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
},{"117":117,"118":118,"23":23,"32":32,"53":53}],21:[function(_dereq_,module,exports){
var aFunction = _dereq_(11);
var toObject = _dereq_(118);
var IObject = _dereq_(53);
var toLength = _dereq_(117);
- 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 187
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"40":40,"89":89}],187:[function(_dereq_,module,exports){
'use strict';
var $export = _dereq_(40);
var toInteger = _dereq_(115);
var aNumberValue = _dereq_(12);
- Create a ticketCreate a ticket
Function 229
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"16":16,"43":43,"95":95,"97":97}],229:[function(_dereq_,module,exports){
'use strict';
var isRegExp = _dereq_(58);
var anObject = _dereq_(16);
- Create a ticketCreate a ticket
Function 19
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
},{"113":113,"117":117,"118":118}],19:[function(_dereq_,module,exports){
// false -> Array#indexOf
// true -> Array#includes
var toIObject = _dereq_(116);
var toLength = _dereq_(117);
- 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 70
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
},{}],70:[function(_dereq_,module,exports){
var META = _dereq_(123)('meta');
var isObject = _dereq_(57);
var has = _dereq_(47);
var setDesc = _dereq_(75).f;
- 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 field_add_control_args
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function field_add_control_args( $args ) {
if ( isset( $args['active_callback'] ) ) {
if ( is_array( $args['active_callback'] ) ) {
if ( ! is_callable( $args['active_callback'] ) ) {
- 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 styles_parse
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public static function styles_parse( $css = [] ) {
// Pass our styles from the kirki_styles_array filter.
$css = apply_filters( 'kirki_styles_array', $css );
- 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"