Showing 379 of 6,675 total issues
Function getLimitList
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getLimitList()
{
$values = $this->getLinkValues();
unset($values['limit']);
- 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 getSourceTable
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function getSourceTable($use_as = true)
{
if (isset($this->tables[0])) {
return $this->tables[0];
} else {
- 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 execute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
$searchString = $_REQUEST['searchString'];
// If there was no search string, return an empty array to avoid front-end errors
- 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 incrementColumn
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function incrementColumn($column_name, $amount = 1)
{
$amount = (int) $amount;
if ($amount == 0) {
- 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 joinResult
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function joinResult($source_column, $join_table, $join_column, $content_column, $new_name=null, $searchable=false)
{
// TODO: this will break if you have more than one db pager at a time
// TODO: make this a private member variable
static $join_match = null;
- 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 too many return
statements within this method. Open
return null;
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return false;
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return PHPWS_Template::process($template, $this->module, $this->template);
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return $this->_allColumns;
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return $result;
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return $result;
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return $result;
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return false;
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return PHPWS_Core::plugObject($object, $variables);
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return true;
- Create a ticketCreate a ticket