[CodeQuality] Add CoalesceToTernaryRector#7960
Conversation
|
@TomasVotruba ready 👍 |
|
For note, it change behaviour, see which should be on purpose ... |
|
Seems this would change behavior to different result. |
|
This cause phpstan issue in the first place, which can be a wrong code to begin with https://phpstan.org/r/42726037-b5d2-4b25-b627-f9b91e22021c We had it in our project, which non nullable in the left, that's why I place it in the last order of code quality. I can unregister it if needed because in case of eg string, and empty string passed, it goes left value over right one, while transformed result cause got right. |
Let's do that and test it first. If it shows no edge-cases in next 2-3 months, we can add it to the set after. |
|
sure, I've unregister it 👍 a7478ec |
|
Thank you 👍 |
Closes rectorphp/rector#9730