1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Only replace same-file param docblock types

This commit is contained in:
Matthew Brown 2019-06-05 19:32:27 -04:00
parent ddd287fb3d
commit c6063d1378
3 changed files with 6 additions and 2 deletions

View File

@ -451,6 +451,7 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer implements Statements
if ($function_param->type
&& $function_param->type_location
&& $function_param->type_location !== $function_param->signature_type_location
&& $function_param->type_location->file_path === $this->getFilePath()
) {
$replace_type = ExpressionAnalyzer::fleshOutType(
$codebase,

View File

@ -867,7 +867,10 @@ class StaticCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\
$new_method_name
);
FileManipulationBuffer::add($statements_analyzer->getFilePath(), $file_manipulations);
FileManipulationBuffer::add(
$statements_analyzer->getFilePath(),
$file_manipulations
);
$moved_call = true;
}

View File

@ -11,7 +11,7 @@ use Psalm\Progress\DefaultProgress;
error_reporting(-1);
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
ini_set('memory_limit', '4096M');
ini_set('memory_limit', '8192M');
gc_collect_cycles();
gc_disable();