coding-standard
coding-standard copied to clipboard
Proposal for Sniff: Choosing between @var and @param for promoted properties
Hi!
Currently one can use either @var T or @param T $… to annotate the type of a promoted property (or both!)
For consistency sake, I think a sniff that checks that only one of those is used would be welcome.
Sniff settings suggestion:
- allowedAnnotation: "either" | "var" | "param"
- "either" means one or the other but not both
- "var" means only
@var Tis allowed - "param" means only `@param T $…" is allowed
- "both" is not an option, the sniff should be disabled instead