Showing 49 of 49 total issues
Function _render_join
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function _render_join(): ?string
{
if (!isset($this->args['join'])) {
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
Function normalizeDsn
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function normalizeDsn($dsn, $user = null, $pass = null)
{
// Try to dissect DSN into parts
$parts = is_array($dsn) ? $dsn : parse_url($dsn);
- 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 '1 = 1'; // always true
Avoid too many return
statements within this method. Open
return $field . ' ' . $cond . ' ' . $value;
Avoid too many return
statements within this method. Open
$value = '(' . implode(', ', array_map(function ($v) { return $this->escapeParam($v); }, $value)) . ')';
Avoid too many return
statements within this method. Open
return $ret;
Avoid too many return
statements within this method. Open
return $field . ' ' . $cond . ' ' . $value;
Function consume
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function consume($expression, string $escapeMode = self::ESCAPE_PARAM)
{
if (!is_object($expression)) {
switch ($escapeMode) {
case self::ESCAPE_PARAM:
- 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 forwardTypeDeclarationSQL
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function forwardTypeDeclarationSQL(string $targetMethodName, array $column): string
{
$backtrace = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS);
foreach ($backtrace as $frame) {
if ($this === ($frame['object'] ?? 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"