Showing 8 of 8 total issues
File Error.php
has 311 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @package bdk\ErrorHandler
* @author Brad Kent <bkfake-github@yahoo.com>
File ErrorHandler.php
has 277 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @package bdk\ErrorHandler
* @author Brad Kent <bkfake-github@yahoo.com>
Function toStringCheck
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function toStringCheck(Error $error)
{
if (PHP_VERSION_ID >= 70400) {
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
Method errorFactory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function errorFactory(self $handler, $errType, $errMsg, $file, $line, $vars = array())
Method handleError
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function handleError($errType, $errMsg, $file, $line, $vars = array())
Avoid too many return
statements within this method. Open
Open
return null;
Avoid too many return
statements within this method. Open
Open
return $continueToNormal;
Function getCfg
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public function getCfg($path = null)
{
$path = \is_array($path)
? $path
: \array_filter(\preg_split('#[\./]#', (string) $path), 'strlen');
- 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"