phpDoc notation to specify return type identical to parameter type
问题 Imagine the following hypothetical class structure, not an all too uncommon scenario with all PHPdoc hinting set up correctly: class BaseFilter { /** ...base methods... */ } class TextFilter extends BaseFilter { public function setMinLength($len) { /** ...irrelevant */ } } class SomethingWithFilters { /** * @param BaseFilter $filter A valid filter to be added. * @return BaseFilter The filter that was added for easy chaining */ public function addFilter(BaseFilter $filter) { $this->filters[] =