omise / omise-opencart

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

Apply OpenCart coding standard #48

Closed iwat closed 7 years ago

iwat commented 7 years ago

1. Objective

This PR reformats all PHP files according to OpenCart provided ruleset.xml.

2. Description of change

The commands below are the commands used to automatically format the PHP files.

$ composer global require "squizlabs/php_codesniffer=*"
$ phpcbf src/admin
$ phpcbf src/catalog

The command below is the command used to check the coding standard.

$ phpcs src/

Note: By default, the command phpcs automatically read the configuration file that has been named phpcs.xml. So, to run the above command phpcs, it is not need to specify the configuration file.

3. Quality assurance

🔧 Environments:

✏️ Details:

Test everything.

Test case 1: Create success charge by credit card Test case 2: Create fail charge by credit card Test case 3: Create success charge by internet banking Test case 4: Create fail charge by internet banking

4. Impact of the change

The PHP files under directories, src/admin and src/catalog are reformatted by using ruleset from the OpenCart Coding standards.

5. Priority of change

High, or conflict.

6. Additional notes

References: