Showing 8 of 8 total issues
Method normalize
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function normalize(
OutputInterface $output,
array $headers,
string $message,
int &$messageLength = 0,
Method remove
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function remove(OutputInterface $output, string $testSource, bool $dirs = false): void
{
$baseMessage = 'remove old files';
$message = $baseMessage . ' ...';
$messageLength = mb_strlen($message);
Method getProperties
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getProperties(OutputInterface $output, array $sources): iterable
{
$baseMessage = 'reading sources';
$message = $baseMessage . ' ...';
$messageLength = mb_strlen($message);
Method init
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init(OutputInterface $output): void
{
$message = 'prepare JsonNormalizer';
$message2 = $message . ' - init ...';
$messageLength = mb_strlen($message2);
Method __construct
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
parent::__construct('Browscap Helper Project', 'dev-master');
$sourcesDirectory = (string) realpath(__DIR__ . '/../sources/');
Function getProperties
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getProperties(OutputInterface $output, array $sources): iterable
{
$baseMessage = 'reading sources';
$message = $baseMessage . ' ...';
$messageLength = mb_strlen($message);
- 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 remove
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function remove(OutputInterface $output, string $testSource, bool $dirs = false): void
{
$baseMessage = 'remove old files';
$message = $baseMessage . ' ...';
$messageLength = mb_strlen($message);
- 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 normalize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function normalize(
OutputInterface $output,
array $headers,
string $message,
int &$messageLength = 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"