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
F3331873: D25798.1743513958.diff
Mon, Mar 31, 13:25
F3330488: D25798.1743489720.diff
Mon, Mar 31, 06:42
F3325426: D25798.1743415367.diff
Sun, Mar 30, 10:02
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

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