Hi, implementing a custom \Phpactor\WorseReflection\Core\Inference\FrameWalker I've been able to infer a custom type to a variable during assignment:
/** @var MyContainer $container */
$foo = $container->get(MyService::class);
<> // $foo is now MyService just like I need it to be
Now I'm looking for doing the same at direct call level:
/** @var MyContainer $container */
$container->get(MyService::class)-><> // MyService ordinary completion should pop up
But I fail to understand the proper way to do it.
I've dug into FrameWalker and also WorseClassMemberCompletor: I don't need to create a custom properties/methods list, I'm just looking for inferring MyServce type as the return type of the get method.
Any help or hint would be lovely welcomed.
Hi, implementing a custom
\Phpactor\WorseReflection\Core\Inference\FrameWalkerI've been able to infer a custom type to a variable during assignment:Now I'm looking for doing the same at direct call level:
But I fail to understand the proper way to do it.
I've dug into
FrameWalkerand alsoWorseClassMemberCompletor: I don't need to create a custom properties/methods list, I'm just looking for inferringMyServcetype as the return type of thegetmethod.Any help or hint would be lovely welcomed.