Created
February 25, 2018 23:58
-
-
Save peterfox/6d4dc06d3e881bd56a3f34d3fd5fedef to your computer and use it in GitHub Desktop.
PHP CS Fixer file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Config for PHP-CS-Fixer 2.10.0 | |
*/ | |
$rules = [ | |
'@PSR2' => true, | |
'@PSR1' => true, | |
// addtional rules | |
'array_syntax' => ['syntax' => 'short'], | |
'no_multiline_whitespace_before_semicolons' => true, | |
'no_short_echo_tag' => true, | |
'no_unused_imports' => true, | |
'not_operator_with_successor_space' => true, | |
]; | |
$excludes = [ | |
// add exclude project directory | |
'bootstrap/cache', | |
'storage', | |
'vendor', | |
'node_modules', | |
'etc' | |
]; | |
return PhpCsFixer\Config::create() | |
->setRules($rules) | |
->setFinder( | |
PhpCsFixer\Finder::create() | |
->in(__DIR__) | |
->exclude($excludes) | |
->notName('README.md') | |
->notName('*.xml') | |
->notName('*.yml') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment