Showing 10 of 10 total issues
ValueDatetime
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class ValueDatetime extends NLUValue implements IValueDatetime
{
/**
* @return int
*/
Function playByMessageId
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function playByMessageId($messageId, $schema, $call, &$response)
{
/**
* @var $reactions IScenarioReaction[]
*/
- 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 is
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function is($condition, $compareTo = null): bool
{
$cons = [
static::CON__EQUAL => function ($cur, $compareTo) {
return $cur == $compareTo;
Function run
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$yandexCall = [];
foreach ($this->getPluginsByStage('alice.call.get') as $plugin) {
$plugin($yandexCall);
- 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 getItems
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getItems(ICard $card = null): array
{
$itemsData = isset($card[static::FIELD__ITEMS])
? $card[static::FIELD__ITEMS]
: [];
- 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 empty($cur);
Avoid too many return
statements within this method. Open
return strpos($cur, $compareTo) !== false;
Avoid too many return
statements within this method. Open
return isset($cons[$condition])
? $cons[$condition]($this->getValue(), $compareTo)
: false;
Avoid too many return
statements within this method. Open
return $cur <= $compareTo;
Avoid too many return
statements within this method. Open
return $cur >= $compareTo;