Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use phpfmt in command line? #62

Open
eduardoarandah opened this issue Aug 22, 2019 · 1 comment
Open

How to use phpfmt in command line? #62

eduardoarandah opened this issue Aug 22, 2019 · 1 comment

Comments

@eduardoarandah
Copy link

Is it possible to use phpfmt in command line?

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

@remorse
Copy link

remorse commented Feb 27, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants