Showing 35 of 35 total issues
Function quote
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function quote($value)
{
if (!isset($value)) {
return "NULL";
}
- 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 buildSelectData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function buildSelectData($index, $indexAsArray)
{
$data = [];
foreach ($this as $row) {
- 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 createJoinStatement
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function createJoinStatement($clause, $mainTable, $joinTable, $joinAlias = '')
{
if (in_array(substr($mainTable, -1), [':', '.'])) {
$mainTable = substr($mainTable, 0, -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
Avoid too many return
statements within this method. Open
return $this->addWhereStatement('FALSE', $separator);
Avoid too many return
statements within this method. Open
return 0;
Avoid too many return
statements within this method. Open
return $this->addWhereStatement($condition, $separator);
Avoid too many return
statements within this method. Open
return (string)$value;
Avoid too many return
statements within this method. Open
return $this->addWhereStatement("$condition IN $in", $separator);
Avoid too many return
statements within this method. Open
return $this->addWhereStatement($condition, $separator, $args);
Avoid too many return
statements within this method. Open
return $this->fluent->getPdo()->quote($value);
Avoid too many return
statements within this method. Open
return $this->addWhereStatement("$condition IS NULL", $separator);
Function values
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function values($values)
{
if (!is_array($values)) {
throw new Exception('Param VALUES for INSERT query must be 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 addOneValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function addOneValue($oneValue)
{
// check if all $keys are strings
foreach ($oneValue as $key => $value) {
if (!is_string($key)) {
- 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 getClauseSet
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getClauseSet()
{
$setArray = [];
foreach ($this->statements['SET'] as $field => $value) {
// named params are being used here
- 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 addStatement
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function addStatement($clause, $statement, $parameters = [])
{
if ($statement === null) {
return $this->resetClause($clause);
}
- 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"