phpfmt_stable icon indicating copy to clipboard operation
phpfmt_stable copied to clipboard

How to use phpfmt in command line?

Open eduardoarandah opened this issue 5 years ago • 1 comments

Is it possible to use phpfmt in command line?

I know about phpcs and phpcbf but they don’t align arrows

eduardoarandah avatar Aug 22 '19 04:08 eduardoarandah

If you have this in a repository at /path/to/repo, you should be able to run it with something like:

/usr/bin/php \
    /path/to/repo/fmt.phar \
    --enable_auto_align \
    --smart_linebreak_after_curly \
    --passes=ReindentSwitchBlocks,SplitCurlyCloseAndTokens \
    -o=<output> \
    <file>

with, of course, your own options.

remorse avatar Feb 27 '20 16:02 remorse