Showing 42 of 56 total issues
Method autocomplete
has 42 lines of code (exceeds 40 allowed). Consider refactoring. Open
private static function autocomplete(
string $buffer,
Context $ctx
): array {
Method mapping_to_couples
has 41 lines of code (exceeds 40 allowed). Consider refactoring. Open
public static function mapping_to_couples(AbstractValue $value) {
$internalValue = $value->getCoreValue();
if ($internalValue instanceof MapContainer) {
Function reduce
has a Cognitive Complexity of 12 (exceeds 8 allowed). Consider refactoring. Open
public static function reduce(array &$node): void {
// Make sure this is always list, even with one item.
if (isset($node['args'])) {
$node['args'] = Func::ensure_indexed($node['args']);
- 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 handle
has a Cognitive Complexity of 12 (exceeds 8 allowed). Consider refactoring. Open
protected static function handle(array $node, Context $context) {
// Execute the left-hand node and get its return value.
$subject = HandlerFactory::runNode($node['left'], $context);
- 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 resolve
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
private static function resolve(
string $dotpath,
string $originPackage
): 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 handle
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
protected static function handle(
array $node,
Context $context
) {
- 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 __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected string $name,
protected ?TypeValue $parent = \null,
protected array $attrs = [],
protected bool $isFinal = \true,
protected bool $isMutable = \false,
Method build
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
array $entryNode,
string $definitionName,
ModuleValue $definitionModule,
?array $defParams = \null,
?Scope $defScope = \null
Avoid too many return
statements within this method. Open
return self::evaluateRelation($op, $left, $right);
Avoid too many return
statements within this method. Open
return new DictValue(Func::array_to_couples($inner));
Avoid too many return
statements within this method. Open
return $tmp === -1 || $tmp === 0;
Avoid too many return
statements within this method. Open
return \null;
Avoid too many return
statements within this method. Open
return new FuncValue(FnContainer::buildFromClosure($value));
Avoid too many return
statements within this method. Open
return new FuncValue(FnContainer::buildFromClosure($value));
Avoid too many return
statements within this method. Open
return \null;
Avoid too many return
statements within this method. Open
return $tempDir;
Avoid too many return
statements within this method. Open
return [false, 0];
Avoid too many return
statements within this method. Open
return new ListValue($inner);
Avoid too many return
statements within this method. Open
return $l <= $r;
Avoid too many return
statements within this method. Open
return \null;