Merge pull request #23 from sanmai/pr/2019/cs-fixer
Introduce PHP CS Fixer
This commit is contained in:
commit
07cd651c60
|
|
@ -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:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
- build/cache
|
||||
|
||||
install:
|
||||
- composer install --prefer-dist
|
||||
- mkdir -p build/cache
|
||||
|
||||
script:
|
||||
- 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"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "<6.0"
|
||||
"phpunit/phpunit": "<6.0",
|
||||
"friendsofphp/php-cs-fixer": "^2.16"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue