Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Commit

Permalink
chore(CS): Added php-cs config
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickroger committed Dec 30, 2020
1 parent 4c14ac8 commit 649ea2f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.idea
composer.lock
coverage
.php_cs.cache
16 changes: 16 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

$finder = PhpCsFixer\Finder::create()
->exclude([
'vendor',
])
->in(__DIR__)
->files()->name('*.php')
;

return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
])
->setFinder($finder)
;
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"post-install-cmd": [
"test -d .git && cp contrib/pre-commit .git/hooks/pre-commit",
"test -d .git && chmod +x .git/hooks/pre-commit"
]
],
"cs": "php-cs-fixer fix --config=.php_cs"
}
}

0 comments on commit 649ea2f

Please sign in to comment.