Method backtrace
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function backtrace($options = [])
{
$defaults = [
'trace' => [],
'start' => 0,
Method errorType
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function errorType($value)
{
switch ($value) {
case E_ERROR:
return 'E_ERROR';
Function backtrace
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function backtrace($options = [])
{
$defaults = [
'trace' => [],
'start' => 0,
- 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 _line
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected static function _line($trace)
{
$path = $trace['file'];
$callLine = $trace['line'];
if (!file_exists($path)) {
- 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 focus
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function focus($pattern, $backtrace, $depth = null, $maxLookup = 10)
{
if (!$pattern) {
return $backtrace;
}
- 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 'E_STRICT';
Avoid too many return
statements within this method. Open
return 'E_USER_NOTICE';
Avoid too many return
statements within this method. Open
return 'E_USER_DEPRECATED';
Avoid too many return
statements within this method. Open
return 'E_USER_ERROR';
Avoid too many return
statements within this method. Open
return 'E_DEPRECATED';
Avoid too many return
statements within this method. Open
return 'E_CORE_ERROR';
Avoid too many return
statements within this method. Open
return 'E_COMPILE_ERROR';
Avoid too many return
statements within this method. Open
return '<INVALID>';
Avoid too many return
statements within this method. Open
return 'E_CORE_WARNING';
Avoid too many return
statements within this method. Open
return 'E_COMPILE_WARNING';
Avoid too many return
statements within this method. Open
return 'E_RECOVERABLE_ERROR';
Avoid too many return
statements within this method. Open
return 'E_USER_WARNING';
Function loader
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function loader($loader = null)
{
if ($loader) {
return static::$_loader = $loader;
}
- 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"