wp-phptidy
wp-phptidy copied to clipboard
newline T_OBJECT_OPERATOR indent
indents -> on new line: func()->x() \t->func();
don't know if that's in the right place - but it works ;)
We should add some automated tests before making this change.
I'm thinking a series of sample PHP code that needs to remain unchanged when passed through phptidy.
should be fairly easy to build a unit test for that. i think we could copy how the laravel blade template "engine" tests are done.
https://github.com/laravel/laravel/blob/master/laravel/tests/cases/blade.test.php
it compares input directly vs. expected output.
somehow this can be even automated with travis: https://github.com/laravel/laravel/pull/1218 see the green "okay" by travis?
but I don't know how to set that up.... :/
http://about.travis-ci.org/docs/user/getting-started/
i think we could copy how the laravel blade template "engine" tests are done.
The problem with that approach is that it's messy to have big chunks of PHP code as strings; better to have them in separate files.
somehow this can be even automated with travis:
I've done it with Posts 2 Posts. I can take care of it once we have the actual tests.