mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-15 13:25:30 +01:00
add Closure type to StaticTypeMapper
This commit is contained in:
parent
77ce3ea95e
commit
ac60f8ac09
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Rector\NodeTypeResolver;
|
||||
|
||||
use Closure;
|
||||
use Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
@ -318,6 +319,10 @@ final class StaticTypeMapper
|
||||
return $phpStanType->getClassName();
|
||||
}
|
||||
|
||||
if ($phpStanType instanceof ClosureType) {
|
||||
return '\\' . Closure::class;
|
||||
}
|
||||
|
||||
if ($phpStanType instanceof StringType) {
|
||||
return 'string';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user