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
F4116886: D25798.1746975468.diff
Sat, May 10, 14:57
F4116045: D25798.1746958955.diff
Sat, May 10, 10:22
F4032355: D25798.1746706567.diff
Wed, May 7, 12:16
F4011756: D25798.1746626594.diff
Tue, May 6, 14:03
F3927083: D25798.1746373084.diff
Sat, May 3, 15:38
F3882215: D25798.1746242761.diff
Fri, May 2, 03:26
F3762252: D25798.1745832138.diff
Sun, Apr 27, 09:22
F3752470: D25798.1745810541.diff
Sun, Apr 27, 03:22

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