Page MenuHomePhorge

Drop question mark suffix from optional PHPDoc @param types
ClosedPublic

Authored by aklapper on Aug 22 2024, 09:59.
Tags
None
Referenced Files
F3324402: D25798.1743399988.diff
Sun, Mar 30, 05:46
F3318825: D25798.1743291266.diff
Fri, Mar 28, 23:34
F3308084: D25798.1743159196.diff
Thu, Mar 27, 10:53
F3306880: D25798.1743134461.diff
Thu, Mar 27, 04:01
F3305925: D25798.1743122406.diff
Thu, Mar 27, 00:40
F3301941: D25798.1743059585.diff
Wed, Mar 26, 07:13
F3296107: D25798.1742968622.diff
Tue, Mar 25, 05:57
F3296067: D25798.1742967066.diff
Tue, Mar 25, 05:31

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable