docs
docs copied to clipboard
Document explicit `null` type hint
Prefer string|null over ?string. Introduced in https://github.com/yiisoft/yii-widgets/pull/53.
I like ? more but don't mind having a single style.
So it's optional?
It's OK to force a single style for Yii packages.
Ideal solution — create rector rule. Unfortunately, there is no such thing among built-in rules.
For php > 8.0
string|null its ideal, for explicit. (Union types).