Showing 8 of 8 total issues
Method parseData
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parseData(): void
{
$input = explode("\n", $this->content);
$this->stats['rows'] = 0;
$array_size = sizeof($input);
Function parseData
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected function parseData(): void
{
$input = explode("\n", $this->content);
$this->stats['rows'] = 0;
$array_size = sizeof($input);
- 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 table
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function table(): string
{
$out = '<br /><br />Parsed '
. $this->stats['rows']
. ' lines. Found <b>'
Method paralyseLog
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function paralyseLog(): void
{
$this->parseData();
$type = array();
$detail = array();
Method output
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function output(): string
{
return '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' .
'<html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><title>apache log parser</title>
Function parseData
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function parseData(): void
{
$input = explode("\n", $this->content);
$this->stats['rows'] = 0;
$array_size = sizeof($input);
- 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 paralyseLog
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function paralyseLog(): void
{
$this->parseData();
$type = array();
$detail = array();
- 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 table
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function table(): string
{
$out = '<br /><br />Parsed '
. $this->stats['rows']
. ' lines. Found <b>'
- 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"