mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Only replace same-file param docblock types
This commit is contained in:
parent
ddd287fb3d
commit
c6063d1378
@ -451,6 +451,7 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer implements Statements
|
|||||||
if ($function_param->type
|
if ($function_param->type
|
||||||
&& $function_param->type_location
|
&& $function_param->type_location
|
||||||
&& $function_param->type_location !== $function_param->signature_type_location
|
&& $function_param->type_location !== $function_param->signature_type_location
|
||||||
|
&& $function_param->type_location->file_path === $this->getFilePath()
|
||||||
) {
|
) {
|
||||||
$replace_type = ExpressionAnalyzer::fleshOutType(
|
$replace_type = ExpressionAnalyzer::fleshOutType(
|
||||||
$codebase,
|
$codebase,
|
||||||
|
@ -867,7 +867,10 @@ class StaticCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\
|
|||||||
$new_method_name
|
$new_method_name
|
||||||
);
|
);
|
||||||
|
|
||||||
FileManipulationBuffer::add($statements_analyzer->getFilePath(), $file_manipulations);
|
FileManipulationBuffer::add(
|
||||||
|
$statements_analyzer->getFilePath(),
|
||||||
|
$file_manipulations
|
||||||
|
);
|
||||||
|
|
||||||
$moved_call = true;
|
$moved_call = true;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ use Psalm\Progress\DefaultProgress;
|
|||||||
error_reporting(-1);
|
error_reporting(-1);
|
||||||
ini_set('display_errors', '1');
|
ini_set('display_errors', '1');
|
||||||
ini_set('display_startup_errors', '1');
|
ini_set('display_startup_errors', '1');
|
||||||
ini_set('memory_limit', '4096M');
|
ini_set('memory_limit', '8192M');
|
||||||
|
|
||||||
gc_collect_cycles();
|
gc_collect_cycles();
|
||||||
gc_disable();
|
gc_disable();
|
||||||
|
Loading…
Reference in New Issue
Block a user