I agree, a lot of the doc comments become redundant when types are specified in type hints.

Note that doc comments for properties are actually not required, as far as I can tell – you could replace:

  /** @var LinkRenderer */
  private $linkRenderer;

…with:

  private LinkRenderer $linkRenderer;

…today!, and no lint checks are going to stop you. I've been suggesting this for new code since we moved to PHP 7.4, which allows these type hints on properties.

--
Bartosz Dziewoński
_______________________________________________
Wikitech-l mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

Reply via email to