Page MenuHomePhorge

Drop question mark suffix from optional PHPDoc @param types
ClosedPublic

Authored by aklapper on Aug 22 2024, 09:59.

Details

Summary

The question mark in @param type? $foo Desc is a custom notation not consistently applied across the codebase and not necessarily obvious to the reader (because custom and not mentioned in https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md ).
Instead, explicitly state "optional" in the parameter description for clarity.

Closes T15925.

Test Plan

Run PHPStan, see no PHPDoc @param has invalid value (type? [...] style output anymore.

Diff Detail

Repository
rARC Arcanist
Branch
phpDocOptionalParamQuestionmark
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1555
Build 1555: arc lint + arc unit