Showing 16 of 34 total issues
SerendipityHQStyleSF4
has 51 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class SerendipityHQStyleSF4 extends OutputStyle
{
/**
* @var int
*/
SerendipityHQStyleSF5
has 50 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class SerendipityHQStyleSF5 extends OutputStyle
{
/** @var int */
private const MAX_LINE_LENGTH = 120;
File SerendipityHQStyleSF4.php
has 412 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/*
* This file is part of the Serendipity HQ Console Styles Component.
*
File SerendipityHQStyleSF5.php
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/*
* This file is part of the Serendipity HQ Console Styles Component.
*
Method execute
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$outputFormatter = new SerendipityHQOutputFormatter(true);
$ioWriter = new SerendipityHQStyle($input, $output);
$ioWriter->setFormatter($outputFormatter);
Function createBlock
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function createBlock($messages, $type = null, $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array
{
$indentLength = 0;
$prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix);
$lines = [];
- 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 createBlock
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function createBlock($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false)
{
$indentLength = 0;
$prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix);
$lines = [];
- 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 createBlock
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function createBlock($messages, $type = null, $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array
{
$indentLength = 0;
$prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix);
$lines = [];
Method createBlock
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function createBlock($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false)
{
$indentLength = 0;
$prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix);
$lines = [];
Method execute
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$ioWriter = new SymfonyStyle($input, $output);
if ($input->getOption('show-ansi')) {
Method createBlock
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function createBlock($messages, $type = null, $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array
Method createBlock
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function createBlock($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false)
Method createLine
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function createLine(string $message, $type = null, $style = null, string $prefix = '', bool $escape = false): string
Method block
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false)
Method createLine
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function createLine(string $message, $type = null, $style = null, string $prefix = '', bool $escape = false): string
Method block
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function block($messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = false): void