Showing 4,939 of 4,939 total issues
The method normalizeIfStatement() has an NPath complexity of 9721. The configured NPath complexity threshold is 200. Open
private static function normalizeIfStatement(Node $original_node): array
{
$nodes = [$original_node];
// Repeatedly apply these rules
do {
- 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 getMethod() has an NPath complexity of 909312. The configured NPath complexity threshold is 200. Open
public function getMethod(
$method_name,
bool $is_static,
bool $is_direct = false,
bool $is_new_expression = false
- 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 analyzeBackwardCompatibility() has an NPath complexity of 483840. The configured NPath complexity threshold is 200. Open
public function analyzeBackwardCompatibility(): void
{
if (!Config::get_backward_compatibility_checks()) {
return;
}
- 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 getClassForVariable() has an NPath complexity of 456. The configured NPath complexity threshold is 200. Open
protected function getClassForVariable(Node $expr): Clazz
{
if ($expr->kind !== ast\AST_VAR) {
// TODO: Support static properties, (new X()), other expressions with inferable types
throw new NodeException($expr, 'expected simple variable');
- 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 analyzeBackwardCompatibility() has 127 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function analyzeBackwardCompatibility(): void
{
if (!Config::get_backward_compatibility_checks()) {
return;
}
- Exclude checks
The method parseCodePolyfill() has an NPath complexity of 624. The configured NPath complexity threshold is 200. Open
public static function parseCodePolyfill(CodeBase $code_base, Context $context, string $file_path, string $file_contents, bool $suppress_parse_errors, ?Request $request, array &$errors = []): Node
{
// @phan-suppress-next-line PhanRedundantCondition
if (!\in_array(Config::AST_VERSION, TolerantASTConverter::SUPPORTED_AST_VERSIONS, true)) {
throw new \Error(\sprintf("Unexpected polyfill version: want %s, got %d", \implode(', ', TolerantASTConverter::SUPPORTED_AST_VERSIONS), Config::AST_VERSION));
- 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 visitStaticCall() has an NPath complexity of 1024. The configured NPath complexity threshold is 200. Open
public function visitStaticCall(Node $node): void
{
$method = $node->children['method'];
if (!\is_string($method)) {
throw new NodeException($node);
- 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 handleTraitPrecedence() has an NPath complexity of 288. The configured NPath complexity threshold is 200. Open
private function handleTraitPrecedence(array $adaptations_map, Node $adaptation_node): void
{
// TODO: Should also verify that the original method exists, in a future PR?
$trait_method_node = $adaptation_node->children['method'];
if (!$trait_method_node instanceof Node) {
- 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 ContextNode has 2615 lines of code. Current threshold is 1000. Avoid really long classes. Open
class ContextNode
{
/** @var CodeBase The code base within which we're operating */
private $code_base;
- Exclude checks
The method getProperty() has an NPath complexity of 83187500. The configured NPath complexity threshold is 200. Open
public function getProperty(
bool $is_static,
bool $is_known_assignment = false
): Property {
$node = $this->node;
- 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 init() has 401 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public static function init(): void
{
self::$noop = static function (Node $_): string {
return '(unknown)';
};
- Exclude checks
The method getVariableName() has an NPath complexity of 360. The configured NPath complexity threshold is 200. Open
public function getVariableName(): string
{
if (!($this->node instanceof Node)) {
return (string)$this->node;
}
- 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 getFunction() has an NPath complexity of 210. The configured NPath complexity threshold is 200. Open
public function getFunction(
string $function_name,
bool $is_function_declaration = false,
bool $return_placeholder_for_undefined = false
): FunctionInterface {
- 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 getProperty() has 267 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function getProperty(
bool $is_static,
bool $is_known_assignment = false
): Property {
$node = $this->node;
- Exclude checks
The method guessErrorColumnUsingTokens() has an NPath complexity of 1776. The configured NPath complexity threshold is 200. Open
private static function guessErrorColumnUsingTokens(
FileCacheEntry $file_cache_entry,
Error $native_parse_error
): int {
if (!\function_exists('token_get_all')) {
- 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 getConst() has 107 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function getConst(): GlobalConstant
{
$node = $this->node;
if (!$node instanceof Node) {
throw new AssertionError('$node must be a node');
- Exclude checks
The method getEquivalentPHPValueForNode() has an NPath complexity of 248. The configured NPath complexity threshold is 200. Open
public function getEquivalentPHPValueForNode($node, int $flags)
{
if (!($node instanceof Node)) {
return $node;
}
- 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 load() has an NPath complexity of 18874368. The configured NPath complexity threshold is 200. Open
public static function load(): void
{
if (!class_exists('\ast\Node')) {
// Fix for https://github.com/phan/phan/issues/2287
require_once __DIR__ . '/ast_shim.php';
- 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 init() has an NPath complexity of 377487360. The configured NPath complexity threshold is 200. Open
public static function init(): void
{
self::$noop = static function (Node $_): string {
return '(unknown)';
};
- 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 TolerantASTConverter has 3175 lines of code. Current threshold is 1000. Avoid really long classes. Open
class TolerantASTConverter
{
// The latest stable version of php-ast.
// For something != 70, update the library's release.
public const AST_VERSION = 70;
- Exclude checks