mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Remove redundant flag from SimpleTypeInferer
This commit is contained in:
parent
121a801616
commit
e284b91b82
@ -55,8 +55,7 @@ class SimpleTypeInferer
|
||||
Aliases $aliases,
|
||||
FileSource $file_source = null,
|
||||
?array $existing_class_constants = null,
|
||||
?string $fq_classlike_name = null,
|
||||
bool $const_inference = false
|
||||
?string $fq_classlike_name = null
|
||||
): ?Union {
|
||||
if ($stmt instanceof PhpParser\Node\Expr\BinaryOp) {
|
||||
if ($stmt instanceof PhpParser\Node\Expr\BinaryOp\Concat) {
|
||||
@ -432,7 +431,7 @@ class SimpleTypeInferer
|
||||
}
|
||||
}
|
||||
|
||||
if ($const_inference && $stmt instanceof PhpParser\Node\Expr\New_) {
|
||||
if ($stmt instanceof PhpParser\Node\Expr\New_) {
|
||||
$resolved_class_name = $stmt->class->getAttribute('resolvedName');
|
||||
|
||||
if (!is_string($resolved_class_name)) {
|
||||
|
@ -287,11 +287,7 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements FileSour
|
||||
$this->codebase,
|
||||
new NodeDataProvider(),
|
||||
$const->value,
|
||||
$this->aliases,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
true
|
||||
$this->aliases
|
||||
) ?? Type::getMixed();
|
||||
|
||||
$fq_const_name = Type::getFQCLNFromString($const->name->name, $this->aliases);
|
||||
|
Loading…
Reference in New Issue
Block a user