So a long time ago I accidentally used a formatter that switched all my conditions to yoda and I only noticed the damage too late. Going back in time with the file history/git is not an option so I need a formatter extension that can revert them to normal, is there such thing?
1 Answer
The php-cs-fixer VS Code extension can revert them with the following configuration:
"php-cs-fixer.rules": {
"yoda_style": {
"equal": false,
"identical": false,
"less_and_greater": false
}
},
More info about the yoda configuration.