Showing 644 of 644 total issues
Avoid deeply nested control flow statements. Open
if (code < 48 || code > maxCode) return NaN;
- Create a ticketCreate a ticket
Function NativeFontWatchRunner
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
webfont.NativeFontWatchRunner = function(activeCallback, inactiveCallback, domHelper, font, opt_timeout, opt_fontTestString) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if ( $url ) {
// 'id' is needed for form hidden value, URL is needed to display the image.
$value = [
'id' => $attachment_id,
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if ($len % BYTES) throw RangeError(WRONG_LENGTH);
- Create a ticketCreate a ticket
Function 7
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; });
/* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
- 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
for (var j = 0; j < variations.length; j++) {
fonts.push(new Font(font, variations[j]));
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
if ((field_match = re.key_access.exec(replacement_field)) !== null) {
field_list.push(field_match[1])
}
else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
} else if (IS_EVERY) return false; // every
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (byteLength < 0) throw RangeError(WRONG_LENGTH);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (fontTestString) {
this.fontTestStrings_[fontFamily] = fontTestString;
}
- Create a ticketCreate a ticket
Function filter_control_args
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function filter_control_args( $args, $wp_customize ) {
if ( $args['settings'] === $this->args['settings'] ) {
$args = parent::filter_control_args( $args, $wp_customize );
ob_start();
- 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 register_control_types
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function register_control_types() {
global $wp_customize;
$this->control_types = $this->default_control_types();
if ( ! class_exists( 'WP_Customize_Code_Editor_Control' ) ) {
- 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 8 (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 );
- 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_setting_args
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function field_add_setting_args( $args ) {
if ( ! isset( $args['transport'] ) ) {
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 output_item_args
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function output_item_args( $output, $value, $all_outputs, $field ) {
if ( $field['settings'] === $this->args['settings'] ) {
if ( isset( $output['property'] ) && in_array( [ 'background', 'background-image' ], $output['property'], true ) ) {
if ( ! isset( $output['value_pattern'] ) || empty( $output['value_pattern'] ) || '$' === $output['value_pattern'] ) {
$output['value_pattern'] = '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 process_output
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function process_output( $output, $value ) {
$output = wp_parse_args(
$output,
[
'media_query' => 'global',
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
protected function process_output( $output, $value ) {
if ( ! isset( $output['element'] ) || ! isset( $output['property'] ) ) {
return;
}
$output = wp_parse_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_output
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function process_output( $output, $value ) {
$output = apply_filters( 'kirki_output_item_args', $output, $value, $this->output, $this->field );
if ( ! isset( $output['element'] ) || ! isset( $output['property'] ) ) {
return;
- 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"