File Error.php
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
namespace PhpMyAdmin\Error;
Error
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Error extends Message
{
/**
* The file in which the error occurred
*/
Function processBacktrace
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function processBacktrace(array $backtrace): array
{
$result = [];
$members = ['line', 'function', 'class', 'type'];
- 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 getFunctionCall
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function getFunctionCall(array $step): string
{
$retval = $step['function'] . '(';
if (isset($step['args'])) {
if (count($step['args']) > 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
Function getArg
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function getArg(mixed $arg, string $function): string
{
$retval = '';
$includeFunctions = ['include', 'include_once', 'require', 'require_once'];
$connectFunctions = [
- 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"