Showing 3,272 of 4,939 total issues
Method analyzeUnsetDim
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function analyzeUnsetDim(Node $node): void
{
$expr_node = $node->children['expr'];
if (!($expr_node instanceof Node)) {
// php -l would warn
Method checkForInfiniteRecursionWithSameArgs
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function checkForInfiniteRecursionWithSameArgs(Node $node, FunctionInterface $method): void
{
$argument_list_node = $node->children['args'];
$parameter_list = $method->getParameterList();
if (\count($argument_list_node->children) !== \count($parameter_list)) {
Method visitClassName
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function visitClassName(Node $node): UnionType
{
$class_node = $node->children['class'];
try {
$class_list = (new ContextNode(
Method __construct
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct(string $binary, string $file_contents, Context $context)
{
$this->context = clone($context);
$new_file_contents = Parser::removeShebang($file_contents);
// TODO: Use symfony process
Method __construct
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
int $comment_flags,
array $variable_list,
array $parameter_list,
array $template_type_list,
Option $inherited_type,
Method internalFunctionSignatureMapForFQSEN
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function internalFunctionSignatureMapForFQSEN(
$function_fqsen
): array {
$map = self::internalFunctionSignatureMap(Config::get_closest_target_php_version_id());
Method checkPossiblyInfiniteLoopNodes
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function checkPossiblyInfiniteLoopNodes(
VariableGraph $variable_graph,
VariableTrackerVisitor $variable_tracker_visitor
): void {
$loop_nodes = $variable_tracker_visitor->getPossiblyInfiniteLoopNodes();
Method visitThrow
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function visitThrow(Node $node): void
{
$code_base = $this->code_base;
$context = $this->context;
$union_type = UnionTypeVisitor::unionTypeFromNode($code_base, $context, $node->children['expr']);
Method checkAbstractStaticMethodCall
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function checkAbstractStaticMethodCall(
FunctionInterface $method,
Node $node,
Context $context,
CodeBase $code_base
Method updateTargetVariableWithType
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function updateTargetVariableWithType(Node $node, Closure $get_type): Context
{
try {
$variable_name = (new ContextNode(
$this->code_base,
Method modifyComplexExpression
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function modifyComplexExpression($node, Closure $type_modification_callback, Context $context, array $args): Context
{
for (;;) {
if (!$node instanceof Node) {
return $context;
Method visitMethod
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function visitMethod(Node $node): Context
{
// Bomb out if we're not in a class context
$class = $this->getContextClass();
$context = $this->context;
Method updateVariableToBeCompared
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
final public function updateVariableToBeCompared(
Node $var_node,
$expr,
int $flags
): Context {
Method visitBinaryOpCommon
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function visitBinaryOpCommon(Node $node): UnionType
{
$left = UnionTypeVisitor::unionTypeFromNode(
$this->code_base,
$this->context,
Method aliasTargetMapFromUseNode
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function aliasTargetMapFromUseNode(
Node $node,
string $prefix = '',
int $flags = 0
): array {
Method astStmtClass
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function astStmtClass(
int $flags,
?string $name,
?\ast\Node $extends,
?\Microsoft\PhpParser\node\classinterfaceclause $implements,
Method addProperty
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addProperty(
CodeBase $code_base,
Property $property,
Option $type_option,
bool $from_trait = false
Method extractDescriptionFromDocComment
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function extractDescriptionFromDocComment(
AddressableElementInterface $element,
CodeBase $code_base = null
): ?string {
$extracted_doc_comment = self::extractDescriptionFromDocCommentRaw($element);
Method asExpandedTypes
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function asExpandedTypes(
CodeBase $code_base,
int $recursion_depth = 0
): UnionType {
// We're going to assume that if the type hierarchy
Method hasSubtypeOf
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function hasSubtypeOf(
UnionType $target
): bool {
// Fast-track most common cases first
$type_set = $this->type_set;