<?php
/**
* @template TSend
* @template TReturn of Traversable
*
* @param TSend $send
* @param TReturn $return
* @return TReturn<TSend>
*/
function doSomething($send, $return) {
}
Currently, Hover will look like this
function doSomething(TSend $send, TReturn $return): TReturn
They might confuse us that TSend
and TReturn
are real data type. We should make them clearer, for example:
function function doSomething<TSend, TReturn of Traversable>(TSend $send, TReturn $return): TReturn