safe icon indicating copy to clipboard operation
safe copied to clipboard

Tighten return type in DocBlock

Open JakeQZ opened this issue 5 months ago • 0 comments

For example, preg_split should have its return type as list<string> and not merely list.

A more complex case is preg_replace, where the return type depends on the argument type. PHPStan has a solution for that.

I realize that the code is generated from an XML version of the documentation, so am not sure how these issues can be solved without special-casing, which I'd prefer to avoid.

JakeQZ avatar Sep 18 '25 01:09 JakeQZ