Introduce PHP CS Fixer
This commit is contained in:
parent
4155eb74fa
commit
298f3abe8e
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return PhpCsFixer\Config::create()
|
||||||
|
->setRules([
|
||||||
|
'native_function_invocation' => null,
|
||||||
|
])
|
||||||
|
->setFinder(
|
||||||
|
PhpCsFixer\Finder::create()
|
||||||
|
->in(__DIR__)
|
||||||
|
)
|
||||||
|
;
|
||||||
|
|
@ -12,9 +12,12 @@ php:
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.composer/cache
|
- $HOME/.composer/cache
|
||||||
|
- build/cache
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- composer install --prefer-dist
|
- composer install --prefer-dist
|
||||||
|
- mkdir -p build/cache
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- php vendor/bin/phpunit
|
- php vendor/bin/phpunit
|
||||||
|
- vendor/bin/php-cs-fixer --cache-file=build/cache/.php_cs.cache --diff --dry-run --stop-on-violation --verbose fix
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,8 @@
|
||||||
"pear/pear-core-minimal": "^1.10"
|
"pear/pear-core-minimal": "^1.10"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "<6.0"
|
"phpunit/phpunit": "<6.0",
|
||||||
|
"friendsofphp/php-cs-fixer": "^2.16"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue