Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP Code Sniffer 3.x to the composer package. #88

Merged
merged 2 commits into from
Nov 12, 2018
Merged

Conversation

guzzilar
Copy link
Contributor

⚠️ This pull request requires #87 to be merged first.

1. Objective

Omise-PHP recently has been developed using the PSR Code Standards as a based code-style guide, but still, many parts of the code are still left untouched.

This pull request is introducing an automate tool to scan through the whole project finding those left-over code so the developers can provide a better code maintenance and code consistency.

Note 1: This pull request is not to introduce the change of those code styling but to introduce a tool.

Note 2: As in the ruleset, there are 2 excluded rules. It is because originally the project hadn't been developed based on those 2 rules, and it would require a lot of changes on both core code of the library and the interface (like, namespace).
So I decided to pull it off for now, it will be applied back again at Omise-PHP v3.0.

Note 3: This PHP Code Sniffer can be introduced as a one step for the CircleCI to automate it, but as from the note [1], I think it would be a good idea to provide a code-cleaning first, before add this phpcs into the CircleCI step.

To install and test the script

You can install the package via Composer by executing the following code: composer update.
Then, run ./vendor/bin/phpcs to scan the project.
screen shot 2561-11-10 at 15 13 08

@guzzilar guzzilar merged commit ebcf4fe into master Nov 12, 2018
@guzzilar guzzilar deleted the introduce-phpcs branch November 12, 2018 03:55
@guzzilar guzzilar mentioned this pull request Dec 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants