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
Use null|type instead of ?type in PHPDocs #3516
Use null|type instead of ?type in PHPDocs #3516
Conversation
👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do the reverse. by making new fixer
ker@dus:~/github/PHP-CS-Fixer λ grep -r " ?" src tests | wc -l
790
ker@dus:~/github/PHP-CS-Fixer λ grep -r " null|" src tests | wc -l
673
Searching for |
still, |
I thought the project was following PSR-5? Which says it should be |
PSR-5 allows any type that is proper in PHP. |
Strictly speaking, I'm not sure that Also, using |
Also
|
Again, PHP 7.1. If you could use sth as a type, it's great, you can put it to docblock directly. if not, you need to make such monsters like yet.. for nullable type,
exactly, Yet, Psr5 happened before PHP 7.1, so it doesn't contain example with |
just my POV: |
@SpacePossum , our peacemaker |
So what's the status on this? A huge majority of the PHPDocs in this project have |
Makes sense, we never update our CS if we don't have rules/fixers for it. |
It won't gonna happen. PSR-5 is abandoned.
|
Thank you @ntzm. |
This PR was merged into the 2.2 branch. Discussion ---------- Use null|type instead of ?type in PHPDocs Keeps it consistent throughout the project Commits ------- 5da8956 Use null|type instead of ?type in PHPDocs
If anyone will end up in this PR: |
Keeps it consistent throughout the project