Showing 449 of 644 total issues
Function set_output
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function set_output() {
if ( empty( $this->output ) ) {
return;
}
if ( ! is_array( $this->output ) ) {
- 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 set_active_callback
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function set_active_callback() {
if ( is_array( $this->active_callback ) ) {
if ( ! is_callable( $this->active_callback ) ) {
// Bugfix for https://github.com/aristath/kirki/issues/1961.
- 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 getConstructor
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
var C = wrapper(function (that, iterable) {
anInstance(that, C, NAME, '_i');
that._t = NAME; // collection type
that._i = create(null); // index
- Create a ticketCreate a ticket
Function memoized
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function memoized( /* ...args */ ) {
var node = head,
len = arguments.length,
args, i;
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (isTAIndex(target, key = toPrimitive(key, true))
&& isObject(desc)
&& has(desc, 'value')
&& !has(desc, 'get')
&& !has(desc, 'set')
- Create a ticketCreate a ticket
Function invoke
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
- Create a ticketCreate a ticket
Method init
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init( $args ) {
add_filter( 'kirki_output_control_classnames', [ $this, 'output_control_classnames' ] );
/**
- Create a ticketCreate a ticket
Function createAddHook
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createAddHook(hooks) {
/**
* Adds the hook to the appropriate hooks container.
*
* @param {string} hookName Name of hook to add
- Create a ticketCreate a ticket
Method apply_pattern_replace
has 49 lines of code (exceeds 25 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 = [];
- Create a ticketCreate a ticket
Method content_template
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function content_template() {
?>
<# if ( data.label ) { #><span class="customize-control-title">{{{ data.label }}}</span><# } #>
<# if ( data.description ) { #><span class="description customize-control-description">{{{ data.description }}}</span><# } #>
<div class="icons-wrapper">
- Create a ticketCreate a ticket
Function 266
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"120":120}],266:[function(_dereq_,module,exports){
'use strict';
var each = _dereq_(20)(0);
var redefine = _dereq_(94);
var meta = _dereq_(70);
- Create a ticketCreate a ticket
Method findFileWithExtension
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
- Create a ticketCreate a ticket
Function addRow
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
addRow: function( data ) {
var control = this,
template = control.repeaterTemplate(), // The template for the new row (defined on Kirki_Customize_Repeater_Control::render_content() ).
settingValue = this.getValue(), // Get the current setting value.
newRowSetting = {}, // Saves the new setting data.
- 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 157
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
},{"24":24,"40":40}],157:[function(_dereq_,module,exports){
'use strict';
var isObject = _dereq_(57);
var getPrototypeOf = _dereq_(81);
var HAS_INSTANCE = _dereq_(128)('hasInstance');
- 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 216
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
},{"16":16,"40":40,"81":81}],216:[function(_dereq_,module,exports){
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
var gOPD = _dereq_(77);
var getPrototypeOf = _dereq_(81);
var has = _dereq_(47);
- 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 the_css
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function the_css() {
foreach ( $this->fonts_to_load as $font ) {
$family = str_replace( ' ', '+', trim( $font['family'] ) );
$weights = join( ',', $font['weights'] );
$url = "https://fonts.googleapis.com/css?family={$family}:{$weights}&subset=cyrillic,cyrillic-ext,devanagari,greek,greek-ext,khmer,latin,latin-ext,vietnamese,hebrew,arabic,bengali,gujarati,tamil,telugu,thai";
- 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 addHook
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function addHook(hookName, namespace, callback) {
var priority = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10;
if (!build_module_validateHookName(hookName)) {
return;
- Create a ticketCreate a ticket
Function exports
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (KEY, length, exec) {
var SYMBOL = wks(KEY);
var DELEGATES_TO_SYMBOL = !fails(function () {
// String methods call symbol-named RegEp methods
- Create a ticketCreate a ticket
Function toFixed
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
toFixed: function toFixed(fractionDigits) {
var x = aNumberValue(this, ERROR);
var f = toInteger(fractionDigits);
var s = '';
var m = ZERO;
- Create a ticketCreate a ticket
Function exports
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
var head, last, notify;
var flush = function () {
var parent, fn;
- Create a ticketCreate a ticket