Showing 3,272 of 4,939 total issues
Method emitSignatureRealMismatchIssue
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
CodeBase $code_base,
Method $method,
Method $o_method,
string $issue_type,
string $internal_issue_type,
Method astDeclFunction
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
bool $by_ref,
string $name,
ast\Node $params,
?\ast\Node $return_type,
?\ast\Node $stmts,
Method newAstDecl
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
private static function newAstDecl(int $kind, int $flags, array $children, int $lineno, string $doc_comment = null, string $name = null, int $end_lineno = 0, int $decl_id = -1): ast\Node
Method astStmtClass
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
int $flags,
?string $name,
?\ast\Node $extends,
?\Microsoft\PhpParser\node\classinterfaceclause $implements,
?\ast\Node $stmts,
Function restartWithoutProblematicExtensions
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function restartWithoutProblematicExtensions(): void
{
$extensions_to_disable = [];
if (self::shouldRestartToExclude('xdebug')) {
$extensions_to_disable[] = 'xdebug';
- 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 checkValidFileConfig
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static function checkValidFileConfig(): void
{
$include_analysis_file_list = Config::getValue('include_analysis_file_list');
if ($include_analysis_file_list) {
$valid_files = 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"
Further reading
Function locateMethodCompletion
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static function locateMethodCompletion(
CompletionRequest $request,
CodeBase $code_base,
Context $context,
Node $node,
- 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 maybeReadConfigFile
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function maybeReadConfigFile(bool $require_config_exists): void
{
// If the file doesn't exist here, try a directory up
$config_file_name = $this->config_file;
- 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 locatePropertyCompletion
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function locatePropertyCompletion(
CompletionRequest $request,
CodeBase $code_base,
Context $context,
Node $node,
- 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 locateVariableCompletion
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static function locateVariableCompletion(
CompletionRequest $request,
CodeBase $code_base,
Context $context,
string $incomplete_variable_name
- 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 flush
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function flush(): void
{
$keepWriting = true;
while ($keepWriting) {
$message = $this->messages[0]['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 locateGlobalFunctionDefinitionFromComment
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static function locateGlobalFunctionDefinitionFromComment(
GoToDefinitionRequest $request,
CodeBase $code_base,
Context $context,
string $selected_fragment
- 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 importConstantsFromAncestorClasses
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function importConstantsFromAncestorClasses(CodeBase $code_base): void
{
if (!$this->isFirstExecution(__METHOD__)) {
return;
}
- 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 getMarkupDescription
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getMarkupDescription(): string
{
$fqsen = $this->getFQSEN();
$string = '';
$namespace = \ltrim($fqsen->getNamespace(), '\\');
- 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 locateGlobalConstantDefinitionFromComment
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static function locateGlobalConstantDefinitionFromComment(
GoToDefinitionRequest $request,
CodeBase $code_base,
Context $context,
string $selected_fragment
- 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 isReturnTypeModifiable
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function isReturnTypeModifiable(): bool
{
if ($this->isReturnTypeUndefined()) {
return 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
Function makeAssertionUnionTypeExtractor
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function makeAssertionUnionTypeExtractor(CodeBase $code_base, UnionType $type, int $asserted_param_index): ?Closure
{
if (!$this->comment) {
return null;
}
- 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 isEqualTo
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function isEqualTo(UnionType $union_type): bool
{
if ($this === $union_type) {
return 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
Function toStub
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function toStub(bool $class_is_interface = false): string
{
$string = ' ';
if ($this->isFinal()) {
$string .= 'final ';
- 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 analyzeWithNewParams
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function analyzeWithNewParams(Context $context, CodeBase $code_base, array $parameter_list): Context
{
$hash = $this->computeParameterListHash($parameter_list);
$has_pass_by_reference_variable = null;
// Nothing to do, except if PassByReferenceVariable was used
- 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"