2016-07-19 11:12:28 +02:00
|
|
|
Plugin PHP Coding Standards Fixer
|
2017-01-04 13:22:20 +01:00
|
|
|
=================================
|
2016-07-19 11:12:28 +02:00
|
|
|
|
2016-07-17 16:20:35 +02:00
|
|
|
Runs PHP Coding Standards Fixer against your build.
|
|
|
|
|
2016-07-19 11:12:28 +02:00
|
|
|
Configuration
|
2017-01-04 13:22:20 +01:00
|
|
|
-------------
|
2016-07-19 11:12:28 +02:00
|
|
|
|
2016-07-17 16:20:35 +02:00
|
|
|
### Options
|
2016-07-19 11:12:28 +02:00
|
|
|
|
2017-04-19 14:07:53 +02:00
|
|
|
* **verbose** [bool, optional] - Whether to run in verbose mode (default: false)
|
|
|
|
* **diff** [bool, optional] - Whether to run with the `--diff` flag enabled (default: false)
|
2017-04-14 18:04:37 +02:00
|
|
|
* **directory** [string, optional] - The directory in which PHP CS Fixer should work (default: `%BUILD_PATH%`)
|
2017-04-19 14:07:53 +02:00
|
|
|
* **rules** [string, optional] - Fixer rules (default: `@PSR2`)
|
2017-04-14 18:04:37 +02:00
|
|
|
* **args** [string, optional] - Command line args (in string format) to pass to PHP Coding Standards Fixer (default: ``)
|
2017-05-31 16:19:22 +02:00
|
|
|
* **config** [string, optional] - Special config file (default: `%BUILD_PATH%./.php_cs` or `%BUILD_PATH%./.php_cs.dist`)
|
2016-07-17 16:20:35 +02:00
|
|
|
|
2016-07-19 11:12:28 +02:00
|
|
|
### Examples
|
|
|
|
|
2016-07-17 16:20:35 +02:00
|
|
|
```yml
|
|
|
|
test:
|
|
|
|
php_cs_fixer:
|
2017-04-14 18:04:37 +02:00
|
|
|
directory: "./my/dir/path" # == "%BUILD_PATH%/my/dir/path"
|
|
|
|
args: "--rules=@PSR2 --diff --verbose"
|
2016-07-17 16:20:35 +02:00
|
|
|
```
|
|
|
|
|
2017-04-14 18:04:37 +02:00
|
|
|
```yml
|
|
|
|
test:
|
|
|
|
php_cs_fixer:
|
|
|
|
directory: "%BUILD_PATH%/my/dir/path"
|
2017-04-19 14:07:53 +02:00
|
|
|
verbose: true
|
|
|
|
diff: true
|
|
|
|
rules: "@PSR2"
|
2017-04-14 18:04:37 +02:00
|
|
|
```
|
2017-05-31 16:19:22 +02:00
|
|
|
|
|
|
|
```yml
|
|
|
|
test:
|
|
|
|
php_cs_fixer:
|
|
|
|
config: "./my/dir/.php_cs.special"
|
|
|
|
```
|