wp-phptidy icon indicating copy to clipboard operation
wp-phptidy copied to clipboard

newline T_OBJECT_OPERATOR indent

Open tobsn opened this issue 11 years ago • 3 comments

indents -> on new line: func()->x() \t->func();

don't know if that's in the right place - but it works ;)

tobsn avatar Jan 22 '13 00:01 tobsn

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.

scribu avatar Jan 22 '13 15:01 scribu

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/

tobsn avatar Jan 24 '13 04:01 tobsn

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.

scribu avatar Jan 24 '13 11:01 scribu