Showing 112 of 177 total issues
Function start_el
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function start_el(&$output, $category, $depth = 0, $args = array(), $id = 0)
{
if (empty($args['taxonomy'])) {
$taxonomy = 'category';
}
- 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 hookFieldsDisplay
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function hookFieldsDisplay($term)
{
//Definitions
$contents = array();
$ids = 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 addDocumentPost
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addDocumentPost($post)
{
global $blog_id;
//Create document
- 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 getField
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function getField($type, $id, $special = array(), $ids = array())
{
//Admin panel
if (!OLZ_ISADMIN) {
return false;
- 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 makeHooks
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function makeHooks()
{
//Admin panel
if (OLZ_ISADMIN) {
return;
- 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 start_el
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function start_el(&$output, $category, $depth = 0, $args = array(), $id = 0)
Function getWPPosts
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function getWPPosts($options = array())
{
//Build contents
$contents = 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 getWPCategories
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function getWPCategories($options = array())
{
//Build contents
$contents = 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 getWPPages
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function getWPPages($options = array())
{
//Build contents
$contents = 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 prepareField
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function prepareField($content, $details = array())
{
//Build details
$post = isset($details['post']) ? $details['post'] : 0;
$prefix = isset($details['prefix']) ? $details['prefix'] : '';
- 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 getWPMenus
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function getWPMenus($options = array())
{
//Build contents
$contents = 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
Avoid too many return
statements within this method. Open
return $error;
Avoid too many return
statements within this method. Open
return $field;
Avoid too many return
statements within this method. Open
return array($posttype, $slug);
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return $error;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return 0;
Avoid too many return
statements within this method. Open
return $return;
Avoid too many return
statements within this method. Open
return $return;