Closed
Description
I don't know if this is currently even possible, but it would be nice, if Phpstan could determine the type of the QueryBuilder, even if it is defined in another method. Currently something like this results in a mixed return type:
/**
* @return array<Entity>
*/
public function reuseQueryBuilder(): array
{
return $this->getQueryBuilder()
->getQuery()
->getResult();
}
private function getQueryBuilder(): QueryBuilder
{
return $this->createQueryBuilder('test');
}
Metadata
Metadata
Assignees
Labels
No labels