Showing 701 of 9,653 total issues
Function getBlockSelect
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getBlockSelect($selected = [])
{
$cats = $this->getDescendants();
$ret = '<select name="options[]" multiple="multiple">';
$selectedOption = '';
- Read upRead up
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 9 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
$ele_name = $this->getName();
echo '<table class="outer"><tr><td class="odd"><table><tr>';
$cols = 1;
- Read upRead up
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
Method PclTarHandleExtract
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$p_tarname,
$p_file_list,
&$p_list_detail,
$p_mode,
$p_path,
Method isBlockCloned
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
Method makeSelect
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function makeSelect($cats, $name, $selectMode, $addEmpty, $selected, $extra, $displayWeight)
Method getSelect
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$name,
$selectMode,
$addEmpty = false,
$selected = 0,
$extra = '',
Avoid deeply nested control flow statements. Open
if ( type == 'image' && !current.big ) {
current.big = current.image;
}
Avoid deeply nested control flow statements. Open
if ( type == 'image' && !current.big ) {
current.big = current.image;
}
Avoid deeply nested control flow statements. Open
for ( var fn in timers[label] ) {
window.clearInterval(timers[label][fn]);
delete timers[label][fn];
}
Avoid deeply nested control flow statements. Open
if(el.is('img')) {
el.attr('src', value);
} else {
el.replaceWith( '<img src="'+value+'" class="' + el.attr('class') + '" />' );
}
Avoid deeply nested control flow statements. Open
if (cachedHash != undefined) {
jQuery.historyCurrentHash = location.hash.replace(/\?.*$/, '');
jQuery.historyCallback(cachedHash);
}
Function easeOutBack
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
easeOutBack: function (x, t, b, c, d, s) {
Avoid deeply nested control flow statements. Open
if (historyDelta < 0) { // back button has been pushed
// move items to forward stack
for (var i = 0; i < Math.abs(historyDelta); i++) jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop());
} else { // forward button has been pushed
// move items to back stack
Avoid deeply nested control flow statements. Open
if ( fn.timerID ) {
window.clearInterval(timers[label][fn.timerID]);
delete timers[label][fn.timerID];
}
Avoid deeply nested control flow statements. Open
} else if (jQuery.historyBackStack[jQuery.historyBackStack.length - 1] == undefined && !jQuery.isFirst) {
// back button has been pushed to beginning and URL already pointed to hash (e.g. a bookmark)
// document.URL doesn't change in Safari
if (location.hash) {
var current_hash = location.hash;
Function easeInOutBack
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
easeInOutBack: function (x, t, b, c, d, s) {
Function custom_media_upload_tab_name
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function custom_media_upload_tab_name($tabs)
{
$metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
// restrict our tab changes to the meta slider plugin page
- Read upRead up
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 easeInBack
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
easeInBack: function (x, t, b, c, d, s) {
Function historyInit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
historyInit: function(callback, src){
jQuery.historyCallback = callback;
if (src) jQuery.historyIframeSrc = src;
var current_hash = location.hash.replace(/\?.*$/, '');
- Read upRead up
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(!opts.fade_panels) {
j_panels.hide().eq(i%item_count).show();
}