omise / omise-opencart

Omise OpenCart Plugin
https://docs.opn.ooo/opencart-plugin
MIT License
10 stars 11 forks source link

Apply PSR-2 to the project #47

Closed iwat closed 7 years ago

iwat commented 7 years ago

1. Objective

This PR has nothing to do with business requirement. It reformats the code according to PHP Standards Recommendations #2 (aka. PSR-2)

2. Description of change

$ composer global require "squizlabs/php_codesniffer=*"
$ phpcs --config-set default_standard PSR2
$ phpcbf src/admin
$ phpcbf src/catalog

3. Quality assurance

🔧 Environments:

✏️ Details:

Simply test everything.

4. Impact of the change

Code reformatted.

5. Priority of change

High, or prepare for conflict.

6. Additional notes

No.

guzzilar commented 7 years ago

@iwat ✋ fyi, originally, the idea was to following the code standard on each of platform first. Then, if they (platform) doesn't define, use Omise standard, and if we don't define, then use PSR standard.

Something like, Platform > Omise > PSR.

in this case, for tab and new line method, the code had followed from these documents https://github.com/opencart/opencart/wiki/Coding-standards#indentation https://github.com/opencart/opencart/wiki/Coding-standards#new-lines