Showing 449 of 644 total issues
Function load
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Typekit.prototype.load = function(onReady) {
var kitId = this.configuration_['id'];
var configuration = this.configuration_;
var loadWindow = this.domHelper_.getLoadWindow();
var that = this;
- Create a ticketCreate a ticket
Method __construct
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct( $config_id = 'global', $args = [] ) {
// In case the user only provides 1 argument,
// assume that the provided argument is $args and set $config_id = 'global'.
if ( is_array( $config_id ) && empty( $args ) ) {
- Create a ticketCreate a ticket
Method rgb_to_hsv
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function rgb_to_hsv( $color = array() ) {
$var_r = ( $color[0] / 255 );
$var_g = ( $color[1] / 255 );
$var_b = ( $color[2] / 255 );
$var_min = min( $var_r, $var_g, $var_b );
- Create a ticketCreate a ticket
Method get_value
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function get_value( $config_id = '', $field_id = '' ) {
// Make sure value is defined.
$value = '';
- Create a ticketCreate a ticket
Function checkCondition
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
checkCondition: function( requirement, control, isOption, relation ) {
var self = this,
childRelation = ( 'AND' === relation ) ? 'OR' : 'AND',
nestedItems,
value,
- Create a ticketCreate a ticket
Function 226
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"36":36,"44":44,"75":75}],226:[function(_dereq_,module,exports){
'use strict';
var anObject = _dereq_(16);
var toLength = _dereq_(117);
- Create a ticketCreate a ticket
Function 137
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"104":104,"20":20,"40":40}],137:[function(_dereq_,module,exports){
'use strict';
var ctx = _dereq_(32);
var $export = _dereq_(40);
var toObject = _dereq_(118);
- Create a ticketCreate a ticket
Function 74
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"118":118,"42":42,"53":53,"80":80,"83":83,"84":84}],74:[function(_dereq_,module,exports){
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = _dereq_(16);
var dPs = _dereq_(76);
var enumBugKeys = _dereq_(38);
- Create a ticketCreate a ticket
Method render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function render() {
$id = 'customize-control-' . str_replace( [ '[', ']' ], [ '-', '' ], $this->id );
$class = 'customize-control customize-control-kirki customize-control-' . $this->type;
$gap = isset( $this->wrapper_opts['gap'] ) ? $this->wrapper_opts['gap'] : 'default';
- Create a ticketCreate a ticket
Function 82
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
},{"101":101,"118":118,"47":47}],82:[function(_dereq_,module,exports){
var has = _dereq_(47);
var toIObject = _dereq_(116);
var arrayIndexOf = _dereq_(19)(false);
var IE_PROTO = _dereq_(101)('IE_PROTO');
- 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 98
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
},{}],98:[function(_dereq_,module,exports){
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var isObject = _dereq_(57);
var anObject = _dereq_(16);
- 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 77
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
},{"16":16,"36":36,"75":75,"83":83}],77:[function(_dereq_,module,exports){
var pIE = _dereq_(84);
var createDesc = _dereq_(92);
var toIObject = _dereq_(116);
var toPrimitive = _dereq_(119);
- 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 row_label
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function row_label( $args ) {
// Validating args for row labels.
if ( isset( $args['row_label'] ) && is_array( $args['row_label'] ) && ! empty( $args['row_label'] ) ) {
- 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 getLoader
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
- 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 css_dimension
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function css_dimension( $value ) {
// Trim it.
$value = trim( $value );
- 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 filter_setting_args
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function filter_setting_args( $args, $wp_customize ) {
if ( $args['settings'] === $this->args['settings'] ) {
$args = parent::filter_setting_args( $args, $wp_customize );
// Set the sanitize-callback if none is defined.
- 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_output
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function process_output( $output, $value ) {
foreach ( $value as $key => $sub_value ) {
// If "element" is not defined, there's no reason to continue.
if ( ! isset( $output['element'] ) ) {
- 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 render
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function render() {
$id = 'customize-control-' . str_replace( [ '[', ']' ], [ '-', '' ], $this->id );
$class = 'customize-control customize-control-kirki customize-control-' . $this->type;
$gap = isset( $this->wrapper_opts['gap'] ) ? $this->wrapper_opts['gap'] : 'default';
- 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 add_sub_fields
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function add_sub_fields( $args ) {
$args['kirki_config'] = isset( $args['kirki_config'] ) ? $args['kirki_config'] : 'global';
$defaults = isset( $args['default'] ) ? $args['default'] : [];
- 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 add_settings
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
final function add_settings( $args = [] ) {
// Get the classname we'll be using to create our setting(s).
$classname = false;
if ( isset( $args['option_type'] ) && array_key_exists( $args['option_type'], $this->setting_types ) ) {
- 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"