amazon-pay-sdk-php
amazon-pay-sdk-php copied to clipboard
Fix Codestyle
At least convert everything to leading spaces instead of these "tabs mixins" to start with.
Fixed by #60
This issue is actually pretty important if Amazon wants to benefit from community contributions.
Many of us use IDEs which reformat code to keep indentation consistent when we save a file, or when code is moved from one place to another. If we want to contribute code to this repository, we have to circumvent this behavior to preserve the inconsistent indentation, or our pull request will end up with a lot of irrelevant changes in the diff (making it more daunting to review).
Fix Codestyle
Does this mean following http://www.php-fig.org/psr/psr-1/ and http://www.php-fig.org/psr/psr-2/?
This issue is actually pretty important if Amazon wants to benefit from community contributions.
Agree!
Code style should be PSR-2 for libraries, correct?
@mglaman - Yeah, and is actually a superset of PSR-1.
The style rules herein are derived from commonalities among the various member projects. When various authors collaborate across multiple projects, it helps to have one set of guidelines to be used among all those projects. Thus, the benefit of this guide is not in the rules themselves, but in the sharing of those rules.
Ooh, I was just trying to make the code internally consistent without changing too much. I can make a new PR reformatting it to fit PSR-2.
There's a patch available to fix this. @islandskater43 , if you want to merge #60 , I'll get started bringing my report downloading features over from my own fork.
@ejegg - I've been using http://cs.sensiolabs.org/ recently to automate updating some older code to PSR-2. Take a look if you haven't already.
@bmeynell, thanks for the suggestion! Do you find it better than phpcbf? I've used phpcbf for a few things, and found that it sometimes garbles comment text and omits newlines when inserting braces.
Updated my reformat for 3.2.0 - now fixed by #63
Hi @bjguillot , I've taken the 'elseif' clarifications out of my latest version of the PSR/2 fix so it should be easier to review. Is there any chance it could be merged this time?