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
F2938964: D25798.1738026834.diff
Mon, Jan 27, 01:13
F2938959: D25798.1738026829.diff
Mon, Jan 27, 01:13
F2938853: D25798.1738024796.diff
Mon, Jan 27, 00:39
F2932346: D25798.1737733246.diff
Thu, Jan 23, 15:40
F2889084: D25798.1737199244.diff
Fri, Jan 17, 11:20
F2889082: D25798.1737199227.diff
Fri, Jan 17, 11:20
F2889079: D25798.1737199209.diff
Fri, Jan 17, 11:20
F2889023: D25798.1737198271.diff
Fri, Jan 17, 11:04

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