Showing 35 of 35 total issues
Method getProcesses
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getProcesses($list, $link, $index, $duration, $maxSpace, $lineHeight, $timePrecision)
{
$count = count($list);
for ($i = $count > 1 ? 1 : 0; $i < $count; $i++) {
/** @var Event $previousEvent */
Method getErrorAsHtml
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getErrorAsHtml($error, $parameters, $data)
{
$sandBox = new SandBox(function () use (
$error,
$parameters,
Method callAdapter
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function callAdapter($method, $path, $input, callable $getSource, array $parameters)
{
$source = '';
$this->getCompiler()->reset();
Method getRendererException
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getRendererException($error, $code, $line, $offset, $source, $sourcePath, $parameters, $options)
{
$colorSupport = $options['color_support'];
if (is_null($colorSupport)) {
$colorSupport = $this->hasColorSupport();
Method getRendererException
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function getRendererException($error, $code, $line, $offset, $source, $sourcePath, $parameters, $options)
Method getProcesses
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function getProcesses($list, $link, $index, $duration, $maxSpace, $lineHeight, $timePrecision)
Method getSandboxCall
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function getSandboxCall(&$source, $method, $path, $input, callable $getSource, array $parameters)
Method handleError
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function handleError($error, $code, $path, $source, $parameters, $options)
Method getDebuggedException
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function getDebuggedException($error, $code, $source, $path, $parameters, $options)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
EventList $events,
SplObjectStorage $nodesRegister,
$startTime,
$initialMemoryUsage,
$eventDump
Method displayCached
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function displayCached($path, $input, callable $rendered, array $variables, &$success = null);
Method displayCached
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function displayCached($path, $input, callable $rendered, array $variables, &$success = null)
Method callAdapter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function callAdapter($method, $path, $input, callable $getSource, array $parameters)
Function renderDirectory
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public function renderDirectory($path, $destination = null, $extension = '.html', array $parameters = [])
{
if (is_array($destination)) {
$parameters = $destination;
$destination = 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 record
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
private function record(Event $event)
{
$time = microtime(true) - $this->startTime;
$container = $this->getContainer();
$maxTime = $container->getOption('execution_max_time');
- 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"