Showing 5,566 of 7,504 total issues
Function Help
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function Help($keyword="") {
$this->error = null; # to avoid confusion
if(!$this->connected()) {
$this->error = array(
- 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 edit_comment_link
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function edit_comment_link( $link = null, $before = '', $after = '' ) {
global $comment, $post;
if ( $post->post_type == 'page' ) {
if ( !current_user_can( 'edit_page', $post->ID ) )
- 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 make_image
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function make_image( $filename, $function, $arguments ) {
if ( $stream = wp_is_stream( $filename ) ) {
ob_start();
} else {
// The directory containing the original file may no longer exist when using a replication plugin.
- 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 Then
has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring. Open
protected Action<object> Then(params object[] expectedEvents)
{
return got =>
{
var gotEvents = got as object[];
- 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 too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return transition;
Avoid too many return
statements within this function. Open
return data == d;
Avoid too many return
statements within this function. Open
return that.eventOnClickCancelLink(e.target);
Avoid too many return
statements within this function. Open
if ( !s.data.match(/_ajax_nonce=[a-f0-9]+/) ) { return true; }
Avoid too many return
statements within this function. Open
if (node == targetNode) return [targetNode];
Avoid too many return
statements within this function. Open
return el.value;
Avoid too many return
statements within this function. Open
if ( !s ) { return true; }
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
Avoid too many return
statements within this function. Open
return false;