This is allowed:
/** * @param Bar $bar * @param Baz $baz * @return Foo */ public function getFoo( Bar $bar, Baz $baz ): Foo {}
This throws MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic:
public function getFoo( Bar $bar, Baz $baz ): Foo {}
but the only difference is that the first one is harder to read and wastes more space.
Either we should require human-readable description for methods / parameters, or not require the doc block at all when the types are already fully specified.
See similar T288754: Don't complain about missing property documentation on typed properties
This was also discussed on wikitech-l with universal support, see https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/NWXPNHRNLEVXHSWX33H473OAWQP6CDOA/.