0

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 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.