Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document explicit null type hint #174

Open
arogachev opened this issue Sep 30, 2022 · 5 comments
Open

Document explicit null type hint #174

arogachev opened this issue Sep 30, 2022 · 5 comments

Comments

@arogachev
Copy link
Contributor

Prefer string|null over ?string. Introduced in yiisoft/yii-widgets#53.

@samdark
Copy link
Member

samdark commented Oct 4, 2022

I like ? more but don't mind having a single style.

@arogachev
Copy link
Contributor Author

So it's optional?

@samdark
Copy link
Member

samdark commented Oct 6, 2022

It's OK to force a single style for Yii packages.

@vjik
Copy link
Member

vjik commented Oct 13, 2022

Ideal solution — create rector rule. Unfortunately, there is no such thing among built-in rules.

@terabytesoftw
Copy link
Member

For php > 8.0

string|null its ideal, for explicit. (Union types).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants