movingimage / style-checker
Library that defines a single PHP code style checking configuration.
Installs: 6 124
Dependents: 8
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
This package is not auto-updated.
Last update: 2020-02-07 09:32:05 UTC
README
This library provides a single policy on PHP code styles, as well as a utility to check your project/library against this code style policy without automatically fixing your code.
Installation
Make sure that in your composer.json you have the private packagist set up:
{
[...]
"repositories": [
{
"type": "composer",
"url": "http://packagist.mi24.tv/"
}
],
"config": {
"secure-http": false
},
[...]
}
Now, install it as a development dependency:
$ composer require --dev movingimage/style-checker
Usage
To check your current project's codebase after installing the library:
$ ./vendor/bin/check_code_style.sh
Or you can install it as a pre-commit hook by creating a new file .git/hooks/pre-commit
with the following contents:
#!/usr/bin/env bash
./vendor/bin/check_code_style.sh