Showing 45 of 149 total issues
Method getRawValue
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function &getRawValue($value)
{
if (is_array($value) || is_object($value)) {
return $value;
}
Method refresh
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function refresh(): void
{
if ($this->mode === self::MODE_DEV) {
$this->debugStartTime = microtime(true);
}
Method elementSettings
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function elementSettings(): array
{
return [
new ElementSetting([
'name' => 'string',
Method dateTimeFormatter
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function dateTimeFormatter(int $type, $dateTime, $format, $inputTimeZone = null, $timeZone = null)
{
if ($inputTimeZone === null) {
$inputTimeZone = new DateTimeZone(date_default_timezone_get());
}
Method elementSettings
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function elementSettings(): array
{
return [
new ElementSetting([
'name' => 'string',
Method run
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run(): string
{
/**
* @var string $loopEach
*/
Method elementSettings
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function elementSettings(): array
{
return [
new ElementSetting([
'name' => 'value',
Function checkConditionArray
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function checkConditionArray(string $type, array $conditions): bool
{
$result = false;
foreach ($conditions as $condition) {
- 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 dateTimeFormatter
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function dateTimeFormatter(int $type, $dateTime, $format, $inputTimeZone = null, $timeZone = null)
{
if ($inputTimeZone === null) {
$inputTimeZone = new DateTimeZone(date_default_timezone_get());
}
- 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 checkConditionArray
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function checkConditionArray(string $type, array $conditions): bool
{
$result = false;
foreach ($conditions as $condition) {
- 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 handleLoopItem
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
?int $wrapStep,
int $numericIndex,
string $body,
int $itemCount,
string $wrapTag,
Method formatNumber
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$number,
int $style,
string $pattern = '',
array $attributes = [],
array $symbols = [],
Method dateTimeFormatter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function dateTimeFormatter(int $type, $dateTime, $format, $inputTimeZone = null, $timeZone = null)
Method setLoopItemData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string $loopEach,
string $loopAs,
$currentIndex,
int $numericIndex,
$loopItem
Function refresh
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function refresh(): void
{
if ($this->mode === self::MODE_DEV) {
$this->debugStartTime = microtime(true);
}
- 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
Avoid too many return
statements within this method. Open
return $value;
Avoid too many return
statements within this method. Open
return $value;
Avoid too many return
statements within this method. Open
return $dataValue;
Avoid too many return
statements within this method. Open
return $value;
Avoid too many return
statements within this method. Open
return $value;