Showing 4,939 of 4,939 total issues
The class Method has 1018 lines of code. Current threshold is 1000. Avoid really long classes. Open
class Method extends ClassElement implements FunctionInterface
{
use Analyzable;
use Memoize;
use FunctionTrait;
- Exclude checks
The method fromNode() has an NPath complexity of 1728. The configured NPath complexity threshold is 200. Open
public static function fromNode(
Context $context,
CodeBase $code_base,
Node $node,
FullyQualifiedMethodName $fqsen,
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method fromInternalTypeName() has 102 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public static function fromInternalTypeName(
string $type_name,
bool $is_nullable,
int $source,
array $template_parameter_type_list = []
- Exclude checks
The method iterableValueUnionType() has an NPath complexity of 2380. The configured NPath complexity threshold is 200. Open
public function iterableValueUnionType(CodeBase $code_base): ?UnionType
{
if ($this->namespace === '\\') {
$name = strtolower($this->name);
if ($name === 'traversable' || $name === 'iterator') {
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The class Type has 3993 lines of code. Current threshold is 1000. Avoid really long classes. Open
class Type
{
use \Phan\Memoize;
/**
- Exclude checks
The class UnionType has 6159 lines of code. Current threshold is 1000. Avoid really long classes. Open
class UnionType implements Serializable
{
/**
* @var string
* A list of one or more types delimited by the '|'
- Exclude checks
The method canCastToUnionType() has an NPath complexity of 17280. The configured NPath complexity threshold is 200. Open
public function canCastToUnionType(
UnionType $target
): bool {
// Fast-track most common cases first
$type_set = $this->type_set;
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method internalFunctionSignatureMap() has an NPath complexity of 3584. The configured NPath complexity threshold is 200. Open
public static function internalFunctionSignatureMap(int $target_php_version): array
{
static $php73_map = [];
if (!$php73_map) {
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method analyzeFileList() has 186 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public static function analyzeFileList(
CodeBase $code_base,
Closure $file_path_lister
): bool {
if (Config::getValue('dump_parsed_file_list') === true) {
- Exclude checks
The method analyzeFileList() contains an exit expression. Open
exit(0); // This is normal (E.g. .txt files, files outside of analysis list, etc)
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The method finishAnalyzingRemainingStatements() contains an exit expression. Open
exit(EXIT_SUCCESS);
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The class ConfigPluginSet has 1354 lines of code. Current threshold is 1000. Avoid really long classes. Open
final class ConfigPluginSet extends PluginV3 implements
AfterAnalyzeFileCapability,
AnalyzeClassCapability,
AnalyzeFunctionCapability,
AnalyzeFunctionCallCapability,
- Exclude checks
The method finishAnalyzingRemainingStatements() has 203 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public static function finishAnalyzingRemainingStatements(
CodeBase $code_base,
?Request $request,
array $analyze_file_path_list,
array $temporary_file_mapping
- Exclude checks
The method processGraph() contains an exit expression. Open
exit(\EXIT_FAILURE);
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The method make() has 146 lines of code. Current threshold is set to 100. Avoid really long methods. Open
protected static function make(
string $namespace,
string $type_name,
array $template_parameter_type_list,
bool $is_nullable,
- Exclude checks
The method computeExpandedTypesPreservingTemplate() has an NPath complexity of 384. The configured NPath complexity threshold is 200. Open
private function computeExpandedTypesPreservingTemplate(CodeBase $code_base, int $recursion_depth): UnionType
{
$union_type = $this->asPHPDocUnionType();
$class_fqsen = $this->asFQSEN();
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The class ParseVisitor has 1705 lines of code. Current threshold is 1000. Avoid really long classes. Open
class ParseVisitor extends ScopeVisitor
{
/**
* @param Context $context
- Exclude checks
The method analyzeFileList() contains an exit expression. Open
exit(self::dumpSignaturesToFile($code_base, Config::getValue('dump_signatures_file')));
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The method analyzeFileList() contains an exit expression. Open
exit(2);
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The method checkForOptionsConflictingWithServerModes() contains an exit expression. Open
exit(EXIT_FAILURE);
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}