mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-26 20:34:48 +01:00
Updates trans return type to be string or array
This commit is contained in:
parent
76745c98f9
commit
6c425c1ac7
@ -21,7 +21,7 @@ class TransHandler implements FunctionReturnTypeProviderInterface
|
|||||||
$first_arg_type = $event->getStatementsSource()->getNodeTypeProvider()->getType($call_args[0]->value);
|
$first_arg_type = $event->getStatementsSource()->getNodeTypeProvider()->getType($call_args[0]->value);
|
||||||
|
|
||||||
if ($first_arg_type && $first_arg_type->isString()) {
|
if ($first_arg_type && $first_arg_type->isString()) {
|
||||||
return Type::getString();
|
return Type::combineUnionTypes(Type::getString(), Type::getArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user