5

Does anyone know a code style formatter that complies with the PSR-12 for Visual Studio Code?

I searched the web, but I can only find some plug-ins like PHP Formatter which follows the PSR-2 which is now replaced by PSR-12.

1 Answer 1

0

A PHP extension I'm using on VS Code seems to be suggesting php cs fixer from junstyle to format code.

The configuration example seems to say that you can comply to PSR-12:

{
    ...
    "php-cs-fixer.rules": "@PSR12"
    ...
}

There seems to be some other (sometimes outdated/deprecated) extensions when I search around for php code sniffer, but I haven't tested them.

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.