mirror of
https://github.com/danog/psalm.git
synced 2024-12-12 09:19:40 +01:00
Add self_out_type to method storage
This commit is contained in:
parent
20cde0ca2c
commit
9d284f1331
@ -2439,7 +2439,6 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
|
||||
$class_template_types = $this->class_template_types;
|
||||
|
||||
foreach ($docblock_info->params_out as $docblock_param_out) {
|
||||
|
||||
$param_name = substr($docblock_param_out['name'], 1);
|
||||
|
||||
try {
|
||||
@ -2477,7 +2476,18 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
|
||||
}
|
||||
|
||||
foreach ($docblock_info->self_out as $self_out) {
|
||||
var_dump($self_out);
|
||||
$out_type = TypeParser::parseTokens(
|
||||
TypeTokenizer::getFullyQualifiedTokens(
|
||||
$self_out['type'],
|
||||
$this->aliases,
|
||||
$this->function_template_types + $class_template_types,
|
||||
$this->type_aliases
|
||||
),
|
||||
null,
|
||||
$this->function_template_types + $class_template_types,
|
||||
$this->type_aliases
|
||||
);
|
||||
$storage->self_out_type = $out_type;
|
||||
}
|
||||
|
||||
foreach ($docblock_info->taint_sink_params as $taint_sink_param) {
|
||||
|
@ -72,4 +72,9 @@ class MethodStorage extends FunctionLikeStorage
|
||||
* @var ?string
|
||||
*/
|
||||
public $plain_getter = null;
|
||||
|
||||
/**
|
||||
* @var Type\Union|null
|
||||
*/
|
||||
public $self_out_type = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user