-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix: Require test code to also be PSR-2-compliant #594
Conversation
This is great - thanks! Since it's a bigger one, I'll let @yguedidi give it a once over as well before merging. :) |
|
Addressed.
Can't really see how that is an advantage. Can you explain?
These are the options:
In regard to 2.: We're not using it here, so it's not a problem. |
@@ -21,5 +21,5 @@ install: | |||
- travis_retry composer install --prefer-dist --no-interaction | |||
|
|||
script: | |||
- vendor/bin/phpcs src --standard=psr2 -spn | |||
- vendor/bin/phpcs --standard=phpcs.xml.dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can just be vendor/bin/phpcs
@localheinz I'm not really against using PSR-2 in our current test files, I just think it's not worth it. |
Updated! |
* DEALINGS IN THE SOFTWARE. | ||
* | ||
*/ | ||
namespace Facebook\Tests\GraphNodes\Fixtures; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixtures\
must be the top level namespace, so this must be Facebook\Tests\Fixtures\GraphNodes
. Same for other files. It's helpful to put all fixtures together :)
Amended! |
* DEALINGS IN THE SOFTWARE. | ||
* | ||
*/ | ||
namespace Facebook\Tests\PseudoRandomString; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@localheinz You missed this one :)
And amended! 馃槃 |
Looks good :) |
Boom! Thanks guys! :) |
This PR
phpcs
tests/
to also be PSR-2 compliantphpcbf
and extracts each class definition into its own fileFixtures
namespace馃拋 There really isn't any plausible reason for applying different standards for production and test code, is there?